aboutsummaryrefslogtreecommitdiffstats
path: root/engine/overworld/special_warps.asm
diff options
context:
space:
mode:
authorSylvie <35663410+Rangi42@users.noreply.github.com>2024-07-16 13:02:54 -0400
committerGitHub <noreply@github.com>2024-07-16 13:02:54 -0400
commit8fafca714c07500d1d87bba224f12cf9cc2c8789 (patch)
tree273ca88fcfcd80df9c318c9cb8d17a1f7aa240cb /engine/overworld/special_warps.asm
parentBuild with RGBDS 0.8.0, though it is not yet required (diff)
downloadpokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.gz
pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.tar.xz
pokeyellow-8fafca714c07500d1d87bba224f12cf9cc2c8789.zip
Identify various flag labels and bit constants (#454)
Diffstat (limited to 'engine/overworld/special_warps.asm')
-rw-r--r--engine/overworld/special_warps.asm30
1 files changed, 15 insertions, 15 deletions
diff --git a/engine/overworld/special_warps.asm b/engine/overworld/special_warps.asm
index 0cc2a474..303415c1 100644
--- a/engine/overworld/special_warps.asm
+++ b/engine/overworld/special_warps.asm
@@ -1,9 +1,9 @@
PrepareForSpecialWarp::
call LoadSpecialWarpData
predef LoadTilesetHeader
- ld hl, wd732
- bit 2, [hl] ; dungeon warp or fly warp?
- res 2, [hl]
+ ld hl, wStatusFlags6
+ bit BIT_FLY_OR_DUNGEON_WARP, [hl]
+ res BIT_FLY_OR_DUNGEON_WARP, [hl]
jr z, .debugNewGameWarp
ld a, [wDestinationMap]
jr .next
@@ -17,19 +17,19 @@ PrepareForSpecialWarp::
ld a, PALLET_TOWN
.next
ld b, a
- ld a, [wd72d]
- and a
+ ld a, [wStatusFlags3]
+ and a ; ???
jr nz, .next2
ld a, b
.next2
- ld hl, wd732
- bit 4, [hl] ; dungeon warp
+ ld hl, wStatusFlags6
+ bit BIT_DUNGEON_WARP, [hl]
ret nz
ld [wLastMap], a
ret
LoadSpecialWarpData:
- ld a, [wd72d]
+ ld a, [wCableClubDestinationMap]
cp TRADE_CENTER
jr nz, .notTradeCenter
ld hl, TradeCenterPlayerWarp
@@ -48,7 +48,7 @@ LoadSpecialWarpData:
ld hl, ColosseumFriendWarp
jr .copyWarpData
.notColosseum
- ld a, [wd732]
+ ld a, [wStatusFlags6]
bit BIT_DEBUG_MODE, a
; warp to wLastMap (PALLET_TOWN) for StartNewGameDebug
jr nz, .notNewGameWarp
@@ -70,17 +70,17 @@ LoadSpecialWarpData:
jr .done
.notNewGameWarp
ld a, [wLastMap] ; this value is overwritten before it's ever read
- ld hl, wd732
- bit 4, [hl] ; dungeon warp
+ ld hl, wStatusFlags6
+ bit BIT_DUNGEON_WARP, [hl]
jr nz, .usedDungeonWarp
- bit 6, [hl] ; blacked out
- res 6, [hl]
+ bit BIT_ESCAPE_WARP, [hl]
+ res BIT_ESCAPE_WARP, [hl]
jr z, .otherDestination
ld a, [wLastBlackoutMap]
jr .usedFlyWarp
.usedDungeonWarp
- ld hl, wd72d
- res 4, [hl]
+ ld hl, wStatusFlags3
+ res BIT_ON_DUNGEON_WARP, [hl]
ld a, [wDungeonWarpDestinationMap]
ld b, a
ld [wCurMap], a