Skip to content

Commit 0fe542b

Browse files
committed
Shift status flags
1 parent ef89e35 commit 0fe542b

25 files changed

+50
-52
lines changed

constants/ram_constants.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ DEF NUM_BADGES EQU const_value
8484
const BIT_NO_TEXT_DELAY ; 6
8585
const BIT_SCRIPTED_MOVEMENT_STATE ; 7
8686

87-
; wStatusFlags6
87+
; wWarpFlags
8888
const_def
8989
const BIT_GAME_TIMER_COUNTING ; 0
9090
const BIT_DEBUG_MODE ; 1

engine/battle/core.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,9 +1157,9 @@ HandlePlayerBlackOut:
11571157
ld hl, LinkBattleLostText
11581158
.noLinkBattle
11591159
call PrintText
1160-
ld a, [wStatusFlags6]
1160+
ld a, [wWarpFlags]
11611161
res BIT_ALWAYS_ON_BIKE, a
1162-
ld [wStatusFlags6], a
1162+
ld [wWarpFlags], a
11631163
call ClearScreen
11641164
scf
11651165
ret
@@ -6776,7 +6776,7 @@ InitOpponent:
67766776
jr InitBattleCommon
67776777

67786778
DetermineWildOpponent:
6779-
ld a, [wStatusFlags6]
6779+
ld a, [wWarpFlags]
67806780
bit BIT_DEBUG_MODE, a
67816781
jr z, .notDebugMode
67826782
ldh a, [hJoyHeld]

engine/debug/debug_menu.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ IF DEF(_DEBUG)
5555
jp z, TestBattle
5656

5757
; DEBUG
58-
ld hl, wStatusFlags6
58+
ld hl, wWarpFlags
5959
set BIT_DEBUG_MODE, [hl]
6060
jp StartNewGameDebug
6161

engine/events/black_out.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ResetStatusAndHalveMoneyOnBlackout::
3737
ld [wPlayerMoney + 2], a
3838

3939
.lostmoney
40-
ld hl, wStatusFlags6
40+
ld hl, wWarpFlags
4141
set BIT_FLY_OR_DUNGEON_WARP, [hl]
4242
res BIT_FLY_WARP, [hl]
4343
set BIT_ESCAPE_WARP, [hl]

engine/items/item_effects.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ ItemUseEscapeRope:
15051505
jr z, .notUsable
15061506
cp b
15071507
jr nz, .loop
1508-
ld hl, wStatusFlags6
1508+
ld hl, wWarpFlags
15091509
set BIT_FLY_WARP, [hl]
15101510
set BIT_ESCAPE_WARP, [hl]
15111511
ld hl, wStatusFlags4

engine/items/town_map.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ LoadTownMap_Fly::
208208
call PlaySound
209209
ld a, [hl]
210210
ld [wDestinationMap], a
211-
ld hl, wStatusFlags6
211+
ld hl, wWarpFlags
212212
set BIT_FLY_WARP, [hl]
213-
assert wStatusFlags6 + 1 == wStatusFlags7
213+
assert wWarpFlags + 1 == wStatusFlags7
214214
inc hl
215215
set BIT_USED_FLY, [hl]
216216
.pressedB

engine/menus/main_menu.asm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ MainMenu:
119119
jp nz, SpecialEnterMap
120120
xor a
121121
ld [wDestinationMap], a
122-
ld hl, wStatusFlags6
122+
ld hl, wWarpFlags
123123
set BIT_FLY_OR_DUNGEON_WARP, [hl]
124124
call PrepareForSpecialWarp
125125
jp SpecialEnterMap
@@ -272,7 +272,7 @@ LinkMenu:
272272
call PrintText
273273
ld c, 50
274274
call DelayFrames
275-
ld hl, wStatusFlags6
275+
ld hl, wWarpFlags
276276
res BIT_DEBUG_MODE, [hl]
277277
ld a, [wDefaultMap]
278278
ld [wDestinationMap], a
@@ -312,7 +312,7 @@ LinkCanceledText:
312312
text_end
313313

314314
StartNewGame:
315-
ld hl, wStatusFlags6
315+
ld hl, wWarpFlags
316316
; Ensure debug mode is not used when starting a regular new game.
317317
; Debug mode persists in saved games for both debug and non-debug builds, and is
318318
; only reset here by the main menu.
@@ -330,7 +330,7 @@ SpecialEnterMap::
330330
ldh [hJoyHeld], a
331331
ldh [hJoy5], a
332332
ld [wCableClubDestinationMap], a
333-
ld hl, wStatusFlags6
333+
ld hl, wWarpFlags
334334
set BIT_GAME_TIMER_COUNTING, [hl]
335335
call ResetPlayerSpriteData
336336
ld c, 20

engine/menus/start_sub_menus.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ StartMenu_Pokemon::
142142
jp .loop
143143
.canFly
144144
call ChooseFlyDestination
145-
ld a, [wStatusFlags6]
145+
ld a, [wWarpFlags]
146146
bit BIT_FLY_WARP, a
147147
jp nz, .goBackToMap
148148
call LoadFontTilePatterns
@@ -214,7 +214,7 @@ StartMenu_Pokemon::
214214
.canTeleport
215215
ld hl, .warpToLastPokemonCenterText
216216
call PrintText
217-
ld hl, wStatusFlags6
217+
ld hl, wWarpFlags
218218
set BIT_FLY_WARP, [hl]
219219
set BIT_ESCAPE_WARP, [hl]
220220
ld hl, wStatusFlags4
@@ -371,7 +371,7 @@ StartMenu_Item::
371371
ld a, [wcf91]
372372
cp BICYCLE
373373
jr nz, .notBicycle2
374-
ld a, [wStatusFlags6]
374+
ld a, [wWarpFlags]
375375
bit BIT_ALWAYS_ON_BIKE, a
376376
jr z, .useItem_closeMenu
377377
ld hl, CannotGetOffHereText

engine/movie/oak_speech/oak_speech.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PrepareOakSpeech:
88
; which causes CheckForceBikeOrSurf to not return.
99
; To fix this in debug builds, reset bit 5 here or in StartNewGame.
1010
; In non-debug builds, the instructions can be removed.
11-
ld a, [wStatusFlags6]
11+
ld a, [wWarpFlags]
1212
push af
1313
ld hl, wPlayerName
1414
ld bc, wBoxDataEnd - wPlayerName
@@ -19,7 +19,7 @@ PrepareOakSpeech:
1919
xor a
2020
call FillMemory
2121
pop af
22-
ld [wStatusFlags6], a
22+
ld [wWarpFlags], a
2323
pop af
2424
ld [wOptions], a
2525
pop af
@@ -61,7 +61,7 @@ OakSpeech:
6161
call PrepareForSpecialWarp
6262
xor a
6363
ldh [hTileAnimations], a
64-
ld a, [wStatusFlags6]
64+
ld a, [wWarpFlags]
6565
bit BIT_DEBUG_MODE, a
6666
jp nz, .skipSpeech
6767
ld de, ProfOakPic

engine/movie/title.asm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ PrepareTitleScreen::
1515
xor a
1616
ldh [hWY], a
1717
ld [wLetterPrintingDelayFlags], a
18-
ld hl, wStatusFlags6
18+
ld hl, wWarpFlags
1919
ld [hli], a
20-
ld [hli], a ; wStatusFlags7
21-
ld [hl], a ; wElite4Flags
20+
assert wWarpFlags + 1 == wStatusFlags7
21+
ld [hli], a
22+
assert wStatusFlags7 + 1 == wElite4Flags
23+
ld [hl], a
2224
ld a, BANK(Music_TitleScreen)
2325
ld [wAudioROMBank], a
2426
ld [wAudioSavedROMBank], a

0 commit comments

Comments
 (0)