diff options
Diffstat (limited to 'engine/overworld/card_key.asm')
-rwxr-xr-x | engine/overworld/card_key.asm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm index 61e512de..e1fc9160 100755 --- a/engine/overworld/card_key.asm +++ b/engine/overworld/card_key.asm @@ -8,7 +8,8 @@ PrintCardKeyText: ret z cp b jr nz, .silphCoMapListLoop - predef GetTileAndCoordsInFrontOfPlayer +; does not check for tile in front of player. This might be buggy + ;predef GetTileAndCoordsInFrontOfPlayer ld a, [wTileInFrontOfPlayer] cp $18 jr z, .cardKeyDoorInFrontOfPlayer @@ -25,12 +26,12 @@ PrintCardKeyText: ld b, CARD_KEY call IsItemInBag jr z, .noCardKey - call GetCoordsInFrontOfPlayer - push de + xor a + ld [wPlayerMovingDirection], a tx_pre_id CardKeySuccessText ld [hSpriteIndexOrTextID], a call PrintPredefTextID - pop de + call GetCoordsInFrontOfPlayer srl d ld a, d ld b, a @@ -73,7 +74,7 @@ SilphCoMapList: CardKeySuccessText: TX_FAR _CardKeySuccessText1 - db $0b + TX_SFX_ITEM TX_FAR _CardKeySuccessText2 db "@" @@ -88,7 +89,7 @@ GetCoordsInFrontOfPlayer: ld d, a ld a, [wXCoord] ld e, a - ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction + ld a, [wPlayerFacingDirection] ; player's sprite facing direction and a jr nz, .notFacingDown ; facing down |