summaryrefslogtreecommitdiff
path: root/engine/overworld/dungeon_warps.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld/dungeon_warps.asm')
-rw-r--r--engine/overworld/dungeon_warps.asm15
1 files changed, 15 insertions, 0 deletions
diff --git a/engine/overworld/dungeon_warps.asm b/engine/overworld/dungeon_warps.asm
new file mode 100644
index 00000000..7641c688
--- /dev/null
+++ b/engine/overworld/dungeon_warps.asm
@@ -0,0 +1,15 @@
+IsPlayerOnDungeonWarp::
+ 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