summaryrefslogtreecommitdiff
path: root/engine/overworld
diff options
context:
space:
mode:
authorpikalaxalt <PikalaxALT@gmail.com>2016-05-22 21:05:51 -0400
committerpikalaxalt <PikalaxALT@gmail.com>2016-05-22 21:05:51 -0400
commit980ce8005df3ff2c2d008f3fe2c36ed357b2a2cb (patch)
tree745646bc2baccb60da67d83e3428f4d62cd923c3 /engine/overworld
parent106251da1f1412dbca66db8c0e0fe7fe9eb63968 (diff)
parentf3de3a20dfccb8a57cdf9feb860bf1e89a733f50 (diff)
Merge branch 'master' of github.com:pret/pokeyellow
Diffstat (limited to 'engine/overworld')
-rwxr-xr-xengine/overworld/card_key.asm19
-rw-r--r--engine/overworld/dungeon_warps.asm15
-rwxr-xr-xengine/overworld/hidden_objects.asm16
3 files changed, 25 insertions, 25 deletions
diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm
index 74c0d489..48b2380d 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
TX_SFX_ITEM
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]
diff --git a/engine/overworld/dungeon_warps.asm b/engine/overworld/dungeon_warps.asm
new file mode 100644
index 00000000..b234c3a1
--- /dev/null
+++ b/engine/overworld/dungeon_warps.asm
@@ -0,0 +1,15 @@
+IsPlayerOnDungeonWarp: ; 46bf3 (11:6bf3)
+ xor a
+ ld [wWhichDungeonWarp], a
+ ld a, [wd72d]
+ bit 4, a
+ ret nz
+ call ArePlayerCoordsInArray
+ ret nc
+ ld a, [wCoordIndex]
+ ld [wWhichDungeonWarp], a
+ ld hl, wd72d
+ set 4, [hl]
+ ld hl, wd732
+ set 4, [hl]
+ ret \ No newline at end of file
diff --git a/engine/overworld/hidden_objects.asm b/engine/overworld/hidden_objects.asm
index 1fc20e5c..3774c482 100755
--- a/engine/overworld/hidden_objects.asm
+++ b/engine/overworld/hidden_objects.asm
@@ -1,19 +1,3 @@
-IsPlayerOnDungeonWarp: ; 46981 (11:6981)
- xor a
- ld [wWhichDungeonWarp], a
- ld a, [wd72d]
- bit 4, a
- ret nz
- call ArePlayerCoordsInArray
- ret nc
- ld a, [wCoordIndex]
- ld [wWhichDungeonWarp], a
- ld hl, wd72d
- set 4, [hl]
- ld hl, wd732
- set 4, [hl]
- ret
-
; if a hidden object was found, stores $00 in [$ffee], else stores $ff
CheckForHiddenObject: ; 469a0 (11:69a0)
ld hl, $ffeb