summaryrefslogtreecommitdiff
path: root/engine/overworld/player_state.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-05 17:29:11 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-05 17:51:29 -0400
commit2b2ed54bbf017943ba2343cd6c1dbe88b8f34a4e (patch)
treea418c4ef57d272e7e2a70337ac8c2a8194545541 /engine/overworld/player_state.asm
parent7ab43f4d17aa63d4ef1050d80560379f19200088 (diff)
Identify wSpriteStateData1 and wSpriteStateData2 offsets, like pokeyellow
Diffstat (limited to 'engine/overworld/player_state.asm')
-rw-r--r--engine/overworld/player_state.asm12
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm
index ea24fdc1..9ff67df8 100644
--- a/engine/overworld/player_state.asm
+++ b/engine/overworld/player_state.asm
@@ -88,7 +88,7 @@ IsPlayerFacingEdgeOfMap::
push hl
push de
push bc
- ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
srl a
ld c, a
ld b, $0
@@ -158,7 +158,7 @@ IsWarpTileInFrontOfPlayer::
ld a, [wCurMap]
cp SS_ANNE_BOW
jr z, IsSSAnneBowWarpTileInFrontOfPlayer
- ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
srl a
ld c, a
ld b, 0
@@ -263,7 +263,7 @@ _GetTileAndCoordsInFrontOfPlayer:
ld d, a
ld a, [wXCoord]
ld e, a
- ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown
; facing down
@@ -302,7 +302,7 @@ GetTileTwoStepsInFrontOfPlayer:
ld a, [hli]
ld d, a
ld e, [hl]
- ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
and a ; cp SPRITE_FACING_DOWN
jr nz, .notFacingDown
; facing down
@@ -375,7 +375,7 @@ CheckForBoulderCollisionWithSprites:
swap a
ld d, 0
ld e, a
- ld hl, wSpriteStateData2 + $14
+ ld hl, wSprite01StateData2MapY
add hl, de
ld a, [hli] ; map Y position
ld [hPlayerYCoord], a
@@ -384,7 +384,7 @@ CheckForBoulderCollisionWithSprites:
ld a, [wNumSprites]
ld c, a
ld de, $f
- ld hl, wSpriteStateData2 + $14
+ ld hl, wSprite01StateData2MapY
ld a, [hPlayerFacing]
and $3 ; facing up or down?
jr z, .pushingHorizontallyLoop