diff --git a/constants/engine_flags.asm b/constants/engine_flags.asm index 3c088596d..ad8632db0 100644 --- a/constants/engine_flags.asm +++ b/constants/engine_flags.asm @@ -16,14 +16,14 @@ const ENGINE_DST ; wUnusedTwoDayTimerOn const ENGINE_0A -; StatusFlags +; wStatusFlags const ENGINE_POKEDEX const ENGINE_UNOWN_DEX const ENGINE_POKERUS 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 diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm index c8c49621e..2e44208ef 100644 --- a/constants/wram_constants.asm +++ b/constants/wram_constants.asm @@ -131,7 +131,7 @@ DAY_CARE_DEPOSIT EQU 3 const DEXMODE_ABC const DEXMODE_UNOWN -; JohtoBadges: +; wJohtoBadges: const_def const ZEPHYRBADGE const HIVEBADGE @@ -143,7 +143,7 @@ DAY_CARE_DEPOSIT EQU 3 const RISINGBADGE NUM_JOHTO_BADGES EQU const_value -; KantoBadges: +; wKantoBadges: const_def const BOULDERBADGE const CASCADEBADGE diff --git a/data/engine_flags.asm b/data/engine_flags.asm index 8dfc251c6..9c2dda5a6 100644 --- a/data/engine_flags.asm +++ b/data/engine_flags.asm @@ -26,110 +26,110 @@ EngineFlags: ; 80462 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 @@ EngineFlags: ; 80462 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 diff --git a/engine/battle/core.asm b/engine/battle/core.asm index a62b70d72..d9f660a41 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6695,7 +6695,7 @@ CheckSleepingTreeMon: ; 3eb38 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 @@ BadgeStatBoosts: ; 3ed45 and a ret nz - ld a, [JohtoBadges] + ld a, [wJohtoBadges] ; Swap badges 3 (PlainBadge) and 5 (MineralBadge). ld d, a @@ -9349,7 +9349,7 @@ GetTrainerBackpic: ; 3fbff ld a, [wPlayerSpriteSetupFlags] bit 2, a ; transformed to male jr nz, .Chris - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .Chris diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index 5922afea3..f86f90479 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -726,7 +726,7 @@ BattleCommand_CheckObedience: ; 343db .obeylevel ; The maximum obedience level is constrained by owned badges: - ld hl, JohtoBadges + ld hl, wJohtoBadges ; risingbadge bit RISINGBADGE, [hl] diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm index b05dc8071..c78e9fd84 100644 --- a/engine/battle/misc.asm +++ b/engine/battle/misc.asm @@ -176,9 +176,9 @@ DoBadgeTypeBoosts: ; fbe24 ld hl, .BadgeTypes - ld a, [KantoBadges] + ld a, [wKantoBadges] ld b, a - ld a, [JohtoBadges] + ld a, [wJohtoBadges] ld c, a .CheckBadge: diff --git a/engine/caught_data.asm b/engine/caught_data.asm index 961782908..1f8b8cac4 100644 --- a/engine/caught_data.asm +++ b/engine/caught_data.asm @@ -193,7 +193,7 @@ SetBoxmonOrEggmonCaughtData: ; 4db53 .NotPokecenter2F: call GetWorldMapLocation ld b, a - ld a, [PlayerGender] + ld a, [wPlayerGender] rrca or b ld [hl], a diff --git a/engine/cgb_layouts.asm b/engine/cgb_layouts.asm index 93e2c4434..715e41847 100644 --- a/engine/cgb_layouts.asm +++ b/engine/cgb_layouts.asm @@ -183,7 +183,7 @@ InitPartyMenuBGPal0: ; 8e9f ; 8eb9 _CGB_PokegearPals: ; 8eb9 - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .male ld hl, FemalePokegearPals @@ -719,7 +719,7 @@ _CGB_TrainerCard: ; 9289 ; 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 @@ _CGB_TrainerCard: ; 9289 ; 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 @@ _CGB_TrainerCard: ; 9289 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 @@ _CGB_PackPals: ; 93d3 cp BATTLETYPE_TUTORIAL jr z, .tutorial_male - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .tutorial_male diff --git a/engine/color.asm b/engine/color.asm index 3eafbad70..7e43ea0d4 100644 --- a/engine/color.asm +++ b/engine/color.asm @@ -718,7 +718,7 @@ GetPlayerOrMonPalettePointer: 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 diff --git a/engine/events.asm b/engine/events.asm index 9b26893e7..55d02ee93 100644 --- a/engine/events.asm +++ b/engine/events.asm @@ -491,7 +491,7 @@ CheckTimeEvents: ; 9693a and a jr nz, .nothing - ld hl, StatusFlags2 + ld hl, wStatusFlags2 bit 2, [hl] ; bug contest jr z, .do_daily diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm index 1c21f4995..6171eea07 100755 --- a/engine/events/field_moves.asm +++ b/engine/events/field_moves.asm @@ -8,7 +8,7 @@ PlayWhirlpoolSound: ; 8c7d4 BlindingFlash: ; 8c7e1 farcall FadeOutPalettes - ld hl, StatusFlags + ld hl, wStatusFlags set 2, [hl] ; Flash farcall ReplaceTimeOfDayPals farcall UpdateTimeOfDayPal diff --git a/engine/events/fish.asm b/engine/events/fish.asm index c571bba56..9d1ea63ae 100644 --- a/engine/events/fish.asm +++ b/engine/events/fish.asm @@ -97,7 +97,7 @@ GetFishGroupIndex: ; 9245b ; Return the index of fishgroup d in de. push hl - ld hl, DailyFlags + ld hl, wDailyFlags bit 2, [hl] pop hl jr z, .done diff --git a/engine/events/fruit_trees.asm b/engine/events/fruit_trees.asm index 595e41824..d0b0bac15 100644 --- a/engine/events/fruit_trees.asm +++ b/engine/events/fruit_trees.asm @@ -43,7 +43,7 @@ GetCurTreeFruit: ; 44041 ; 4404c TryResetFruitTrees: ; 4404c - ld hl, DailyFlags + ld hl, wDailyFlags bit 4, [hl] ret nz jp ResetFruitTrees @@ -70,7 +70,7 @@ ResetFruitTrees: ; 4406a ld [hli], a ld [hli], a ld [hl], a - ld hl, DailyFlags + ld hl, wDailyFlags set 4, [hl] ret ; 44078 diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm index 5fa1dc270..5108306d9 100755 --- a/engine/events/halloffame.asm +++ b/engine/events/halloffame.asm @@ -2,7 +2,7 @@ HALLOFFAME_COLON EQU $63 HallOfFame:: ; 0x8640e call HallOfFame_FadeOutMusic - ld a, [StatusFlags] + ld a, [wStatusFlags] push af ld a, 1 ld [wGameLogicPaused], a @@ -11,7 +11,7 @@ HallOfFame:: ; 0x8640e 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 @@ RedCredits:: ; 86455 call DisableSpriteUpdates ld a, SPAWN_RED ld [wSpawnAfterChampion], a - ld a, [StatusFlags] + ld a, [wStatusFlags] ld b, a farcall Credits ret diff --git a/engine/events/magnet_train.asm b/engine/events/magnet_train.asm index 3a2f902c2..ba15f6525 100755 --- a/engine/events/magnet_train.asm +++ b/engine/events/magnet_train.asm @@ -328,7 +328,7 @@ MagnetTrain_Jumptable: ; 8cdf7 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 diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 370162fa9..8c238cb9c 100755 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -358,7 +358,7 @@ SurfFunction: ; c909 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 @@ TrySurfOW:: ; c9e7 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 @@ StrengthFunction: ; cce5 ret SetStrengthFlag: ; cd12 - ld hl, BikeFlags + ld hl, wBikeFlags set 0, [hl] ld a, [CurPartyMon] ld e, a @@ -1086,7 +1086,7 @@ TryStrengthOW: ; cd78 call CheckEngineFlag jr c, .nope - ld hl, BikeFlags + ld hl, wBikeFlags bit 0, [hl] jr z, .already_using @@ -1683,7 +1683,7 @@ BikeFunction: ; d0b3 ret .GetOffBike: - ld hl, BikeFlags + ld hl, wBikeFlags bit 1, [hl] jr nz, .CantGetOffBike ld hl, Script_GetOffBike diff --git a/engine/events/pokerus/pokerus.asm b/engine/events/pokerus/pokerus.asm index 3e5e094e4..d47bcb6c1 100644 --- a/engine/events/pokerus/pokerus.asm +++ b/engine/events/pokerus/pokerus.asm @@ -18,7 +18,7 @@ GivePokerusAndConvertBerries: ; 2ed44 ; 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 @@ GivePokerusAndConvertBerries: ; 2ed44 ; 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 diff --git a/engine/events/special.asm b/engine/events/special.asm index d28d0de64..939db4a25 100755 --- a/engine/events/special.asm +++ b/engine/events/special.asm @@ -53,7 +53,7 @@ SpecialGiveShuckle: ; 7305 call CopyName2 ; Engine flag for this event. - ld hl, DailyFlags + ld hl, wDailyFlags set 5, [hl] ; setflag ENGINE_SHUCKLE_GIVEN ld a, 1 diff --git a/engine/events/sweet_scent.asm b/engine/events/sweet_scent.asm index 77567488c..9b75eb9b8 100755 --- a/engine/events/sweet_scent.asm +++ b/engine/events/sweet_scent.asm @@ -36,7 +36,7 @@ SweetScentNothing: ; 0x506e9 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 diff --git a/engine/events_2.asm b/engine/events_2.asm index cab6b8bd0..cac736bab 100644 --- 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 @@ RandomEncounter:: ; 97cc0 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 @@ WildBattleScript: ; 97cf9 ; 97cfd CanUseSweetScent:: ; 97cfd - ld hl, StatusFlags + ld hl, wStatusFlags bit 5, [hl] jr nz, .no ld a, [wEnvironment] @@ -263,7 +263,7 @@ DoBikeStep:: ; 97db3 ; 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 @@ DoBikeStep:: ; 97db3 ld [wSpecialPhoneCallID], a xor a ld [wSpecialPhoneCallID + 1], a - ld hl, StatusFlags2 + ld hl, wStatusFlags2 res 4, [hl] ; bike shop call scf ret diff --git a/engine/events_3.asm b/engine/events_3.asm index 3d662c332..78628aaea 100755 --- a/engine/events_3.asm +++ b/engine/events_3.asm @@ -648,7 +648,7 @@ LoadFishingGFX: ; b84b3 ld [rVBK], a ld de, FishingGFX - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .got_gender ld de, KrisFishingGFX diff --git a/engine/init_gender.asm b/engine/init_gender.asm index 092a1c9ea..1f30f774c 100755 --- a/engine/init_gender.asm +++ b/engine/init_gender.asm @@ -3,7 +3,7 @@ InitCrystalData: ; 48000 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 @@ InitGender: ; 48dcb (12:4dcb) call CloseWindow ld a, [wMenuCursorY] dec a - ld [PlayerGender], a + ld [wPlayerGender], a ld c, 10 call DelayFrames ret diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm index 77d1af6f9..94deb1112 100755 --- a/engine/intro_menu.asm +++ b/engine/intro_menu.asm @@ -193,8 +193,8 @@ _ResetWRAM: ; 5bae 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 @@ FinishContinueFunction: ; 5e5d 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 @@ Continue_LoadMenuHeader: ; 5ebf 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_UnknownGameTime: ; 5f48 Continue_DisplayBadgeCount: ; 5f58 push hl - ld hl, JohtoBadges + ld hl, wJohtoBadges ld b, 2 call CountSetBits pop hl @@ -641,7 +641,7 @@ Continue_DisplayBadgeCount: ; 5f58 ; 5f6b Continue_DisplayPokedexNumCaught: ; 5f6b - ld a, [StatusFlags] + ld a, [wStatusFlags] bit 0, a ; Pokedex ret z push hl @@ -813,7 +813,7 @@ NamePlayer: ; 0x6074 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 @@ Intro_PlacePlayerSprite: ; 61cd ld [hli], a ld b, 0 - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .male ld b, 1 diff --git a/engine/main_menu.asm b/engine/main_menu.asm index 92a16f5b6..a88f60bbf 100755 --- a/engine/main_menu.asm +++ b/engine/main_menu.asm @@ -9,7 +9,7 @@ MainMenu: ; 49cdc 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 @@ MainMenu_GetWhichMenu: ; 49da4 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 @@ MainMenu_GetWhichMenu: ; 49da4 ret .mystery_gift - ld a, [StatusFlags] + ld a, [wStatusFlags] bit 7, a jr z, .ok3 jr .ok3 diff --git a/engine/map_setup.asm b/engine/map_setup.asm index 562916442..078e6a2fd 100644 --- a/engine/map_setup.asm +++ b/engine/map_setup.asm @@ -168,7 +168,7 @@ CheckReplaceKrisSprite: ; 154f7 .CheckBiking: ; 1550c (5:550c) and a - ld hl, BikeFlags + ld hl, wBikeFlags bit 1, [hl] ret z ld a, PLAYER_BIKE diff --git a/engine/mart.asm b/engine/mart.asm index 55c184737..4a8d9e17b 100755 --- a/engine/mart.asm +++ b/engine/mart.asm @@ -58,7 +58,7 @@ BargainShop: ; 15a84 ld a, [hli] or [hl] jr z, .skip_set - ld hl, DailyFlags + ld hl, wDailyFlags set 6, [hl] .skip_set @@ -81,7 +81,7 @@ Pharmacist: ; 15aae 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) diff --git a/engine/overworld.asm b/engine/overworld.asm index 7941b74d7..14e36a41d 100755 --- a/engine/overworld.asm +++ b/engine/overworld.asm @@ -64,7 +64,7 @@ GetPlayerSprite: ; 14183 ld a, [wPlayerSpriteSetupFlags] bit 2, a jr nz, .go - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .go ld hl, .Kris diff --git a/engine/pack.asm b/engine/pack.asm index 2b0d04aba..221ca51e0 100644 --- a/engine/pack.asm +++ b/engine/pack.asm @@ -1294,7 +1294,7 @@ DrawPackGFX: ; 1089d ld a, [BattleType] cp BATTLETYPE_TUTORIAL jr z, .male_dude - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr nz, .female .male_dude diff --git a/engine/player_gfx.asm b/engine/player_gfx.asm index 6ffaa77c8..50483eec9 100644 --- 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 @@ MovePlayerPic: ; 88266 ShowPlayerNamingChoices: ; 88297 ld hl, ChrisNameMenuHeader - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .GotGender ld hl, KrisNameMenuHeader @@ -76,7 +76,7 @@ INCLUDE "data/default_names.asm" 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 @@ GetPlayerIcon: ; 8832c ld de, ChrisSpriteGFX ld b, BANK(ChrisSpriteGFX) - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .done @@ -105,7 +105,7 @@ GetPlayerIcon: ; 8832c GetCardPic: ; 8833e ld hl, ChrisCardPic - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .GotClass ld hl, KrisCardPic @@ -131,7 +131,7 @@ CardGFX: ; 887c5 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 @@ HOF_LoadTrainerFrontpic: ; 88840 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 @@ HOF_LoadTrainerFrontpic: ; 88840 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 @@ DrawIntroPlayerPic: ; 88874 ; Get class ld e, CHRIS - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .GotClass ld e, KRIS @@ -189,7 +189,7 @@ DrawIntroPlayerPic: ; 88874 ; Load pic ld de, ChrisPic - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a jr z, .GotPic ld de, KrisPic diff --git a/engine/player_movement.asm b/engine/player_movement.asm index db0c07801..fa7cc84a5 100755 --- a/engine/player_movement.asm +++ b/engine/player_movement.asm @@ -18,7 +18,7 @@ DoPlayerMovement:: ; 80000 ; Standing downhill instead moves down. - ld hl, BikeFlags + ld hl, wBikeFlags bit 2, [hl] ; downhill ret z @@ -285,7 +285,7 @@ DoPlayerMovement:: ; 80000 call .BikeCheck jr nz, .walk - ld hl, BikeFlags + ld hl, wBikeFlags bit 2, [hl] ; downhill jr z, .fast @@ -672,7 +672,7 @@ DoPlayerMovement:: ; 80000 .CheckStrengthBoulder: ; 8036f - ld hl, BikeFlags + ld hl, wBikeFlags bit 0, [hl] ; using strength jr z, .not_boulder diff --git a/engine/player_object.asm b/engine/player_object.asm index fe19d15b5..e11a30036 100755 --- a/engine/player_object.asm +++ b/engine/player_object.asm @@ -33,7 +33,7 @@ SpawnPlayer: ; 8029 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 diff --git a/engine/pokedex.asm b/engine/pokedex.asm index 12b5b2cd6..8beb9e5df 100644 --- a/engine/pokedex.asm +++ b/engine/pokedex.asm @@ -103,7 +103,7 @@ InitPokedex: ; 40063 ret Pokedex_CheckUnlockedUnownMode: ; 400a2 - ld a, [StatusFlags] + ld a, [wStatusFlags] bit 1, a jr nz, .unlocked diff --git a/engine/pokegear.asm b/engine/pokegear.asm index a3e43cebf..48ab6855b 100755 --- a/engine/pokegear.asm +++ b/engine/pokegear.asm @@ -657,7 +657,7 @@ PokegearMap_InitPlayerIcon: ; 9106a 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 @@ PokegearMap_UpdateCursorPosition: ; 910d4 ; 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 @@ RadioChannels: .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 @@ LoadStation_BuenasPassword: ; 917a5 (24:57a5) 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 @@ CheckIfVisitedFlypoint: ; 91c3c 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 @@ _Area: ; 91d11 ret .right - ld a, [StatusFlags] + ld a, [wStatusFlags] bit 6, a ; hall of fame ret z ld a, [hWY] @@ -2659,7 +2659,7 @@ _Area: ; 91d11 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 @@ TownMapPlayerIcon: ; 91fa6 ; 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 diff --git a/engine/radio.asm b/engine/radio.asm index b5c1e075f..42db63ab0 100644 --- a/engine/radio.asm +++ b/engine/radio.asm @@ -4,7 +4,7 @@ PlayRadioShow: 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 @@ PeoplePlaces4: ; People 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 @@ BuenasPassword4: 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 @@ BuenasPassword4: 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,14 +1737,14 @@ BuenasPassword7: BuenasPasswordAfterMidnight: push hl - ld hl, WeeklyFlags + ld hl, wWeeklyFlags res 7, [hl] pop hl ld a, BUENAS_PASSWORD_8 jp NextRadioLine BuenasPassword8: - ld hl, WeeklyFlags + ld hl, wWeeklyFlags res 7, [hl] ld hl, BuenaRadioMidnightText10 ld a, BUENAS_PASSWORD_9 @@ -1812,7 +1812,7 @@ BuenasPassword20: farcall NoRadioName pop af ld [hBGMapMode], a - ld hl, WeeklyFlags + ld hl, wWeeklyFlags res 7, [hl] ld a, BUENAS_PASSWORD ld [wCurrentRadioLine], a diff --git a/engine/save.asm b/engine/save.asm index 69bbaee82..af24b4d2f 100644 --- a/engine/save.asm +++ b/engine/save.asm @@ -691,8 +691,8 @@ TryLoadSaveData: ; 14f1c 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 @@ TryLoadSaveData: ; 14f1c 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 diff --git a/engine/scripting.asm b/engine/scripting.asm index 826267f6b..7512bdc06 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -2609,14 +2609,14 @@ _EngineFlagAction: Script_wildoff: ; script command 0x38 - ld hl, StatusFlags + ld hl, wStatusFlags set 5, [hl] ret Script_wildon: ; script command 0x37 - ld hl, StatusFlags + ld hl, wStatusFlags res 5, [hl] ret @@ -2991,12 +2991,12 @@ Script_end_all: 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 diff --git a/engine/start_menu.asm b/engine/start_menu.asm index d8fbad82d..913bf3780 100755 --- a/engine/start_menu.asm +++ b/engine/start_menu.asm @@ -7,7 +7,7 @@ StartMenu:: ; 125cd 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 @@ endr 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 @@ endr 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 @@ endr 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 @@ endr ; 128d1 .DrawBugContestStatusBox: ; 128d1 - ld hl, StatusFlags2 + ld hl, wStatusFlags2 bit 2, [hl] ; bug catching contest ret z farcall StartMenu_DrawBugContestStatusBox @@ -398,7 +398,7 @@ endr ; 128de .DrawBugContestStatus: ; 128de - ld hl, StatusFlags2 + ld hl, wStatusFlags2 bit 2, [hl] ; bug catching contest jr nz, .contest ret diff --git a/engine/time.asm b/engine/time.asm index 61ef614c3..799a24f49 100755 --- a/engine/time.asm +++ b/engine/time.asm @@ -101,7 +101,7 @@ CheckDailyResetTimer:: ; 11452 call CheckDayDependentEventHL ret nc xor a - ld hl, DailyFlags + ld hl, wDailyFlags ld [hli], a ld [hli], a ld [hli], a @@ -226,14 +226,14 @@ CheckUnusedTwoDayTimer: ; 1150c ; 1151c ; XXX - ld hl, DailyFlags + ld hl, wDailyFlags set 2, [hl] ret ; 11522 ; XXX and a - ld hl, DailyFlags + ld hl, wDailyFlags bit 2, [hl] ret nz scf diff --git a/engine/timeofdaypals.asm b/engine/timeofdaypals.asm index 7fc364f70..56a874264 100644 --- a/engine/timeofdaypals.asm +++ b/engine/timeofdaypals.asm @@ -215,7 +215,7 @@ ReplaceTimeOfDayPals: ; 8c0e5 ret .DarkCave: - ld a, [StatusFlags] + ld a, [wStatusFlags] bit 2, a ; Flash jr nz, .UsedFlash ld a, %11111111 ; 3, 3, 3, 3 diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm index 01a033650..c4f8e15a6 100755 --- a/engine/trainer_card.asm +++ b/engine/trainer_card.asm @@ -120,7 +120,7 @@ TrainerCard_Page1_Joypad: ; 251d7 (9:51d7) .KantoCheck: ; unreferenced - ld a, [KantoBadges] + ld a, [wKantoBadges] and a ret z ld a, $4 @@ -166,7 +166,7 @@ TrainerCard_Page2_Joypad: ; 25221 (9:5221) .KantoCheck: ; unreferenced - ld a, [KantoBadges] + ld a, [wKantoBadges] and a ret z ld a, $4 @@ -281,7 +281,7 @@ TrainerCard_Page1_PrintDexCaught_GameTime: ; 2530a (9:530a) 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 @@ TrainerCard_JohtoBadgesOAM: ; 254c9 ; 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 diff --git a/engine/wildmons.asm b/engine/wildmons.asm index 9aed7017a..dc62093b8 100755 --- a/engine/wildmons.asm +++ b/engine/wildmons.asm @@ -336,7 +336,7 @@ ChooseWildEncounter: ; 2a14f cp UNOWN jr nz, .done - ld a, [UnlockedUnowns] + ld a, [wUnlockedUnowns] and a jr z, .nowildbattle @@ -428,7 +428,7 @@ _JohtoWildmonCheck _SwarmWildmonCheck call CopyCurrMapDE push hl - ld hl, SwarmFlags + ld hl, wSwarmFlags bit 2, [hl] pop hl jr z, .CheckYanma @@ -445,7 +445,7 @@ _SwarmWildmonCheck .CheckYanma: push hl - ld hl, SwarmFlags + ld hl, wSwarmFlags bit 3, [hl] pop hl jr z, _NoSwarmWildmon diff --git a/home/audio.asm b/home/audio.asm index 21e4f81f9..35f98af4d 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -461,7 +461,7 @@ SpecialMapMusic:: ; 3d62 cp PLAYER_SURF_PIKA jr z, .surf - ld a, [StatusFlags2] + ld a, [wStatusFlags2] bit 2, a jr nz, .contest diff --git a/home/flag.asm b/home/flag.asm index 442c811c2..5f1d783af 100644 --- a/home/flag.asm +++ b/home/flag.asm @@ -7,7 +7,7 @@ ResetMapBufferEventFlags:: ; 2e50 ResetBikeFlags:: ; 2e56 xor a - ld hl, BikeFlags + ld hl, wBikeFlags ld [hli], a ld [hl], a ret @@ -22,7 +22,7 @@ ResetFlashIfOutOfCave:: ; 2e5d ret .asm_2e69 - ld hl, StatusFlags + ld hl, wStatusFlags res 2, [hl] ret ; 2e6f diff --git a/home/game_time.asm b/home/game_time.asm index 91dd381fc..69ea0099e 100644 --- a/home/game_time.asm +++ b/home/game_time.asm @@ -38,7 +38,7 @@ UpdateGameTimer:: ; 20ad ret nz ; Is the timer paused? - ld hl, GameTimerPause + ld hl, wGameTimerPause bit 0, [hl] ret z diff --git a/home/map.asm b/home/map.asm index 83b5adf11..19fa5dd50 100644 --- a/home/map.asm +++ b/home/map.asm @@ -2305,7 +2305,7 @@ GetMapHeaderMusic:: ; 2cbd ret .radiotower - ld a, [StatusFlags2] + ld a, [wStatusFlags2] bit 0, a jr z, .clearedradiotower ld de, MUSIC_ROCKET_OVERTURE @@ -2320,7 +2320,7 @@ GetMapHeaderMusic:: ; 2cbd jr .done .mahoganymart - ld a, [StatusFlags2] + ld a, [wStatusFlags2] bit 7, a jr z, .clearedmahogany ld de, MUSIC_ROCKET_HIDEOUT diff --git a/home/text.asm b/home/text.asm index 39d9a3ed1..dca66c3d1 100644 --- a/home/text.asm +++ b/home/text.asm @@ -400,7 +400,7 @@ PlaceGenderedPlayerName:: ; 1252 call PlaceString ld h, b ld l, c - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a ld de, String_kun jr z, PlaceCommandCharacter diff --git a/mobile/battle_tower_5c.asm b/mobile/battle_tower_5c.asm index 8770505c1..f89e83b5a 100755 --- a/mobile/battle_tower_5c.asm +++ b/mobile/battle_tower_5c.asm @@ -110,7 +110,7 @@ Function170139: ; 170139 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 diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm index b6e20ef03..c799ce881 100755 --- a/mobile/mobile_12.asm +++ b/mobile/mobile_12.asm @@ -84,7 +84,7 @@ InitMobileProfile: ; 4802f (12:402f) 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 @@ asm_4828d: ; 4828d (12:428d) 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 @@ asm_4828d: ; 4828d (12:428d) 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 @@ Function4873c: ; 4873c (12:473c) 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 diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index 6fbda0146..3c51de649 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -25,17 +25,17 @@ OpenSRAMBank4: ; 89160 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 @@ Function89481: ; 89481 Function89492: ; 89492 (22:5492) ld d, 0 - ld a, [PlayerGender] + ld a, [wPlayerGender] bit 0, a ret z inc d @@ -1269,7 +1269,7 @@ Function897d5: ; 897d5 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 diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index c25178715..a201a97d4 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -2543,7 +2543,7 @@ Unknown_100ff3: ; 100ff3 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 @@ Function1011f1: ; 1011f1 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 @@ Function101e98: ; 101e98 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 @@ Function101e98: ; 101e98 ; 101ead Function101ead: ; 101ead - ld hl, GameTimerPause + ld hl, wGameTimerPause bit 7, [hl] jr nz, .asm_101ec8 ld hl, wdc41 @@ -7896,7 +7896,7 @@ Function1036f9: ; 1036f9 Function103700: ; 103700 ld c, $0a - ld hl, SwarmFlags + ld hl, wSwarmFlags bit 4, [hl] jr z, .asm_10370f farcall Function1008a6 @@ -7994,11 +7994,11 @@ Function103780: ; 103780 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 @@ Function10378c: ; 10378c ld a, c and a ret z - ld hl, SwarmFlags + ld hl, wSwarmFlags res 4, [hl] ret ; 1037c2 diff --git a/mobile/mobile_45.asm b/mobile/mobile_45.asm index b2abfe9b9..180ab3758 100644 --- a/mobile/mobile_45.asm +++ b/mobile/mobile_45.asm @@ -4401,7 +4401,7 @@ Function11581e: ; 11581e Function1158c2: ; 1158c2 ld a, e - ld [SwarmFlags], a + ld [wSwarmFlags], a ld a, d ld [$dc21], a xor a @@ -4422,7 +4422,7 @@ Function1158c2: ; 1158c2 ld l, c ld h, b xor a - ld [WeeklyFlags], a + ld [wWeeklyFlags], a .asm_1158e5 ld b, $3 @@ -4447,7 +4447,7 @@ Function1158c2: ; 1158c2 push hl dec hl ld a, c - ld [WeeklyFlags], a + ld [wWeeklyFlags], a .asm_115908 xor a ld [hld], a @@ -4468,7 +4468,7 @@ Function1158c2: ; 1158c2 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 @@ endr 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 @@ endr jp nz, .asm_1158e5 .asm_1159c4 - ld a, [WeeklyFlags] + ld a, [wWeeklyFlags] cp $0 jr z, .asm_1159d8 push hl @@ -5061,9 +5061,9 @@ Function115bc8: ; 115bc8 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 @@ endr 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 @@ Function115cfd: ; 115cfd .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 diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index 1cf9a8351..bdf85464c 100755 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -1198,7 +1198,7 @@ BattleTowerRoomMenu_PlacePickLevelMenu: 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 diff --git a/wram.asm b/wram.asm index 2f9b8dda7..4fbafff42 100644 --- a/wram.asm +++ b/wram.asm @@ -1431,7 +1431,7 @@ wFarCallBCBuffer:: dw ; cfb9 wcfbb:: db -GameTimerPause:: ; cfbc +wGameTimerPause:: ; cfbc ; bit 0 db @@ -2238,7 +2238,7 @@ wBugContestSecsRemaining:: db ; d46d wMapStatusEnd:: ds 2 ; d470 wCrystalData:: -PlayerGender:: ; d472 +wPlayerGender:: ; d472 ; bit 0: ; 0 male ; 1 female @@ -2348,7 +2348,7 @@ CurTimeOfDay:: db ; d848 ds 1 wSecretID:: dw -StatusFlags:: ; d84c +wStatusFlags:: ; d84c ; 0 - pokedex ; 1 - unown dex ; 2 - @@ -2359,7 +2359,7 @@ StatusFlags:: ; d84c ; 7 - bug contest on db -StatusFlags2:: ; d84d +wStatusFlags2:: ; d84d ; 0 - rockets ; 1 - ; 2 - bug contest timer @@ -2377,8 +2377,8 @@ wMomSavingMoney:: db ; d854 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 @@ wCelebiEvent:: db ds 1 -BikeFlags:: ; dbf5 +wBikeFlags:: ; dbf5 ; bit 0: using strength ; bit 1: always on bike ; bit 2: downhill @@ -2599,9 +2599,9 @@ wWhichMomItemSet:: db ; dc18 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 @@ wPlayerDataEnd:: wMapData:: -VisitedSpawns:: flag_array NUM_SPAWNS ; dca5 +wVisitedSpawns:: flag_array NUM_SPAWNS ; dca5 wDigWarpNumber:: db ; dcaa wDigMapGroup:: db ; dcab @@ -2717,7 +2717,7 @@ PokedexSeen:: flag_array NUM_POKEMON ; deb9 EndPokedexSeen:: UnownDex:: ds NUM_UNOWN ; ded9 -UnlockedUnowns:: db ; def3 +wUnlockedUnowns:: db ; def3 wFirstUnownSeen:: db wDayCareMan:: ; def5