summaryrefslogtreecommitdiff
path: root/src/engine/home.asm
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2018-02-17 19:11:28 +0100
committerxCrystal <rgr.crystal@gmail.com>2018-02-17 19:11:28 +0100
commitccb7c0c359dd1aa4475c9f51b37f7b5faabc1e34 (patch)
treea3a84c089d9ba93cd7312b460d82005d24596515 /src/engine/home.asm
parentc58266dc318f79bf5479868d7b2b6c067365fee0 (diff)
Create sprite_buffer_struct
Diffstat (limited to 'src/engine/home.asm')
-rw-r--r--src/engine/home.asm18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/engine/home.asm b/src/engine/home.asm
index 35e4bd5..d11c4c0 100644
--- a/src/engine/home.asm
+++ b/src/engine/home.asm
@@ -8038,18 +8038,18 @@ Func_3d72: ; 3d72 (0:3d72)
Func_3db7: ; 3db7 (0:3db7)
push bc
ld c, $0
- call ModifyUnknownOAMBufferProperty
+ call GetSpriteBufferProperty
pop bc
ret
-; this needs to be determined after we learn more about the buffer.
-ModifyUnknownOAMBufferProperty: ; 3dbf (0:3dbf)
- ld a, [wd4cf]
- cp $10
- jr c, .asm_3dc9
+; read property (byte) c from a sprite in wSpriteBuffer identified by wWhichSprite
+GetSpriteBufferProperty: ; 3dbf (0:3dbf)
+ ld a, [wWhichSprite]
+ cp SPRITE_BUFFER_CAPACITY
+ jr c, .got_sprite
rst $38
- ld a, $f
-.asm_3dc9
+ ld a, SPRITE_BUFFER_CAPACITY - 1 ; default to last sprite
+.got_sprite
push bc
swap a
push af
@@ -8059,7 +8059,7 @@ ModifyUnknownOAMBufferProperty: ; 3dbf (0:3dbf)
and $f0
or c
ld c, a
- ld hl, wOAMBuffer
+ ld hl, wSpriteBuffer
add hl, bc
pop bc
ret