summaryrefslogtreecommitdiff
path: root/engine/overworld/map_sprites.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-07 15:09:54 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-07 16:21:26 -0400
commit4a7d1513f3135a3c926233d47921b21bf8b1fab4 (patch)
tree22e14964dcd2e6dae66de392c32caf33e70c964b /engine/overworld/map_sprites.asm
parentb945988a0af9de9a37d95be8b117f395bc6e5592 (diff)
Use 'tile' and 'tiles' macros
Diffstat (limited to 'engine/overworld/map_sprites.asm')
-rwxr-xr-xengine/overworld/map_sprites.asm8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm
index 4a68169a..8f1f3931 100755
--- a/engine/overworld/map_sprites.asm
+++ b/engine/overworld/map_sprites.asm
@@ -130,25 +130,25 @@ LoadMapSpriteTilePatterns:
push de
push bc
ld hl, vNPCSprites ; VRAM base address
- ld bc, $c0 ; number of bytes per VRAM slot
+ ld bc, 12 tiles ; number of bytes per VRAM slot
ldh a, [hVRAMSlot]
cp 11 ; is it a 4-tile sprite?
jr nc, .fourTileSpriteVRAMAddr
ld d, a
dec d
-; hl = vSprites + [hVRAMSlot] * $C0 (the number of bytes in 12 tiles)
+; hl = vSprites + [hVRAMSlot] * 12 tiles
.calculateVRAMAddrLoop
add hl, bc
dec d
jr nz, .calculateVRAMAddrLoop
jr .loadStillTilePattern
.fourTileSpriteVRAMAddr
- ld hl, vSprites + $7c0 ; address for second 4-tile sprite
+ ld hl, vSprites tile $7c ; address for second 4-tile sprite
ldh 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
+ ld hl, vSprites tile $78 ; address for first 4-tile sprite
inc a
ldh [hFourTileSpriteCount], a
.loadStillTilePattern