aboutsummaryrefslogtreecommitdiffstats
path: root/engine/overworld/push_boulder.asm
diff options
context:
space:
mode:
authorSylvie <35663410+Rangi42@users.noreply.github.com>2024-07-16 13:02:54 -0400
committerGitHub <noreply@github.com>2024-07-16 13:02:54 -0400
commit8fafca714c07500d1d87bba224f12cf9cc2c8789 (patch)
tree273ca88fcfcd80df9c318c9cb8d17a1f7aa240cb /engine/overworld/push_boulder.asm
parentBuild with RGBDS 0.8.0, though it is not yet required (diff)
downloadpokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.gz
pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.xz
pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.zip
Identify various flag labels and bit constants (#454)
Diffstat (limited to 'engine/overworld/push_boulder.asm')
-rw-r--r--engine/overworld/push_boulder.asm38
1 files changed, 19 insertions, 19 deletions
diff --git a/engine/overworld/push_boulder.asm b/engine/overworld/push_boulder.asm
index 96c506c0..7eee844c 100644
--- a/engine/overworld/push_boulder.asm
+++ b/engine/overworld/push_boulder.asm
@@ -1,9 +1,9 @@
TryPushingBoulder::
- ld a, [wd728]
- bit 0, a ; using Strength?
+ ld a, [wStatusFlags1]
+ bit BIT_STRENGTH_ACTIVE, a
ret z
- ld a, [wFlags_0xcd60]
- bit 1, a ; has boulder dust animation from previous push played yet?
+ ld a, [wMiscFlags]
+ bit BIT_BOULDER_DUST, a
ret nz
xor a
ldh [hSpriteIndexOrTextID], a
@@ -23,9 +23,9 @@ TryPushingBoulder::
ld a, [hl]
cp BOULDER_MOVEMENT_BYTE_2
jp nz, ResetBoulderPushFlags
- ld hl, wFlags_0xcd60
- bit 6, [hl]
- set 6, [hl] ; indicate that the player has tried pushing
+ ld hl, wMiscFlags
+ bit BIT_TRIED_PUSH_BOULDER, [hl]
+ set BIT_TRIED_PUSH_BOULDER, [hl]
ret z ; the player must try pushing twice before the boulder will move
ldh a, [hJoyHeld]
and D_RIGHT | D_LEFT | D_UP | D_DOWN
@@ -44,30 +44,30 @@ TryPushingBoulder::
cp SPRITE_FACING_RIGHT
jr z, .pushBoulderRight
.pushBoulderDown
- bit 7, b
+ bit BIT_D_DOWN, b
ret z
ld de, PushBoulderDownMovementData
jr .done
.pushBoulderUp
- bit 6, b
+ bit BIT_D_UP, b
ret z
ld de, PushBoulderUpMovementData
jr .done
.pushBoulderLeft
- bit 5, b
+ bit BIT_D_LEFT, b
ret z
ld de, PushBoulderLeftMovementData
jr .done
.pushBoulderRight
- bit 4, b
+ bit BIT_D_RIGHT, b
ret z
ld de, PushBoulderRightMovementData
.done
call MoveSprite
ld a, SFX_PUSH_BOULDER
call PlaySound
- ld hl, wFlags_0xcd60
- set 1, [hl]
+ ld hl, wMiscFlags
+ set BIT_BOULDER_DUST, [hl]
ret
PushBoulderUpMovementData:
@@ -87,14 +87,14 @@ PushBoulderRightMovementData:
db -1 ; end
DoBoulderDustAnimation::
- ld a, [wd730]
- bit 0, a
+ ld a, [wStatusFlags5]
+ bit BIT_SCRIPTED_NPC_MOVEMENT, a
ret nz
callfar AnimateBoulderDust
call DiscardButtonPresses
ld [wJoyIgnore], a
call ResetBoulderPushFlags
- set 7, [hl] ; [wFlags_0xcd60]
+ set BIT_PUSHED_BOULDER, [hl]
ld a, [wBoulderSpriteIndex]
ldh [hSpriteIndex], a
call GetSpriteMovementByte2Pointer
@@ -103,7 +103,7 @@ DoBoulderDustAnimation::
jp PlaySound
ResetBoulderPushFlags:
- ld hl, wFlags_0xcd60
- res 1, [hl]
- res 6, [hl]
+ ld hl, wMiscFlags
+ res BIT_BOULDER_DUST, [hl]
+ res BIT_TRIED_PUSH_BOULDER, [hl]
ret