shithub: pokecrystal

Download patch

ref: 9457679af8d36a140db7b8832df595e8310e6bb4
parent: e2b378f5e32ea1416fbc9ac5e96d23be244e4a6b
author: xCrystal <rgr.crystal@gmail.com>
date: Thu Dec 28 08:15:46 EST 2017

Prefix engine_flags wram addresses with w

--- a/constants/engine_flags.asm
+++ b/constants/engine_flags.asm
@@ -16,7 +16,7 @@
 	const ENGINE_DST
 ; wUnusedTwoDayTimerOn
 	const ENGINE_0A
-; StatusFlags
+; wStatusFlags
 	const ENGINE_POKEDEX
 	const ENGINE_UNOWN_DEX
 	const ENGINE_POKERUS
@@ -23,7 +23,7 @@
 	const ENGINE_ROCKET_SIGNAL_ON_CH20
 	const ENGINE_CREDITS_SKIP
 	const ENGINE_BUG_CONTEST_ON ; 10
-; StatusFlags2
+; wStatusFlags2
 	const ENGINE_BUG_CONTEST_TIMER
 	const ENGINE_SAFARI_ZONE
 	const ENGINE_ROCKETS_IN_RADIO_TOWER
@@ -31,11 +31,11 @@
 	const ENGINE_GIVE_POKERUS
 	const ENGINE_FLORIA
 	const ENGINE_ROCKETS_IN_MAHOGANY
-; BikeFlags
+; wBikeFlags
 	const ENGINE_STRENGTH_ACTIVE
 	const ENGINE_ALWAYS_ON_BIKE
 	const ENGINE_DOWNHILL
-; JohtoBadges
+; wJohtoBadges
 	const ENGINE_ZEPHYRBADGE
 	const ENGINE_HIVEBADGE
 	const ENGINE_PLAINBADGE
@@ -44,7 +44,7 @@
 	const ENGINE_STORMBADGE ; 20
 	const ENGINE_GLACIERBADGE
 	const ENGINE_RISINGBADGE
-; KantoBadges
+; wKantoBadges
 	const ENGINE_BOULDERBADGE
 	const ENGINE_CASCADEBADGE
 	const ENGINE_THUNDERBADGE
@@ -53,7 +53,7 @@
 	const ENGINE_MARSHBADGE
 	const ENGINE_VOLCANOBADGE
 	const ENGINE_EARTHBADGE
-; UnlockedUnowns
+; wUnlockedUnowns
 	const ENGINE_UNLOCKED_UNOWNS_1
 	const ENGINE_UNLOCKED_UNOWNS_2
 	const ENGINE_UNLOCKED_UNOWNS_3
@@ -62,7 +62,7 @@
 	const ENGINE_UNLOCKED_UNOWNS_6 ; 30
 	const ENGINE_UNLOCKED_UNOWNS_7
 	const ENGINE_UNLOCKED_UNOWNS_8
-; VisitedSpawns
+; wVisitedSpawns
 	const ENGINE_FLYPOINT_KRISS_HOUSE
 	const ENGINE_FLYPOINT_VIRIDIAN_POKECENTER
 	const ENGINE_FLYPOINT_PALLET
@@ -92,9 +92,9 @@
 	const ENGINE_FLYPOINT_UNUSED
 ; wLuckyNumberShowFlag
 	const ENGINE_LUCKY_NUMBER_SHOW
-; StatusFlags2
+; wStatusFlags2
 	const ENGINE_4F
-; DailyFlags
+; wDailyFlags
 	const ENGINE_KURT_MAKING_BALLS ; 50
 	const ENGINE_DAILY_BUG_CONTEST
 	const ENGINE_SPECIAL_WILDDATA
@@ -103,7 +103,7 @@
 	const ENGINE_SHUCKLE_GIVEN
 	const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
 	const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
-; WeeklyFlags
+; wWeeklyFlags
 	const ENGINE_MT_MOON_SQUARE_CLEFAIRY
 	const ENGINE_UNION_CAVE_LAPRAS
 	const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
@@ -112,12 +112,12 @@
 	const ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
 	const ENGINE_DAILY_MOVE_TUTOR
 	const ENGINE_BUENAS_PASSWORD
-; SwarmFlags
+; wSwarmFlags
 	const ENGINE_BUENAS_PASSWORD_2 ; 60
 	const ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
-; GameTimerPause
+; wGameTimerPause
 	const ENGINE_62
-; PlayerGender
+; wPlayerGender
 	const ENGINE_PLAYER_IS_FEMALE
 ; wCelebiEvent
 	const ENGINE_HAVE_EXAMINED_GS_BALL
@@ -184,7 +184,7 @@
 	const ENGINE_ERIN_SATURDAY_NIGHT
 ; wPlayerSpriteSetupFlags
 	const ENGINE_KRIS_IN_CABLE_CLUB
-; SwarmFlags
+; wSwarmFlags
 	const ENGINE_DUNSPARCE_SWARM ; a0
 	const ENGINE_YANMA_SWARM
 NUM_ENGINE_FLAGS EQU const_value
--- a/constants/wram_constants.asm
+++ b/constants/wram_constants.asm
@@ -131,7 +131,7 @@
 	const DEXMODE_ABC
 	const DEXMODE_UNOWN
 
-; JohtoBadges:
+; wJohtoBadges:
 	const_def
 	const ZEPHYRBADGE
 	const HIVEBADGE
@@ -143,7 +143,7 @@
 	const RISINGBADGE
 NUM_JOHTO_BADGES EQU const_value
 
-; KantoBadges:
+; wKantoBadges:
 	const_def
 	const BOULDERBADGE
 	const CASCADEBADGE
--- a/data/engine_flags.asm
+++ b/data/engine_flags.asm
@@ -26,110 +26,110 @@
 
 	engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer
 
-	engine_flag StatusFlags, 0 ; pokedex
-	engine_flag StatusFlags, 1 ; unown dex
-	engine_flag StatusFlags, 3 ; pokerus
-	engine_flag StatusFlags, 4 ; rocket signal on ch20
-	engine_flag StatusFlags, 6 ; credits skip
-	engine_flag StatusFlags, 7 ; bug contest on   ; $10
-	engine_flag StatusFlags2, 2 ; bug contest timer
-	engine_flag StatusFlags2, 1 ; safari zone?
-	engine_flag StatusFlags2, 0 ; rockets in radio tower
-	engine_flag StatusFlags2, 4 ; bike shop call enabled (1024 bike steps reqd)
-	engine_flag StatusFlags2, 5 ; give pokerus
-	engine_flag StatusFlags2, 6 ; berry -> berry juice when trading?
-	engine_flag StatusFlags2, 7 ; rockets in mahogany
+	engine_flag wStatusFlags, 0 ; pokedex
+	engine_flag wStatusFlags, 1 ; unown dex
+	engine_flag wStatusFlags, 3 ; pokerus
+	engine_flag wStatusFlags, 4 ; rocket signal on ch20
+	engine_flag wStatusFlags, 6 ; credits skip
+	engine_flag wStatusFlags, 7 ; bug contest on   ; $10
+	engine_flag wStatusFlags2, 2 ; bug contest timer
+	engine_flag wStatusFlags2, 1 ; safari zone?
+	engine_flag wStatusFlags2, 0 ; rockets in radio tower
+	engine_flag wStatusFlags2, 4 ; bike shop call enabled (1024 bike steps reqd)
+	engine_flag wStatusFlags2, 5 ; give pokerus
+	engine_flag wStatusFlags2, 6 ; berry -> berry juice when trading?
+	engine_flag wStatusFlags2, 7 ; rockets in mahogany
 
-	engine_flag BikeFlags, 0 ; strength active  ; $18
-	engine_flag BikeFlags, 1 ; always on bike (cant surf)
-	engine_flag BikeFlags, 2 ; downhill (cycling road)
+	engine_flag wBikeFlags, 0 ; strength active  ; $18
+	engine_flag wBikeFlags, 1 ; always on bike (cant surf)
+	engine_flag wBikeFlags, 2 ; downhill (cycling road)
 
-	engine_flag JohtoBadges, 0 ; zephyrbadge
-	engine_flag JohtoBadges, 1 ; hivebadge
-	engine_flag JohtoBadges, 2 ; plainbadge
-	engine_flag JohtoBadges, 3 ; fogbadge
-	engine_flag JohtoBadges, 4 ; mineralbadge
-	engine_flag JohtoBadges, 5 ; stormbadge ; $20
-	engine_flag JohtoBadges, 6 ; glacierbadge
-	engine_flag JohtoBadges, 7 ; risingbadge
+	engine_flag wJohtoBadges, 0 ; zephyrbadge
+	engine_flag wJohtoBadges, 1 ; hivebadge
+	engine_flag wJohtoBadges, 2 ; plainbadge
+	engine_flag wJohtoBadges, 3 ; fogbadge
+	engine_flag wJohtoBadges, 4 ; mineralbadge
+	engine_flag wJohtoBadges, 5 ; stormbadge ; $20
+	engine_flag wJohtoBadges, 6 ; glacierbadge
+	engine_flag wJohtoBadges, 7 ; risingbadge
 
-	engine_flag KantoBadges, 0 ; boulderbadge
-	engine_flag KantoBadges, 1 ; cascadebadge
-	engine_flag KantoBadges, 2 ; thunderbadge
-	engine_flag KantoBadges, 3 ; rainbowbadge
-	engine_flag KantoBadges, 4 ; soulbadge
-	engine_flag KantoBadges, 5 ; marshbadge ; $28
-	engine_flag KantoBadges, 6 ; volcanobadge
-	engine_flag KantoBadges, 7 ; earthbadge
+	engine_flag wKantoBadges, 0 ; boulderbadge
+	engine_flag wKantoBadges, 1 ; cascadebadge
+	engine_flag wKantoBadges, 2 ; thunderbadge
+	engine_flag wKantoBadges, 3 ; rainbowbadge
+	engine_flag wKantoBadges, 4 ; soulbadge
+	engine_flag wKantoBadges, 5 ; marshbadge ; $28
+	engine_flag wKantoBadges, 6 ; volcanobadge
+	engine_flag wKantoBadges, 7 ; earthbadge
 
 	; unown sets
-	engine_flag UnlockedUnowns, 0 ; 1
-	engine_flag UnlockedUnowns, 1 ; 2
-	engine_flag UnlockedUnowns, 2 ; 3
-	engine_flag UnlockedUnowns, 3 ; 4
-	engine_flag UnlockedUnowns, 4 ; 5
-	engine_flag UnlockedUnowns, 5 ; 6       ; $30
-	engine_flag UnlockedUnowns, 6 ; 7
-	engine_flag UnlockedUnowns, 7 ; 8
+	engine_flag wUnlockedUnowns, 0 ; 1
+	engine_flag wUnlockedUnowns, 1 ; 2
+	engine_flag wUnlockedUnowns, 2 ; 3
+	engine_flag wUnlockedUnowns, 3 ; 4
+	engine_flag wUnlockedUnowns, 4 ; 5
+	engine_flag wUnlockedUnowns, 5 ; 6       ; $30
+	engine_flag wUnlockedUnowns, 6 ; 7
+	engine_flag wUnlockedUnowns, 7 ; 8
 
 	; fly
-	engine_flag VisitedSpawns, 0     ; your house
-	engine_flag VisitedSpawns, 1     ; viridian pokecenter
-	engine_flag VisitedSpawns, 2     ; pallet
-	engine_flag VisitedSpawns, 3     ; viridian
-	engine_flag VisitedSpawns, 4     ; pewter
-	engine_flag VisitedSpawns, 5     ; cerulean ; $38
-	engine_flag VisitedSpawns, 6     ; rock tunnel
-	engine_flag VisitedSpawns, 7     ; vermilion
-	engine_flag VisitedSpawns + 1, 0 ; lavender
-	engine_flag VisitedSpawns + 1, 1 ; saffron
-	engine_flag VisitedSpawns + 1, 2 ; celadon
-	engine_flag VisitedSpawns + 1, 3 ; fuchsia
-	engine_flag VisitedSpawns + 1, 4 ; cinnabar
-	engine_flag VisitedSpawns + 1, 5 ; indigo plateau ; $40
-	engine_flag VisitedSpawns + 1, 6 ; new bark
-	engine_flag VisitedSpawns + 1, 7 ; cherrygrove
-	engine_flag VisitedSpawns + 2, 0 ; violet
-	                                 ; union cave
-	engine_flag VisitedSpawns + 2, 2 ; azalea
-	engine_flag VisitedSpawns + 2, 3 ; cianwood
-	engine_flag VisitedSpawns + 2, 4 ; goldenrod
-	engine_flag VisitedSpawns + 2, 5 ; olivine
-	engine_flag VisitedSpawns + 2, 6 ; ecruteak  ; $48
-	engine_flag VisitedSpawns + 2, 7 ; mahogany
-	engine_flag VisitedSpawns + 3, 0 ; lake of rage
-	engine_flag VisitedSpawns + 3, 1 ; blackthorn
-	engine_flag VisitedSpawns + 3, 2 ; silver cave
-	                                 ; fast ship
-	engine_flag VisitedSpawns + 3, 4 ; unused
+	engine_flag wVisitedSpawns, 0     ; your house
+	engine_flag wVisitedSpawns, 1     ; viridian pokecenter
+	engine_flag wVisitedSpawns, 2     ; pallet
+	engine_flag wVisitedSpawns, 3     ; viridian
+	engine_flag wVisitedSpawns, 4     ; pewter
+	engine_flag wVisitedSpawns, 5     ; cerulean ; $38
+	engine_flag wVisitedSpawns, 6     ; rock tunnel
+	engine_flag wVisitedSpawns, 7     ; vermilion
+	engine_flag wVisitedSpawns + 1, 0 ; lavender
+	engine_flag wVisitedSpawns + 1, 1 ; saffron
+	engine_flag wVisitedSpawns + 1, 2 ; celadon
+	engine_flag wVisitedSpawns + 1, 3 ; fuchsia
+	engine_flag wVisitedSpawns + 1, 4 ; cinnabar
+	engine_flag wVisitedSpawns + 1, 5 ; indigo plateau ; $40
+	engine_flag wVisitedSpawns + 1, 6 ; new bark
+	engine_flag wVisitedSpawns + 1, 7 ; cherrygrove
+	engine_flag wVisitedSpawns + 2, 0 ; violet
+	                                  ; union cave
+	engine_flag wVisitedSpawns + 2, 2 ; azalea
+	engine_flag wVisitedSpawns + 2, 3 ; cianwood
+	engine_flag wVisitedSpawns + 2, 4 ; goldenrod
+	engine_flag wVisitedSpawns + 2, 5 ; olivine
+	engine_flag wVisitedSpawns + 2, 6 ; ecruteak  ; $48
+	engine_flag wVisitedSpawns + 2, 7 ; mahogany
+	engine_flag wVisitedSpawns + 3, 0 ; lake of rage
+	engine_flag wVisitedSpawns + 3, 1 ; blackthorn
+	engine_flag wVisitedSpawns + 3, 2 ; silver cave
+	                                  ; fast ship
+	engine_flag wVisitedSpawns + 3, 4 ; unused
 
 	engine_flag wLuckyNumberShowFlag, 0 ; lucky number show
-	engine_flag StatusFlags2, 3 ; ????
+	engine_flag wStatusFlags2, 3 ; ????
 
-	engine_flag DailyFlags, 0 ; kurt making balls  ; $50
-	engine_flag DailyFlags, 1 ; ????
-	engine_flag DailyFlags, 2 ; special wilddata?
-	engine_flag DailyFlags, 3 ; time capsule (24h wait)
-	engine_flag DailyFlags, 4 ; all fruit trees
-	engine_flag DailyFlags, 5 ; shuckle given
-	engine_flag DailyFlags, 6 ; goldenrod underground merchant closed
-	engine_flag DailyFlags, 7 ; fought in trainer hall today
+	engine_flag wDailyFlags, 0 ; kurt making balls  ; $50
+	engine_flag wDailyFlags, 1 ; ????
+	engine_flag wDailyFlags, 2 ; special wilddata?
+	engine_flag wDailyFlags, 3 ; time capsule (24h wait)
+	engine_flag wDailyFlags, 4 ; all fruit trees
+	engine_flag wDailyFlags, 5 ; shuckle given
+	engine_flag wDailyFlags, 6 ; goldenrod underground merchant closed
+	engine_flag wDailyFlags, 7 ; fought in trainer hall today
 
-	engine_flag WeeklyFlags, 0 ; mt moon square clefairy  ; $58
-	engine_flag WeeklyFlags, 1 ; union cave lapras
-	engine_flag WeeklyFlags, 2 ; goldenrod underground haircut used
-	engine_flag WeeklyFlags, 3 ; goldenrod mall happiness event floor05 object07
-	engine_flag WeeklyFlags, 4 ; tea in blues house
-	engine_flag WeeklyFlags, 5 ; indigo plateau rival fight
-	engine_flag WeeklyFlags, 6 ; move tutor
-	engine_flag WeeklyFlags, 7 ; buenas password
+	engine_flag wWeeklyFlags, 0 ; mt moon square clefairy  ; $58
+	engine_flag wWeeklyFlags, 1 ; union cave lapras
+	engine_flag wWeeklyFlags, 2 ; goldenrod underground haircut used
+	engine_flag wWeeklyFlags, 3 ; goldenrod mall happiness event floor05 object07
+	engine_flag wWeeklyFlags, 4 ; tea in blues house
+	engine_flag wWeeklyFlags, 5 ; indigo plateau rival fight
+	engine_flag wWeeklyFlags, 6 ; move tutor
+	engine_flag wWeeklyFlags, 7 ; buenas password
 
-	engine_flag SwarmFlags, 0 ; buenas password 2
-	engine_flag SwarmFlags, 1 ; goldenrod dept store sale is on
+	engine_flag wSwarmFlags, 0 ; buenas password 2
+	engine_flag wSwarmFlags, 1 ; goldenrod dept store sale is on
 
-	engine_flag GameTimerPause, 7 ; $62
+	engine_flag wGameTimerPause, 7 ; $62
 
-	engine_flag PlayerGender, 0 ; player is female
+	engine_flag wPlayerGender, 0 ; player is female
 
 	engine_flag wCelebiEvent, 2 ; have gs ball after kurt examined it
 
@@ -200,7 +200,7 @@
 
 	engine_flag wPlayerSpriteSetupFlags, 2 ; female player has been transformed into male
 
-	engine_flag SwarmFlags, 2 ; dunsparce swarm   ; $a0
-	engine_flag SwarmFlags, 3 ; yanma swarm
+	engine_flag wSwarmFlags, 2 ; dunsparce swarm   ; $a0
+	engine_flag wSwarmFlags, 3 ; yanma swarm
 
 ; 80648
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -6695,7 +6695,7 @@
 CheckUnownLetter: ; 3eb75
 ; Return carry if the Unown letter hasn't been unlocked yet
 
-	ld a, [UnlockedUnowns]
+	ld a, [wUnlockedUnowns]
 	ld c, a
 	ld de, 0
 
@@ -7074,7 +7074,7 @@
 	and a
 	ret nz
 
-	ld a, [JohtoBadges]
+	ld a, [wJohtoBadges]
 
 ; Swap badges 3 (PlainBadge) and 5 (MineralBadge).
 	ld d, a
@@ -9349,7 +9349,7 @@
 	ld a, [wPlayerSpriteSetupFlags]
 	bit 2, a ; transformed to male
 	jr nz, .Chris
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .Chris
 
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -726,7 +726,7 @@
 
 .obeylevel
 	; The maximum obedience level is constrained by owned badges:
-	ld hl, JohtoBadges
+	ld hl, wJohtoBadges
 
 	; risingbadge
 	bit RISINGBADGE, [hl]
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
@@ -176,9 +176,9 @@
 
 	ld hl, .BadgeTypes
 
-	ld a, [KantoBadges]
+	ld a, [wKantoBadges]
 	ld b, a
-	ld a, [JohtoBadges]
+	ld a, [wJohtoBadges]
 	ld c, a
 
 .CheckBadge:
--- a/engine/caught_data.asm
+++ b/engine/caught_data.asm
@@ -193,7 +193,7 @@
 .NotPokecenter2F:
 	call GetWorldMapLocation
 	ld b, a
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	rrca
 	or b
 	ld [hl], a
--- a/engine/cgb_layouts.asm
+++ b/engine/cgb_layouts.asm
@@ -183,7 +183,7 @@
 ; 8eb9
 
 _CGB_PokegearPals: ; 8eb9
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .male
 	ld hl, FemalePokegearPals
@@ -719,7 +719,7 @@
 	; fill screen with opposite-gender palette for the card border
 	hlcoord 0, 0, AttrMap
 	ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	and a
 	ld a, $1 ; kris
 	jr z, .got_gender
@@ -729,7 +729,7 @@
 	; fill trainer sprite area with same-gender palette
 	hlcoord 14, 1, AttrMap
 	lb bc, 7, 5
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	and a
 	ld a, $0 ; chris
 	jr z, .got_gender2
@@ -768,7 +768,7 @@
 	ld a, $7 ; pryce
 	call FillBoxCGB
 	; clair uses kris's palette
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	and a
 	push af
 	jr z, .got_gender3
@@ -847,7 +847,7 @@
 	cp BATTLETYPE_TUTORIAL
 	jr z, .tutorial_male
 
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .tutorial_male
 
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -718,7 +718,7 @@
 	ld a, [wPlayerSpriteSetupFlags]
 	bit 2, a ; transformed to male
 	jr nz, .male
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	and a
 	jr z, .male
 	ld hl, KrisPalette
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -491,7 +491,7 @@
 	and a
 	jr nz, .nothing
 
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 2, [hl] ; bug contest
 	jr z, .do_daily
 
--- a/engine/events/field_moves.asm
+++ b/engine/events/field_moves.asm
@@ -8,7 +8,7 @@
 
 BlindingFlash: ; 8c7e1
 	farcall FadeOutPalettes
-	ld hl, StatusFlags
+	ld hl, wStatusFlags
 	set 2, [hl] ; Flash
 	farcall ReplaceTimeOfDayPals
 	farcall UpdateTimeOfDayPal
--- a/engine/events/fish.asm
+++ b/engine/events/fish.asm
@@ -97,7 +97,7 @@
 ; Return the index of fishgroup d in de.
 
 	push hl
-	ld hl, DailyFlags
+	ld hl, wDailyFlags
 	bit 2, [hl]
 	pop hl
 	jr z, .done
--- a/engine/events/fruit_trees.asm
+++ b/engine/events/fruit_trees.asm
@@ -43,7 +43,7 @@
 ; 4404c
 
 TryResetFruitTrees: ; 4404c
-	ld hl, DailyFlags
+	ld hl, wDailyFlags
 	bit 4, [hl]
 	ret nz
 	jp ResetFruitTrees
@@ -70,7 +70,7 @@
 	ld [hli], a
 	ld [hli], a
 	ld [hl], a
-	ld hl, DailyFlags
+	ld hl, wDailyFlags
 	set 4, [hl]
 	ret
 ; 44078
--- a/engine/events/halloffame.asm
+++ b/engine/events/halloffame.asm
@@ -2,7 +2,7 @@
 
 HallOfFame:: ; 0x8640e
 	call HallOfFame_FadeOutMusic
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	push af
 	ld a, 1
 	ld [wGameLogicPaused], a
@@ -11,7 +11,7 @@
 	ld [wSpawnAfterChampion], a
 
 	; Enable the Pokégear map to cycle through all of Kanto
-	ld hl, StatusFlags
+	ld hl, wStatusFlags
 	set 6, [hl] ; hall of fame
 
 	farcall HallOfFame_InitSaveIfNeeded
@@ -52,7 +52,7 @@
 	call DisableSpriteUpdates
 	ld a, SPAWN_RED
 	ld [wSpawnAfterChampion], a
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	ld b, a
 	farcall Credits
 	ret
--- a/engine/events/magnet_train.asm
+++ b/engine/events/magnet_train.asm
@@ -328,7 +328,7 @@
 	push af
 	ld a, $1
 	ld [rSVBK], a
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .got_gender
 	ld b, SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE
--- a/engine/events/overworld.asm
+++ b/engine/events/overworld.asm
@@ -358,7 +358,7 @@
 	ld de, ENGINE_FOGBADGE
 	call CheckBadge
 	jr c, .asm_c956
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	bit 1, [hl] ; always on bike
 	jr nz, .cannotsurf
 	ld a, [PlayerState]
@@ -520,7 +520,7 @@
 	call CheckPartyMove
 	jr c, .quit
 
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	bit 1, [hl] ; always on bike (can't surf)
 	jr nz, .quit
 
@@ -1008,7 +1008,7 @@
 	ret
 
 SetStrengthFlag: ; cd12
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	set 0, [hl]
 	ld a, [CurPartyMon]
 	ld e, a
@@ -1086,7 +1086,7 @@
 	call CheckEngineFlag
 	jr c, .nope
 
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	bit 0, [hl]
 	jr z, .already_using
 
@@ -1683,7 +1683,7 @@
 	ret
 
 .GetOffBike:
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	bit 1, [hl]
 	jr nz, .CantGetOffBike
 	ld hl, Script_GetOffBike
--- a/engine/events/pokerus/pokerus.asm
+++ b/engine/events/pokerus/pokerus.asm
@@ -18,7 +18,7 @@
 
 ; If we haven't been to Goldenrod City at least once,
 ; prevent the contraction of Pokerus.
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 6, [hl]
 	ret z
 	call Random
@@ -123,7 +123,7 @@
 
 ; any berry held by a Shuckle may be converted to berry juice
 ConvertBerriesToBerryJuice: ; 2ede6
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 6, [hl]
 	ret z
 	call Random
--- a/engine/events/special.asm
+++ b/engine/events/special.asm
@@ -53,7 +53,7 @@
 	call CopyName2
 
 ; Engine flag for this event.
-	ld hl, DailyFlags
+	ld hl, wDailyFlags
 	set 5, [hl]
 ; setflag ENGINE_SHUCKLE_GIVEN
 	ld a, 1
--- a/engine/events/sweet_scent.asm
+++ b/engine/events/sweet_scent.asm
@@ -36,7 +36,7 @@
 SweetScentEncounter: ; 506ef
 	farcall CanUseSweetScent
 	jr nc, .no_battle
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 2, [hl]
 	jr nz, .not_in_bug_contest
 	farcall GetMapEncounterRate
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -2,7 +2,7 @@
 
 
 WarpToSpawnPoint:: ; 97c28
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	res 1, [hl] ; safari zone?
 	res 2, [hl] ; bug contest
 	ret
@@ -108,7 +108,7 @@
 	jr c, .nope
 	call CanUseSweetScent
 	jr nc, .nope
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 2, [hl] ; bug contest
 	jr nz, .bug_contest
 	farcall TryWildEncounter
@@ -149,7 +149,7 @@
 ; 97cfd
 
 CanUseSweetScent:: ; 97cfd
-	ld hl, StatusFlags
+	ld hl, wStatusFlags
 	bit 5, [hl]
 	jr nz, .no
 	ld a, [wEnvironment]
@@ -263,7 +263,7 @@
 	; If the bike shop owner doesn't have our number, or
 	; if we've already gotten the call, we don't have to
 	; be here.
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 4, [hl] ; bike shop call
 	jr z, .NoCall
 
@@ -314,7 +314,7 @@
 	ld [wSpecialPhoneCallID], a
 	xor a
 	ld [wSpecialPhoneCallID + 1], a
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	res 4, [hl] ; bike shop call
 	scf
 	ret
--- a/engine/events_3.asm
+++ b/engine/events_3.asm
@@ -648,7 +648,7 @@
 	ld [rVBK], a
 
 	ld de, FishingGFX
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .got_gender
 	ld de, KrisFishingGFX
--- a/engine/init_gender.asm
+++ b/engine/init_gender.asm
@@ -3,7 +3,7 @@
 	ld [wd474], a
 	xor a
 	ld [wd473], a
-	ld [PlayerGender], a
+	ld [wPlayerGender], a
 	ld [wd475], a
 	ld [wd476], a
 	ld [wd477], a
@@ -37,7 +37,7 @@
 	call CloseWindow
 	ld a, [wMenuCursorY]
 	dec a
-	ld [PlayerGender], a
+	ld [wPlayerGender], a
 	ld c, 10
 	call DelayFrames
 	ret
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -193,8 +193,8 @@
 	xor a
 	ld [MonType], a
 
-	ld [JohtoBadges], a
-	ld [KantoBadges], a
+	ld [wJohtoBadges], a
+	ld [wKantoBadges], a
 
 	ld [Coins], a
 	ld [Coins + 1], a
@@ -483,7 +483,7 @@
 	xor a
 	ld [wDontPlayMapMusicOnReload], a
 	ld [wLinkMode], a
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	set 0, [hl]
 	res 7, [hl]
 	ld hl, wEnteredMapFromContinue
@@ -540,7 +540,7 @@
 	xor a
 	ld [hBGMapMode], a
 	ld hl, .MenuDataHeader_Dex
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 0, a ; pokedex
 	jr nz, .pokedex_header
 	ld hl, .MenuDataHeader_NoDex
@@ -631,7 +631,7 @@
 
 Continue_DisplayBadgeCount: ; 5f58
 	push hl
-	ld hl, JohtoBadges
+	ld hl, wJohtoBadges
 	ld b, 2
 	call CountSetBits
 	pop hl
@@ -641,7 +641,7 @@
 ; 5f6b
 
 Continue_DisplayPokedexNumCaught: ; 5f6b
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 0, a ; Pokedex
 	ret z
 	push hl
@@ -813,7 +813,7 @@
 
 	ld hl, PlayerName
 	ld de, .Chris
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .Male
 	ld de, .Kris
@@ -989,7 +989,7 @@
 	ld [hli], a
 
 	ld b, 0
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .male
 	ld b, 1
--- a/engine/main_menu.asm
+++ b/engine/main_menu.asm
@@ -9,7 +9,7 @@
 	ld b, SCGB_DIPLOMA
 	call GetSGBLayout
 	call SetPalettes
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	res 0, [hl]
 	call MainMenu_GetWhichMenu
 	ld [wWhichIndexSet], a
@@ -168,7 +168,7 @@
 	cp -1
 	call CloseSRAM
 	jr nz, .mystery_gift
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 7, a
 	ld a, $1 ; Continue
 	jr z, .ok
@@ -182,7 +182,7 @@
 	ret
 
 .mystery_gift
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 7, a
 	jr z, .ok3
 	jr .ok3
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -168,7 +168,7 @@
 
 .CheckBiking: ; 1550c (5:550c)
 	and a
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	bit 1, [hl]
 	ret z
 	ld a, PLAYER_BIKE
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -58,7 +58,7 @@
 	ld a, [hli]
 	or [hl]
 	jr z, .skip_set
-	ld hl, DailyFlags
+	ld hl, wDailyFlags
 	set 6, [hl]
 
 .skip_set
@@ -81,7 +81,7 @@
 RooftopSale: ; 15ac4
 	ld b, BANK(RooftopSaleData1)
 	ld de, RooftopSaleData1
-	ld hl, StatusFlags
+	ld hl, wStatusFlags
 	bit 6, [hl] ; hall of fame
 	jr z, .ok
 	ld b, BANK(RooftopSaleData2)
--- a/engine/overworld.asm
+++ b/engine/overworld.asm
@@ -64,7 +64,7 @@
 	ld a, [wPlayerSpriteSetupFlags]
 	bit 2, a
 	jr nz, .go
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .go
 	ld hl, .Kris
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -1294,7 +1294,7 @@
 	ld a, [BattleType]
 	cp BATTLETYPE_TUTORIAL
 	jr z, .male_dude
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr nz, .female
 .male_dude
--- a/engine/player_gfx.asm
+++ b/engine/player_gfx.asm
@@ -1,7 +1,7 @@
 Function88248: ; 88248
 ; XXX
 	ld c, CAL
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .okay
 	ld c, KAREN
@@ -58,7 +58,7 @@
 
 ShowPlayerNamingChoices: ; 88297
 	ld hl, ChrisNameMenuHeader
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .GotGender
 	ld hl, KrisNameMenuHeader
@@ -76,7 +76,7 @@
 GetPlayerNameArray: ; 88318 This Function is never called
 	ld hl, PlayerName
 	ld de, MalePlayerNameArray
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .done
 	ld de, FemalePlayerNameArray
@@ -92,7 +92,7 @@
 	ld de, ChrisSpriteGFX
 	ld b, BANK(ChrisSpriteGFX)
 
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .done
 
@@ -105,7 +105,7 @@
 
 GetCardPic: ; 8833e
 	ld hl, ChrisCardPic
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .GotClass
 	ld hl, KrisCardPic
@@ -131,7 +131,7 @@
 INCBIN "gfx/trainer_card/trainer_card.2bpp"
 
 GetPlayerBackpic: ; 88825
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, GetChrisBackpic
 	call GetKrisBackpic
@@ -150,7 +150,7 @@
 	xor a
 	ld [hBGMapMode], a
 	ld e, 0
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .GotClass
 	ld e, 1
@@ -159,7 +159,7 @@
 	ld a, e
 	ld [TrainerClass], a
 	ld de, ChrisPic
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .GotPic
 	ld de, KrisPic
@@ -179,7 +179,7 @@
 
 ; Get class
 	ld e, CHRIS
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .GotClass
 	ld e, KRIS
@@ -189,7 +189,7 @@
 
 ; Load pic
 	ld de, ChrisPic
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .GotPic
 	ld de, KrisPic
--- a/engine/player_movement.asm
+++ b/engine/player_movement.asm
@@ -18,7 +18,7 @@
 
 ; Standing downhill instead moves down.
 
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	bit 2, [hl] ; downhill
 	ret z
 
@@ -285,7 +285,7 @@
 	call .BikeCheck
 	jr nz, .walk
 
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	bit 2, [hl] ; downhill
 	jr z, .fast
 
@@ -672,7 +672,7 @@
 
 .CheckStrengthBoulder: ; 8036f
 
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	bit 0, [hl] ; using strength
 	jr z, .not_boulder
 
--- a/engine/player_object.asm
+++ b/engine/player_object.asm
@@ -33,7 +33,7 @@
 	ld a, [wPlayerSpriteSetupFlags]
 	bit 2, a
 	jr nz, .ok
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .ok
 	ln e, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -103,7 +103,7 @@
 	ret
 
 Pokedex_CheckUnlockedUnownMode: ; 400a2
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 1, a
 	jr nz, .unlocked
 
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -657,7 +657,7 @@
 	push af
 	depixel 0, 0
 	ld b, SPRITE_ANIM_INDEX_RED_WALK
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .got_gender
 	ld b, SPRITE_ANIM_INDEX_BLUE_WALK
@@ -734,7 +734,7 @@
 ; 910e8
 
 TownMap_GetKantoLandmarkLimits: ; 910e8
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 6, a
 	jr z, .not_hof
 	ld d, ROUTE_28
@@ -1583,7 +1583,7 @@
 
 .EvolutionRadio:
 ; This station airs in the Lake of Rage area when Rocket are still in Mahogany.
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 4, a
 	jr z, .NoSignal
 	ld a, [wPokegearMapPlayerIconLandmark]
@@ -1669,7 +1669,7 @@
 	ld hl, PlayRadioShow
 	call Radio_BackUpFarCallParams
 	ld de, NotBuenasPasswordName
-	ld a, [StatusFlags2]
+	ld a, [wStatusFlags2]
 	bit 0, a
 	ret z
 	ld de, BuenasPasswordName
@@ -2329,7 +2329,7 @@
 
 HasVisitedSpawn: ; 91c50
 ; Check if spawn point c has been visited.
-	ld hl, VisitedSpawns
+	ld hl, wVisitedSpawns
 	ld b, CHECK_FLAG
 	ld d, 0
 	predef FlagPredef
@@ -2530,7 +2530,7 @@
 	ret
 
 .right
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 6, a ; hall of fame
 	ret z
 	ld a, [hWY]
@@ -2659,7 +2659,7 @@
 	inc de
 	push bc
 	ld c, 0 ; RED
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .got_gender
 	inc c   ; BLUE
@@ -2886,7 +2886,7 @@
 ; Animation/palette
 	depixel 0, 0
 	ld b, SPRITE_ANIM_INDEX_RED_WALK ; Male
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .got_gender
 	ld b, SPRITE_ANIM_INDEX_BLUE_WALK ; Female
--- a/engine/radio.asm
+++ b/engine/radio.asm
@@ -4,7 +4,7 @@
 	cp POKE_FLUTE_RADIO
 	jr nc, .ok
 ; If Team Rocket is not occupying the radio tower, we don't need to be here.
-	ld a, [StatusFlags2]
+	ld a, [wStatusFlags2]
 	bit 0, a ; checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
 	jr z, .ok
 ; If we're in Kanto, we don't need to be here.
@@ -1176,11 +1176,11 @@
 	jr nc, PeoplePlaces4
 	push af
 	ld hl, .E4Names
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 6, a ; ENGINE_CREDITS_SKIP
 	jr z, .ok
 	ld hl, .KantoLeaderNames
-	ld a, [KantoBadges]
+	ld a, [wKantoBadges]
 	cp %11111111
 	jr nz, .ok
 	ld hl, .MiscNames
@@ -1571,7 +1571,7 @@
 	jp c, BuenasPassword8
 	ld a, [wBuenasPassword]
 ; If we already generated the password today, we don't need to generate a new one.
-	ld hl, WeeklyFlags
+	ld hl, wWeeklyFlags
 	bit 7, [hl]
 	jr nz, .AlreadyGotIt
 ; There are only 11 groups to choose from.
@@ -1593,7 +1593,7 @@
 	add e
 	ld [wBuenasPassword], a
 ; Set the flag so that we don't generate a new password this week.
-	ld hl, WeeklyFlags
+	ld hl, wWeeklyFlags
 	set 7, [hl]
 .AlreadyGotIt:
 	ld c, a
@@ -1737,7 +1737,7 @@
 
 BuenasPasswordAfterMidnight:
 	push hl
-	ld hl, WeeklyFlags
+	ld hl, wWeeklyFlags
 	res 7, [hl]
 	pop hl
 	ld a, BUENAS_PASSWORD_8
@@ -1744,7 +1744,7 @@
 	jp NextRadioLine
 
 BuenasPassword8:
-	ld hl, WeeklyFlags
+	ld hl, wWeeklyFlags
 	res 7, [hl]
 	ld hl, BuenaRadioMidnightText10
 	ld a, BUENAS_PASSWORD_9
@@ -1812,7 +1812,7 @@
 	farcall NoRadioName
 	pop af
 	ld [hBGMapMode], a
-	ld hl, WeeklyFlags
+	ld hl, wWeeklyFlags
 	res 7, [hl]
 	ld a, BUENAS_PASSWORD
 	ld [wCurrentRadioLine], a
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -691,8 +691,8 @@
 	ld de, StartDay
 	ld bc, 8
 	call CopyBytes
-	ld hl, sPlayerData + StatusFlags - wPlayerData
-	ld de, StatusFlags
+	ld hl, sPlayerData + wStatusFlags - wPlayerData
+	ld de, wStatusFlags
 	ld a, [hl]
 	ld [de], a
 	call CloseSRAM
@@ -710,8 +710,8 @@
 	ld de, StartDay
 	ld bc, 8
 	call CopyBytes
-	ld hl, sBackupPlayerData + StatusFlags - wPlayerData
-	ld de, StatusFlags
+	ld hl, sBackupPlayerData + wStatusFlags - wPlayerData
+	ld de, wStatusFlags
 	ld a, [hl]
 	ld [de], a
 	call CloseSRAM
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -2609,7 +2609,7 @@
 Script_wildoff:
 ; script command 0x38
 
-	ld hl, StatusFlags
+	ld hl, wStatusFlags
 	set 5, [hl]
 	ret
 
@@ -2616,7 +2616,7 @@
 Script_wildon:
 ; script command 0x37
 
-	ld hl, StatusFlags
+	ld hl, wStatusFlags
 	res 5, [hl]
 	ret
 
@@ -2991,12 +2991,12 @@
 Script_halloffame:
 ; script command 0xa1
 
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	res 0, [hl]
 	farcall TrainerRankings_HallOfFame
 	farcall TrainerRankings_HallOfFame2
 	farcall HallOfFame
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	set 0, [hl]
 	jr ReturnFromCredits
 
--- a/engine/start_menu.asm
+++ b/engine/start_menu.asm
@@ -7,7 +7,7 @@
 
 	farcall ReanchorBGMap_NoOAMUpdate
 
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 2, [hl] ; bug catching contest
 	ld hl, .MenuDataHeader
 	jr z, .GotMenuData
@@ -284,7 +284,7 @@
 	ld [wWhichIndexSet], a
 	call .FillMenuList
 
-	ld hl, StatusFlags
+	ld hl, wStatusFlags
 	bit 0, [hl]
 	jr z, .no_pokedex
 	ld a, 0 ; pokedex
@@ -301,7 +301,7 @@
 	ld a, [wLinkMode]
 	and a
 	jr nz, .no_pack
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 2, [hl] ; bug catching contest
 	jr nz, .no_pack
 	ld a, 2 ; pack
@@ -321,7 +321,7 @@
 	ld a, [wLinkMode]
 	and a
 	jr nz, .no_save
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 2, [hl] ; bug catching contest
 	ld a, 8 ; quit
 	jr nz, .write
@@ -390,7 +390,7 @@
 ; 128d1
 
 .DrawBugContestStatusBox: ; 128d1
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 2, [hl] ; bug catching contest
 	ret z
 	farcall StartMenu_DrawBugContestStatusBox
@@ -398,7 +398,7 @@
 ; 128de
 
 .DrawBugContestStatus: ; 128de
-	ld hl, StatusFlags2
+	ld hl, wStatusFlags2
 	bit 2, [hl] ; bug catching contest
 	jr nz, .contest
 	ret
--- a/engine/time.asm
+++ b/engine/time.asm
@@ -101,7 +101,7 @@
 	call CheckDayDependentEventHL
 	ret nc
 	xor a
-	ld hl, DailyFlags
+	ld hl, wDailyFlags
 	ld [hli], a
 	ld [hli], a
 	ld [hli], a
@@ -226,7 +226,7 @@
 ; 1151c
 
 ; XXX
-	ld hl, DailyFlags
+	ld hl, wDailyFlags
 	set 2, [hl]
 	ret
 ; 11522
@@ -233,7 +233,7 @@
 
 ; XXX
 	and a
-	ld hl, DailyFlags
+	ld hl, wDailyFlags
 	bit 2, [hl]
 	ret nz
 	scf
--- a/engine/timeofdaypals.asm
+++ b/engine/timeofdaypals.asm
@@ -215,7 +215,7 @@
 	ret
 
 .DarkCave:
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 2, a ; Flash
 	jr nz, .UsedFlash
 	ld a, %11111111 ; 3, 3, 3, 3
--- a/engine/trainer_card.asm
+++ b/engine/trainer_card.asm
@@ -120,7 +120,7 @@
 
 .KantoCheck:
 ; unreferenced
-	ld a, [KantoBadges]
+	ld a, [wKantoBadges]
 	and a
 	ret z
 	ld a, $4
@@ -166,7 +166,7 @@
 
 .KantoCheck:
 ; unreferenced
-	ld a, [KantoBadges]
+	ld a, [wKantoBadges]
 	and a
 	ret z
 	ld a, $4
@@ -281,7 +281,7 @@
 	hlcoord 2, 8
 	ld de, .StatusTilemap
 	call TrainerCardSetup_PlaceTilemapString
-	ld a, [StatusFlags] ; pokedex
+	ld a, [wStatusFlags]
 	bit 0, a
 	ret nz
 	hlcoord 1, 9
@@ -562,7 +562,7 @@
 	; cycle 1: face tile, in1 tile, in2 tile, in3 tile
 	; cycle 2: face tile, in1 tile, in2 tile, in3 tile
 
-	dw JohtoBadges
+	dw wJohtoBadges
 
 	; Zephyrbadge
 	db $68, $18, 0
--- a/engine/wildmons.asm
+++ b/engine/wildmons.asm
@@ -336,7 +336,7 @@
 	cp UNOWN
 	jr nz, .done
 
-	ld a, [UnlockedUnowns]
+	ld a, [wUnlockedUnowns]
 	and a
 	jr z, .nowildbattle
 
@@ -428,7 +428,7 @@
 _SwarmWildmonCheck
 	call CopyCurrMapDE
 	push hl
-	ld hl, SwarmFlags
+	ld hl, wSwarmFlags
 	bit 2, [hl]
 	pop hl
 	jr z, .CheckYanma
@@ -445,7 +445,7 @@
 
 .CheckYanma:
 	push hl
-	ld hl, SwarmFlags
+	ld hl, wSwarmFlags
 	bit 3, [hl]
 	pop hl
 	jr z, _NoSwarmWildmon
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -461,7 +461,7 @@
 	cp PLAYER_SURF_PIKA
 	jr z, .surf
 
-	ld a, [StatusFlags2]
+	ld a, [wStatusFlags2]
 	bit 2, a
 	jr nz, .contest
 
--- a/home/flag.asm
+++ b/home/flag.asm
@@ -7,7 +7,7 @@
 
 ResetBikeFlags:: ; 2e56
 	xor a
-	ld hl, BikeFlags
+	ld hl, wBikeFlags
 	ld [hli], a
 	ld [hl], a
 	ret
@@ -22,7 +22,7 @@
 	ret
 
 .asm_2e69
-	ld hl, StatusFlags
+	ld hl, wStatusFlags
 	res 2, [hl]
 	ret
 ; 2e6f
--- a/home/game_time.asm
+++ b/home/game_time.asm
@@ -38,7 +38,7 @@
 	ret nz
 
 ; Is the timer paused?
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	bit 0, [hl]
 	ret z
 
--- a/home/map.asm
+++ b/home/map.asm
@@ -2305,7 +2305,7 @@
 	ret
 
 .radiotower
-	ld a, [StatusFlags2]
+	ld a, [wStatusFlags2]
 	bit 0, a
 	jr z, .clearedradiotower
 	ld de, MUSIC_ROCKET_OVERTURE
@@ -2320,7 +2320,7 @@
 	jr .done
 
 .mahoganymart
-	ld a, [StatusFlags2]
+	ld a, [wStatusFlags2]
 	bit 7, a
 	jr z, .clearedmahogany
 	ld de, MUSIC_ROCKET_HIDEOUT
--- a/home/text.asm
+++ b/home/text.asm
@@ -400,7 +400,7 @@
 	call PlaceString
 	ld h, b
 	ld l, c
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	ld de, String_kun
 	jr z, PlaceCommandCharacter
--- a/mobile/battle_tower_5c.asm
+++ b/mobile/battle_tower_5c.asm
@@ -110,7 +110,7 @@
 	ld bc, NAME_LENGTH_JAPANESE - 1
 	call CopyBytes
 	ld bc, PlayerID
-	ld de, PlayerGender
+	ld de, wPlayerGender
 	farcall GetMobileOTTrainerClass
 	ld de, wBT_OTTempPkmn1CaughtGender
 	ld a, c
--- a/mobile/mobile_12.asm
+++ b/mobile/mobile_12.asm
@@ -84,7 +84,7 @@
 	ld a, [wd002]
 	bit 6, a
 	jr nz, .asm_48113
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	ld hl, Strings_484fb
 	call GetNthString
 	ld d, h
@@ -298,7 +298,7 @@
 	ld de, String_484ff
 	call PlaceString
 	call WaitBGMap
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	inc a
 	ld [wMenuCursorBuffer], a
 	call StaticMenuJoypad
@@ -316,11 +316,11 @@
 	cp $50
 	jr nz, .asm_482e1
 	ld a, $1
-	ld [PlayerGender], a
+	ld [wPlayerGender], a
 	jr .asm_482f1
 .asm_482ed
 	xor a
-	ld [PlayerGender], a
+	ld [wPlayerGender], a
 .asm_482f1
 	ld d, h
 	ld e, l
@@ -804,10 +804,10 @@
 	ld a, A_BUTTON
 	add B_BUTTON
 	ld [hli], a ; joypad filter
-	; ld a, [PlayerGender]
+	; ld a, [wPlayerGender]
 	; xor 1
 	; inc a
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	and a
 	jr z, .male
 	ld a, 2
--- a/mobile/mobile_22.asm
+++ b/mobile/mobile_22.asm
@@ -25,17 +25,17 @@
 
 
 Function89168: ; 89168 (22:5168)
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	set 7, [hl]
 	ret
 
 Function8916e: ; 8916e (22:516e)
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	res 7, [hl]
 	ret
 
 Function89174: ; 89174 (22:5174)
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	bit 7, [hl]
 	ret
 
@@ -619,7 +619,7 @@
 
 Function89492: ; 89492 (22:5492)
 	ld d, 0
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	ret z
 	inc d
@@ -1269,7 +1269,7 @@
 
 Function89807: ; 89807 (22:5807)
 	ld hl, MobileAdapterGFX + $200
-	ld a, [PlayerGender]
+	ld a, [wPlayerGender]
 	bit 0, a
 	jr z, .asm_89814
 	ld hl, MobileAdapterGFX + $200 + $230
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -2543,7 +2543,7 @@
 	dbwww $80, PlayerName, NAME_LENGTH, NULL
 	dbwww $80, PlayerID, 2, NULL
 	dbwww $80, wSecretID, 2, NULL
-	dbwww $80, PlayerGender, 1, NULL
+	dbwww $80, wPlayerGender, 1, NULL
 	dbwww $04, $a603, 8, NULL
 	dbwww $04, $a007, PARTYMON_STRUCT_LENGTH, NULL
 	db -1
@@ -2812,7 +2812,7 @@
 	call CloseSRAM
 	ld hl, wdc41
 	res 4, [hl]
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	bit 7, [hl]
 	jr z, .skip
 	ld hl, wdc41
@@ -4703,7 +4703,7 @@
 	call ClearSprites
 	farcall Function8adb3
 	ret c
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	set 7, [hl]
 	ld hl, wdc41
 	set 4, [hl]
@@ -4711,7 +4711,7 @@
 ; 101ead
 
 Function101ead: ; 101ead
-	ld hl, GameTimerPause
+	ld hl, wGameTimerPause
 	bit 7, [hl]
 	jr nz, .asm_101ec8
 	ld hl, wdc41
@@ -7896,7 +7896,7 @@
 
 Function103700: ; 103700
 	ld c, $0a
-	ld hl, SwarmFlags
+	ld hl, wSwarmFlags
 	bit 4, [hl]
 	jr z, .asm_10370f
 	farcall Function1008a6
@@ -7994,11 +7994,11 @@
 
 Function10378c: ; 10378c
 	ld c, 0
-	ld hl, SwarmFlags
+	ld hl, wSwarmFlags
 	bit 4, [hl]
 	jr nz, .already_set
 	ld c, $01
-	ld hl, SwarmFlags
+	ld hl, wSwarmFlags
 	set 4, [hl]
 
 .already_set
@@ -8020,7 +8020,7 @@
 	ld a, c
 	and a
 	ret z
-	ld hl, SwarmFlags
+	ld hl, wSwarmFlags
 	res 4, [hl]
 	ret
 ; 1037c2
--- a/mobile/mobile_45.asm
+++ b/mobile/mobile_45.asm
@@ -4401,7 +4401,7 @@
 
 Function1158c2: ; 1158c2
 	ld a, e
-	ld [SwarmFlags], a
+	ld [wSwarmFlags], a
 	ld a, d
 	ld [$dc21], a
 	xor a
@@ -4422,7 +4422,7 @@
 	ld l, c
 	ld h, b
 	xor a
-	ld [WeeklyFlags], a
+	ld [wWeeklyFlags], a
 
 .asm_1158e5
 	ld b, $3
@@ -4447,7 +4447,7 @@
 	push hl
 	dec hl
 	ld a, c
-	ld [WeeklyFlags], a
+	ld [wWeeklyFlags], a
 .asm_115908
 	xor a
 	ld [hld], a
@@ -4468,7 +4468,7 @@
 	ld [$dc1a], a
 	push de
 	push hl
-	ld hl, SwarmFlags
+	ld hl, wSwarmFlags
 	ld a, [hli]
 	ld h, [hl]
 	ld l, a
@@ -4562,7 +4562,7 @@
 	ld a, $a
 	ld [hli], a
 	push hl
-	ld hl, SwarmFlags
+	ld hl, wSwarmFlags
 	ld a, [hli]
 	ld h, [hl]
 	ld l, a
@@ -4587,7 +4587,7 @@
 	jp nz, .asm_1158e5
 
 .asm_1159c4
-	ld a, [WeeklyFlags]
+	ld a, [wWeeklyFlags]
 	cp $0
 	jr z, .asm_1159d8
 	push hl
@@ -5061,9 +5061,9 @@
 
 Function115c49: ; 115c49
 	ld a, e
-	ld [WeeklyFlags], a
+	ld [wWeeklyFlags], a
 	ld a, d
-	ld [SwarmFlags], a
+	ld [wSwarmFlags], a
 	xor a
 	ld [de], a
 	inc de
@@ -5131,7 +5131,7 @@
 	ld [$dc1a], a
 	push de
 	push hl
-	ld hl, WeeklyFlags
+	ld hl, wWeeklyFlags
 	ld a, [hli]
 	ld h, [hl]
 	ld l, a
@@ -5243,9 +5243,9 @@
 .asm_115d38
 	push de
 	push hl
-	ld a, [WeeklyFlags]
+	ld a, [wWeeklyFlags]
 	ld l, a
-	ld a, [SwarmFlags]
+	ld a, [wSwarmFlags]
 	ld h, a
 	ld e, [hl]
 	inc hl
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -1198,7 +1198,7 @@
 	ld [wcd4f], a
 	ld a, $1
 	ld [rSVBK], a
-	ld a, [StatusFlags]
+	ld a, [wStatusFlags]
 	bit 6, a ; Hall Of Fame
 	jr nz, .asm_11896b
 	ld hl, Strings_Ll0ToL40		; Address to list of strings with the choosable levels
--- a/wram.asm
+++ b/wram.asm
@@ -1431,7 +1431,7 @@
 
 wcfbb:: db
 
-GameTimerPause:: ; cfbc
+wGameTimerPause:: ; cfbc
 ; bit 0
 	db
 
@@ -2238,7 +2238,7 @@
 wMapStatusEnd:: ds 2 ; d470
 
 wCrystalData::
-PlayerGender:: ; d472
+wPlayerGender:: ; d472
 ; bit 0:
 ;	0 male
 ;	1 female
@@ -2348,7 +2348,7 @@
 	ds 1
 
 wSecretID:: dw
-StatusFlags:: ; d84c
+wStatusFlags:: ; d84c
 	; 0 - pokedex
 	; 1 - unown dex
 	; 2 -
@@ -2359,7 +2359,7 @@
 	; 7 - bug contest on
 	db
 
-StatusFlags2:: ; d84d
+wStatusFlags2:: ; d84d
 	; 0 - rockets
 	; 1 -
 	; 2 - bug contest timer
@@ -2377,8 +2377,8 @@
 Coins:: dw ; d855
 
 Badges::
-JohtoBadges:: flag_array NUM_JOHTO_BADGES ; d857
-KantoBadges:: flag_array NUM_KANTO_BADGES ; d858
+wJohtoBadges:: flag_array NUM_JOHTO_BADGES ; d857
+wKantoBadges:: flag_array NUM_KANTO_BADGES ; d858
 
 
 TMsHMs:: ds NUM_TMS + NUM_HMS ; d859
@@ -2557,7 +2557,7 @@
 
 	ds 1
 
-BikeFlags:: ; dbf5
+wBikeFlags:: ; dbf5
 ; bit 0: using strength
 ; bit 1: always on bike
 ; bit 2: downhill
@@ -2599,9 +2599,9 @@
 MomItemTriggerBalance:: ds 3 ; dc19
 
 wDailyResetTimer:: dw ; dc1c
-DailyFlags:: db
-WeeklyFlags:: db
-SwarmFlags:: db
+wDailyFlags:: db
+wWeeklyFlags:: db
+wSwarmFlags:: db
 	ds 2
 wStartDay:: db
 	ds 3
@@ -2660,7 +2660,7 @@
 
 wMapData::
 
-VisitedSpawns:: flag_array NUM_SPAWNS ; dca5
+wVisitedSpawns:: flag_array NUM_SPAWNS ; dca5
 
 wDigWarpNumber:: db ; dcaa
 wDigMapGroup::   db ; dcab
@@ -2717,7 +2717,7 @@
 EndPokedexSeen::
 
 UnownDex:: ds NUM_UNOWN ; ded9
-UnlockedUnowns:: db ; def3
+wUnlockedUnowns:: db ; def3
 wFirstUnownSeen:: db
 
 wDayCareMan:: ; def5