mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Specify the ldh instruction, don't turn ld into ldh
This commit is contained in:
parent
c480632d54
commit
772fcc7588
219 changed files with 2556 additions and 2556 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue