mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 07:02:17 +13:00
Remove most static wram addresses. Use labels instead.
For unknown addresses, use "w<address>". Label overleads are still an issue.
This commit is contained in:
parent
52ba96f5f4
commit
40c17c906b
290 changed files with 8262 additions and 7759 deletions
|
|
@ -2,13 +2,13 @@ PrepareOAMData:
|
|||
; Determine OAM data for currently visible
|
||||
; sprites and write it to wOAMBuffer.
|
||||
|
||||
ld a, [$cfcb]
|
||||
ld a, [wcfcb]
|
||||
dec a
|
||||
jr z, .asm_4b1e
|
||||
|
||||
cp 0 - 1
|
||||
ret nz
|
||||
ld [$cfcb], a
|
||||
ld [wcfcb], a
|
||||
jp HideSprites
|
||||
|
||||
.asm_4b1e
|
||||
|
|
@ -27,7 +27,7 @@ PrepareOAMData:
|
|||
inc e
|
||||
inc e
|
||||
ld a, [de] ; c1x2 (facing/anim)
|
||||
ld [$d5cd], a
|
||||
ld [wd5cd], a
|
||||
cp $ff ; off-screen (don't draw)
|
||||
jr nz, .visible
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ PrepareOAMData:
|
|||
push bc
|
||||
ld b, a
|
||||
|
||||
ld a, [$d5cd] ; temp copy of c1x2
|
||||
ld a, [wd5cd] ; temp copy of c1x2
|
||||
swap a ; high nybble determines sprite used (0 is always player sprite, next are some npcs)
|
||||
and $f
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ PrepareOAMData:
|
|||
ld h, wOAMBuffer / $100
|
||||
ld de, $4
|
||||
ld b, $a0
|
||||
ld a, [$d736]
|
||||
ld a, [wd736]
|
||||
bit 6, a
|
||||
ld a, $a0
|
||||
jr z, .clear
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue