summaryrefslogtreecommitdiff
path: root/engine/overworld/hidden_objects.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld/hidden_objects.asm')
-rwxr-xr-xengine/overworld/hidden_objects.asm10
1 files changed, 5 insertions, 5 deletions
diff --git a/engine/overworld/hidden_objects.asm b/engine/overworld/hidden_objects.asm
index ae67aeed..cabfc093 100755
--- a/engine/overworld/hidden_objects.asm
+++ b/engine/overworld/hidden_objects.asm
@@ -1,4 +1,4 @@
-Func_46981: ; 46981 (11:6981)
+IsPlayerOnDungeonWarp: ; 46981 (11:6981)
xor a
ld [wWhichDungeonWarp], a
ld a, [wd72d]
@@ -6,7 +6,7 @@ Func_46981: ; 46981 (11:6981)
ret nz
call ArePlayerCoordsInArray
ret nc
- ld a, [wWhichTrade]
+ ld a, [wCoordIndex]
ld [wWhichDungeonWarp], a
ld hl, wd72d
set 4, [hl]
@@ -58,7 +58,7 @@ CheckForHiddenObject: ; 469a0 (11:69a0)
ld [wHiddenObjectX], a
ld c, a
call CheckIfCoordsInFrontOfPlayerMatch
- ld a, [$ffea]
+ ld a, [hCoordsInFrontOfPlayerMatch]
and a
jr z, .foundMatchingObject
inc hl
@@ -85,7 +85,7 @@ CheckForHiddenObject: ; 469a0 (11:69a0)
ret
; checks if the coordinates in front of the player's sprite match Y in b and X in c
-; [$ffea] = $00 if they match, $ff if they don't match
+; [hCoordsInFrontOfPlayerMatch] = $00 if they match, $ff if they don't match
CheckIfCoordsInFrontOfPlayerMatch: ; 46a01 (11:6a01)
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
cp SPRITE_FACING_UP
@@ -127,7 +127,7 @@ CheckIfCoordsInFrontOfPlayerMatch: ; 46a01 (11:6a01)
.didNotMatch
ld a, $ff
.done
- ld [$ffea], a
+ ld [hCoordsInFrontOfPlayerMatch], a
ret
INCLUDE "data/hidden_objects.asm"