summaryrefslogtreecommitdiff
path: root/engine/overworld/map_sprites.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld/map_sprites.asm')
-rwxr-xr-xengine/overworld/map_sprites.asm16
1 files changed, 8 insertions, 8 deletions
diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm
index df39d112..33411dfc 100755
--- a/engine/overworld/map_sprites.asm
+++ b/engine/overworld/map_sprites.asm
@@ -39,7 +39,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
ld b,$10 ; number of sprite slots
ld hl,wSpriteStateData2 + $0d
xor a
- ld [$ff8e],a ; 4-tile sprite counter
+ ld [hFourTileSpriteCount],a
.copyPictureIDLoop ; loop to copy picture ID from $C2XD to $C2XE
ld a,[hli] ; $C2XD (sprite picture ID)
ld [hld],a ; $C2XE
@@ -98,14 +98,14 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
cp a,SPRITE_BALL ; is it a 4-tile sprite?
jr c,.notFourTileSprite
pop af
- ld a,[$ff8e] ; 4-tile sprite counter
+ ld a,[hFourTileSpriteCount]
add a,11
jr .storeVRAMSlot
.notFourTileSprite
pop af
.storeVRAMSlot
ld [hl],a ; store VRAM slot at $C2XE
- ld [$ff8d],a ; used to determine if it's 4-tile sprite later
+ ld [hVRAMSlot],a ; used to determine if it's 4-tile sprite later
ld a,b ; a = current sprite picture ID
dec a
add a
@@ -128,7 +128,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
push bc
ld hl,vNPCSprites ; VRAM base address
ld bc,$c0 ; number of bytes per VRAM slot
- ld a,[$ff8d]
+ ld a,[hVRAMSlot]
cp a,11 ; is it a 4-tile sprite?
jr nc,.fourTileSpriteVRAMAddr
ld d,a
@@ -142,13 +142,13 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
jr .loadStillTilePattern
.fourTileSpriteVRAMAddr
ld hl,vSprites + $7c0 ; address for second 4-tile sprite
- ld a,[$ff8e] ; 4-tile sprite counter
- and a ; is it the first 4-tile sprite?
+ ld a,[hFourTileSpriteCount]
+ and a
jr nz,.loadStillTilePattern
; if it's the first 4-tile sprite
ld hl,vSprites + $780 ; address for first 4-tile sprite
inc a
- ld [$ff8e],a ; 4-tile sprite counter
+ ld [hFourTileSpriteCount],a
.loadStillTilePattern
pop bc
pop de
@@ -168,7 +168,7 @@ LoadMapSpriteTilePatterns: ; 17871 (5:7871)
.skipFirstLoad
pop de
pop hl
- ld a,[$ff8d]
+ ld a,[hVRAMSlot]
cp a,11 ; is it a 4-tile sprite?
jr nc,.skipSecondLoad ; if so, there is no second block
push de