summaryrefslogtreecommitdiff
path: root/engine/overworld/card_key.asm
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2016-05-22 21:02:18 -0400
committerluckytyphlosion <alan.rj.huang@gmail.com>2016-05-22 21:02:18 -0400
commitf3de3a20dfccb8a57cdf9feb860bf1e89a733f50 (patch)
tree5d3f60d4b7fdcf44f4202e7db915213d041f663d /engine/overworld/card_key.asm
parent3da00e31f8698c1b994c24ca55b5b9c3d3454af8 (diff)
Bank11 and 14 misc functions.
Diffstat (limited to 'engine/overworld/card_key.asm')
-rwxr-xr-xengine/overworld/card_key.asm19
1 files changed, 10 insertions, 9 deletions
diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm
index 2ef7529c..f601a951 100755
--- a/engine/overworld/card_key.asm
+++ b/engine/overworld/card_key.asm
@@ -1,4 +1,4 @@
-PrintCardKeyText: ; 52673 (14:6673)
+PrintCardKeyText: ; 525d8 (14:65d8)
ld hl, SilphCoMapList
ld a, [wCurMap]
ld b, a
@@ -8,7 +8,8 @@ PrintCardKeyText: ; 52673 (14:6673)
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: ; 52673 (14:6673)
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
@@ -58,7 +59,7 @@ PrintCardKeyText: ; 52673 (14:6673)
ld [hSpriteIndexOrTextID], a
jp PrintPredefTextID
-SilphCoMapList: ; 526e3 (14:66e3)
+SilphCoMapList: ; 52645 (14:6645)
db SILPH_CO_2F
db SILPH_CO_3F
db SILPH_CO_4F
@@ -71,19 +72,19 @@ SilphCoMapList: ; 526e3 (14:66e3)
db SILPH_CO_11F
db $FF
-CardKeySuccessText: ; 526ee (14:66ee)
+CardKeySuccessText: ; 52650 (14:6650)
TX_FAR _CardKeySuccessText1
db $0b
TX_FAR _CardKeySuccessText2
db "@"
-CardKeyFailText: ; 526f8 (14:66f8)
+CardKeyFailText: ; 5265a (14:665a)
TX_FAR _CardKeyFailText
db "@"
; d = Y
; e = X
-GetCoordsInFrontOfPlayer: ; 526fd (14:66fd)
+GetCoordsInFrontOfPlayer: ; 5265f (14:665f)
ld a, [wYCoord]
ld d, a
ld a, [wXCoord]