Specify the ldh instruction, don't turn ld into ldh

This commit is contained in:
Rangi 2020-07-06 19:03:05 -04:00
parent c480632d54
commit 772fcc7588
219 changed files with 2556 additions and 2556 deletions

View file

@ -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
@ -92,7 +92,7 @@ DoBoulderDustAnimation::
call ResetBoulderPushFlags
set 7, [hl]
ld a, [wBoulderSpriteIndex]
ld [hSpriteIndex], a
ldh [hSpriteIndex], a
call GetSpriteMovementByte2Pointer
ld [hl], $10
ld a, SFX_CUT