summaryrefslogtreecommitdiff
path: root/engine/overworld/push_boulder.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-07 19:48:22 -0400
committerGitHub <noreply@github.com>2020-07-07 19:48:22 -0400
commit9571c550b6a0dcb3a4f54513c881661a87271024 (patch)
treed73507228a57e4f3cece2fb93fe7df3a9439553f /engine/overworld/push_boulder.asm
parentc480632d5494d04f7f5f0298a31877a2293b564e (diff)
parentbbf2f51a02b2544f1bef32a5868503b474ae2fef (diff)
Merge pull request #263 from Rangi42/master
Syncing style with pokecrystal
Diffstat (limited to 'engine/overworld/push_boulder.asm')
-rw-r--r--engine/overworld/push_boulder.asm14
1 files changed, 7 insertions, 7 deletions
diff --git a/engine/overworld/push_boulder.asm b/engine/overworld/push_boulder.asm
index da1c6dee..4cef8b64 100644
--- a/engine/overworld/push_boulder.asm
+++ b/engine/overworld/push_boulder.asm
@@ -6,15 +6,15 @@ TryPushingBoulder::
bit 1, a ; has boulder dust animation from previous push played yet?
ret nz
xor a
- ld [hSpriteIndexOrTextID], a
+ ldh [hSpriteIndexOrTextID], a
call IsSpriteInFrontOfPlayer
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
ld [wBoulderSpriteIndex], a
and a
jp z, ResetBoulderPushFlags
ld hl, wSpritePlayerStateData1MovementStatus
ld d, $0
- ld a, [hSpriteIndexOrTextID]
+ ldh a, [hSpriteIndexOrTextID]
swap a
ld e, a
add hl, de
@@ -27,14 +27,14 @@ TryPushingBoulder::
bit 6, [hl]
set 6, [hl] ; indicate that the player has tried pushing
ret z ; the player must try pushing twice before the boulder will move
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
and D_RIGHT | D_LEFT | D_UP | D_DOWN
ret z
predef CheckForCollisionWhenPushingBoulder
ld a, [wTileInFrontOfBoulderAndBoulderCollisionResult]
and a ; was there a collision?
jp nz, ResetBoulderPushFlags
- ld a, [hJoyHeld]
+ ldh a, [hJoyHeld]
ld b, a
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
@@ -86,13 +86,13 @@ DoBoulderDustAnimation::
ld a, [wd730]
bit 0, a
ret nz
- callab AnimateBoulderDust
+ callfar AnimateBoulderDust
call DiscardButtonPresses
ld [wJoyIgnore], a
call ResetBoulderPushFlags
set 7, [hl]
ld a, [wBoulderSpriteIndex]
- ld [hSpriteIndex], a
+ ldh [hSpriteIndex], a
call GetSpriteMovementByte2Pointer
ld [hl], $10
ld a, SFX_CUT