aboutsummaryrefslogtreecommitdiffstats
path: root/engine/special_warps.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-05-20 19:40:33 -0500
committerdannye <33dannye@gmail.com>2020-05-20 20:02:53 -0500
commit10f9559eab8c93b94abb8ae8d1083704ad4e169a (patch)
tree7dbe7b152dde8a6e9b56664b5b8cdfc0d6be1253 /engine/special_warps.asm
parentMerge pull request #39 from TiKevin83/master (diff)
downloadpokeyellow-10f9559eab8c93b94abb8ae8d1083704ad4e169a.tar.gz
pokeyellow-10f9559eab8c93b94abb8ae8d1083704ad4e169a.tar.xz
pokeyellow-10f9559eab8c93b94abb8ae8d1083704ad4e169a.zip
Sync with pokered
Diffstat (limited to '')
-rw-r--r--engine/special_warps.asm (renamed from engine/overworld/special_warps.asm)32
1 files changed, 17 insertions, 15 deletions
diff --git a/engine/overworld/special_warps.asm b/engine/special_warps.asm
index 4814e668..3a8b8b86 100644
--- a/engine/overworld/special_warps.asm
+++ b/engine/special_warps.asm
@@ -1,31 +1,31 @@
SpecialWarpIn:
call LoadSpecialWarpData
predef LoadTilesetHeader
- ld hl,wd732
- bit 2,[hl] ; dungeon warp or fly warp?
- res 2,[hl]
- jr z,.next
+ ld hl, wd732
+ bit 2, [hl] ; dungeon warp or fly warp?
+ res 2, [hl]
+ jr z, .next
; if dungeon warp or fly warp
- ld a,[wDestinationMap]
+ ld a, [wDestinationMap]
jr .next2
.next
- bit 1,[hl]
- jr z,.next3
+ bit 1, [hl]
+ jr z, .next3
call EmptyFunc
.next3
- ld a,0
+ ld a, 0
.next2
- ld b,a
- ld a,[wd72d]
+ ld b, a
+ ld a, [wd72d]
and a
- jr nz,.next4
- ld a,b
+ jr nz, .next4
+ ld a, b
.next4
- ld hl,wd732
- bit 4,[hl] ; dungeon warp?
+ ld hl, wd732
+ bit 4, [hl] ; dungeon warp?
ret nz
; if not dungeon warp
- ld [wLastMap],a
+ ld [wLastMap], a
ret
; gets the map ID, tile block map view pointer, tileset, and coordinates
@@ -145,3 +145,5 @@ LoadSpecialWarpData:
ld a, $ff ; the player's coordinates have already been updated using a special warp, so don't use any of the normal warps
ld [wDestinationWarpID], a
ret
+
+INCLUDE "data/special_warps.asm"