summaryrefslogtreecommitdiff
path: root/engine/overworld/sprite_collisions.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 19:59:41 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 19:59:41 -0400
commit35deb771130a9012ee4494b1db097761f2fe2919 (patch)
treef47b099cdb4a165dc0a5b0e85f2e24780629680f /engine/overworld/sprite_collisions.asm
parent55bb99580eeccc92106437c4ad86edb8ca89ecda (diff)
H_CONSTANTNAMES -> hConstantNames
Diffstat (limited to 'engine/overworld/sprite_collisions.asm')
-rw-r--r--engine/overworld/sprite_collisions.asm12
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/overworld/sprite_collisions.asm b/engine/overworld/sprite_collisions.asm
index 0e6b2d06..43d1759c 100644
--- a/engine/overworld/sprite_collisions.asm
+++ b/engine/overworld/sprite_collisions.asm
@@ -6,7 +6,7 @@ _UpdateSprites::
ld l, a
sub $e
ld c, a
- ld [H_CURRENTSPRITEOFFSET], a
+ ld [hCurrentSpriteOffset], a
ld a, [hl]
and a
jr z, .skipSprite ; tests $c2Xe
@@ -34,14 +34,14 @@ UpdateNonPlayerSprite:
ld [$ff93], a ; $10 * sprite#
ld a, [wNPCMovementScriptSpriteOffset] ; some sprite offset?
ld b, a
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld a, [hCurrentSpriteOffset]
cp b
jr nz, .unequal
jp DoScriptedNPCMovement
.unequal
jp UpdateNPCSprite
-; This detects if the current sprite (whose offset is at H_CURRENTSPRITEOFFSET)
+; This detects if the current sprite (whose offset is at hCurrentSpriteOffset)
; is going to collide with another sprite by looping over the other sprites.
; The current sprite's offset will be labelled with i (e.g. $c1i0).
; The loop sprite's offset will labelled with j (e.g. $c1j0).
@@ -54,7 +54,7 @@ DetectCollisionBetweenSprites:
nop
ld h, wSpriteStateData1 / $100
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld a, [hCurrentSpriteOffset]
add wSpriteStateData1 % $100
ld l, a
@@ -113,7 +113,7 @@ DetectCollisionBetweenSprites:
ld [$ff8f], a ; store loop counter
swap a
ld e, a
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld a, [hCurrentSpriteOffset]
cp e ; does the loop sprite match the current sprite?
jp z, .next ; go to the next sprite if they match
@@ -128,7 +128,7 @@ DetectCollisionBetweenSprites:
inc a
jp z, .next ; go the next sprite if offscreen
- ld a, [H_CURRENTSPRITEOFFSET]
+ ld a, [hCurrentSpriteOffset]
add 10
ld l, a