mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
wStatusFlags/2 bit constants
This commit is contained in:
parent
4d8528f903
commit
3a7f518de4
@ -19,7 +19,7 @@
|
||||
; wStatusFlags
|
||||
const ENGINE_POKEDEX
|
||||
const ENGINE_UNOWN_DEX
|
||||
const ENGINE_POKERUS
|
||||
const ENGINE_CAUGHT_POKERUS
|
||||
const ENGINE_ROCKET_SIGNAL_ON_CH20
|
||||
const ENGINE_CREDITS_SKIP
|
||||
const ENGINE_BUG_CONTEST_ON ; 10
|
||||
@ -28,8 +28,8 @@
|
||||
const ENGINE_SAFARI_ZONE
|
||||
const ENGINE_ROCKETS_IN_RADIO_TOWER
|
||||
const ENGINE_BIKE_SHOP_CALL_ENABLED
|
||||
const ENGINE_GIVE_POKERUS
|
||||
const ENGINE_FLORIA
|
||||
const ENGINE_CAN_USE_SWEET_SCENT
|
||||
const ENGINE_REACHED_GOLDENROD
|
||||
const ENGINE_ROCKETS_IN_MAHOGANY
|
||||
; wBikeFlags
|
||||
const ENGINE_STRENGTH_ACTIVE
|
||||
@ -58,10 +58,10 @@
|
||||
const ENGINE_UNLOCKED_UNOWNS_L_TO_R
|
||||
const ENGINE_UNLOCKED_UNOWNS_S_TO_W
|
||||
const ENGINE_UNLOCKED_UNOWNS_X_TO_Z
|
||||
const ENGINE_UNLOCKED_UNOWNS_UNUSED_5
|
||||
const ENGINE_UNLOCKED_UNOWNS_UNUSED_6 ; 30
|
||||
const ENGINE_UNLOCKED_UNOWNS_UNUSED_4
|
||||
const ENGINE_UNLOCKED_UNOWNS_UNUSED_5 ; 30
|
||||
const ENGINE_UNLOCKED_UNOWNS_UNUSED_6
|
||||
const ENGINE_UNLOCKED_UNOWNS_UNUSED_7
|
||||
const ENGINE_UNLOCKED_UNOWNS_UNUSED_8
|
||||
; wVisitedSpawns
|
||||
const ENGINE_FLYPOINT_KRISS_HOUSE
|
||||
const ENGINE_FLYPOINT_VIRIDIAN_POKECENTER
|
||||
|
@ -142,6 +142,28 @@ SPAWN_RED EQU 2
|
||||
PLAYER_OBJECT EQU 0
|
||||
NUM_OBJECTS EQU $10
|
||||
|
||||
; wStatusFlags:: ; d84c
|
||||
const_def
|
||||
const STATUSFLAGS_POKEDEX_F ; 0
|
||||
const STATUSFLAGS_UNOWN_DEX_F ; 1
|
||||
const STATUSFLAGS_FLASH_F ; 2
|
||||
const STATUSFLAGS_CAUGHT_POKERUS_F ; 3
|
||||
const STATUSFLAGS_ROCKET_SIGNAL_F ; 4
|
||||
const STATUSFLAGS_NO_WILD_ENCOUNTERS_F ; 5
|
||||
const STATUSFLAGS_HALL_OF_FAME_F ; 6
|
||||
const STATUSFLAGS_BUG_CONTEST_ON_F ; 7
|
||||
|
||||
; wStatusFlags2:: ; d84d
|
||||
const_def
|
||||
const STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F ; 0
|
||||
const STATUSFLAGS2_SAFARI_GAME_F ; 1
|
||||
const STATUSFLAGS2_BUG_CONTEST_TIMER_F ; 2
|
||||
const STATUSFLAGS2_UNUSED_F ; 3
|
||||
const STATUSFLAGS2_BIKE_SHOP_CALL_F ; 4
|
||||
const STATUSFLAGS2_CAN_USE_SWEET_SCENT_F ; 5
|
||||
const STATUSFLAGS2_REACHED_GOLDENROD_F ; 6
|
||||
const STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F ; 7
|
||||
|
||||
; wMomSavingMoney:: ; d854
|
||||
MOM_SAVING_SOME_MONEY_F EQU 0
|
||||
MOM_SAVING_HALF_MONEY_F EQU 1
|
||||
@ -204,6 +226,14 @@ CELEBIEVENT_FOREST_IS_RESTLESS_F EQU 2
|
||||
const BIKEFLAGS_ALWAYS_ON_BIKE_F ; 1
|
||||
const BIKEFLAGS_DOWNHILL_F ; 2
|
||||
|
||||
; wSwarmFlags:: ; dc20
|
||||
const_def
|
||||
const SWARMFLAGS_BUENAS_PASSWORD_F ; 0
|
||||
const SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F ; 1
|
||||
const SWARMFLAGS_DUNSPARCE_SWARM_F ; 2
|
||||
const SWARMFLAGS_YANMA_SWARM_F ; 3
|
||||
const SWARMFLAGS_MOBILE_4_F ; 4
|
||||
|
||||
; wLuckyNumberShowFlag:: ; dc9d
|
||||
LUCKYNUMBERSHOW_GAME_OVER_F EQU 0
|
||||
|
||||
|
@ -24,19 +24,20 @@ EngineFlags: ; 80462
|
||||
|
||||
engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer
|
||||
|
||||
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 wStatusFlags, STATUSFLAGS_POKEDEX_F
|
||||
engine_flag wStatusFlags, STATUSFLAGS_UNOWN_DEX_F
|
||||
engine_flag wStatusFlags, STATUSFLAGS_CAUGHT_POKERUS_F
|
||||
engine_flag wStatusFlags, STATUSFLAGS_ROCKET_SIGNAL_F
|
||||
engine_flag wStatusFlags, STATUSFLAGS_HALL_OF_FAME_F
|
||||
engine_flag wStatusFlags, STATUSFLAGS_BUG_CONTEST_ON_F
|
||||
|
||||
engine_flag wStatusFlags2, STATUSFLAGS2_BUG_CONTEST_TIMER_F
|
||||
engine_flag wStatusFlags2, STATUSFLAGS2_SAFARI_GAME_F
|
||||
engine_flag wStatusFlags2, STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F
|
||||
engine_flag wStatusFlags2, STATUSFLAGS2_BIKE_SHOP_CALL_F
|
||||
engine_flag wStatusFlags2, STATUSFLAGS2_CAN_USE_SWEET_SCENT_F
|
||||
engine_flag wStatusFlags2, STATUSFLAGS2_REACHED_GOLDENROD_F
|
||||
engine_flag wStatusFlags2, STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F
|
||||
|
||||
engine_flag wBikeFlags, BIKEFLAGS_STRENGTH_ACTIVE_F ; $18
|
||||
engine_flag wBikeFlags, BIKEFLAGS_ALWAYS_ON_BIKE_F
|
||||
@ -100,7 +101,8 @@ EngineFlags: ; 80462
|
||||
engine_flag wVisitedSpawns, NUM_SPAWNS ; unused
|
||||
|
||||
engine_flag wLuckyNumberShowFlag, LUCKYNUMBERSHOW_GAME_OVER_F
|
||||
engine_flag wStatusFlags2, 3 ; ????
|
||||
|
||||
engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_F
|
||||
|
||||
engine_flag wDailyFlags, 0 ; kurt making balls ; $50
|
||||
engine_flag wDailyFlags, 1 ; ????
|
||||
@ -120,8 +122,8 @@ EngineFlags: ; 80462
|
||||
engine_flag wWeeklyFlags, 6 ; move tutor
|
||||
engine_flag wWeeklyFlags, 7 ; buenas password
|
||||
|
||||
engine_flag wSwarmFlags, 0 ; buenas password 2
|
||||
engine_flag wSwarmFlags, 1 ; goldenrod dept store sale is on
|
||||
engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F
|
||||
engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F
|
||||
|
||||
engine_flag wGameTimerPause, 7 ; $62
|
||||
|
||||
@ -193,7 +195,7 @@ EngineFlags: ; 80462
|
||||
|
||||
engine_flag wPlayerSpriteSetupFlags, PLAYERSPRITESETUP_FEMALE_TO_MALE_F
|
||||
|
||||
engine_flag wSwarmFlags, 2 ; dunsparce swarm ; $a0
|
||||
engine_flag wSwarmFlags, 3 ; yanma swarm
|
||||
engine_flag wSwarmFlags, SWARMFLAGS_DUNSPARCE_SWARM_F ; $a0
|
||||
engine_flag wSwarmFlags, SWARMFLAGS_YANMA_SWARM_F
|
||||
|
||||
; 80648
|
||||
|
@ -493,7 +493,7 @@ CheckTimeEvents: ; 9693a
|
||||
jr nz, .nothing
|
||||
|
||||
ld hl, wStatusFlags2
|
||||
bit 2, [hl] ; bug contest
|
||||
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
||||
jr z, .do_daily
|
||||
|
||||
farcall CheckBugContestTimer
|
||||
|
@ -9,7 +9,7 @@ PlayWhirlpoolSound: ; 8c7d4
|
||||
BlindingFlash: ; 8c7e1
|
||||
farcall Special_FadeOutPalettes
|
||||
ld hl, wStatusFlags
|
||||
set 2, [hl] ; Flash
|
||||
set STATUSFLAGS_FLASH_F, [hl]
|
||||
farcall ReplaceTimeOfDayPals
|
||||
farcall UpdateTimeOfDayPal
|
||||
ld b, SCGB_MAPPALS
|
||||
|
@ -12,7 +12,7 @@ HallOfFame:: ; 0x8640e
|
||||
|
||||
; Enable the Pokégear map to cycle through all of Kanto
|
||||
ld hl, wStatusFlags
|
||||
set 6, [hl] ; hall of fame
|
||||
set STATUSFLAGS_HALL_OF_FAME_F, [hl]
|
||||
|
||||
farcall HallOfFame_InitSaveIfNeeded
|
||||
|
||||
|
@ -19,7 +19,7 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
; If we haven't been to Goldenrod City at least once,
|
||||
; prevent the contraction of Pokerus.
|
||||
ld hl, wStatusFlags2
|
||||
bit 6, [hl]
|
||||
bit STATUSFLAGS2_REACHED_GOLDENROD_F, [hl]
|
||||
ret z
|
||||
call Random
|
||||
ld a, [hRandomAdd]
|
||||
@ -61,7 +61,7 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
|
||||
.TrySpreadPokerus:
|
||||
call Random
|
||||
cp 1 + 33 percent
|
||||
cp 33 percent + 1
|
||||
ret nc ; 1/3 chance
|
||||
|
||||
ld a, [PartyCount]
|
||||
@ -74,7 +74,7 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards
|
||||
|
||||
call Random
|
||||
cp 1 + 50 percent
|
||||
cp 50 percent + 1
|
||||
jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards
|
||||
.checkFollowingMonsLoop
|
||||
add hl, de
|
||||
@ -121,14 +121,15 @@ GivePokerusAndConvertBerries: ; 2ed44
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
; any berry held by a Shuckle may be converted to berry juice
|
||||
ConvertBerriesToBerryJuice: ; 2ede6
|
||||
; If we haven't been to Goldenrod City at least once,
|
||||
; prevent Shuckle from turning held Berry into Berry Juice.
|
||||
ld hl, wStatusFlags2
|
||||
bit 6, [hl]
|
||||
bit STATUSFLAGS2_REACHED_GOLDENROD_F, [hl]
|
||||
ret z
|
||||
call Random
|
||||
cp $10
|
||||
ret nc ; 1/16 chance
|
||||
cp 6 percent + 1 ; 1/16 chance
|
||||
ret nc
|
||||
ld hl, PartyMons
|
||||
ld a, [PartyCount]
|
||||
.partyMonLoop
|
||||
|
@ -122,7 +122,7 @@ PokecenterNurseScript:
|
||||
|
||||
checkphonecall ; elm already called about pokerus
|
||||
iftrue .no
|
||||
checkflag ENGINE_POKERUS ; nurse already talked about pokerus
|
||||
checkflag ENGINE_CAUGHT_POKERUS
|
||||
iftrue .no
|
||||
special Special_CheckPokerus
|
||||
iftrue .pokerus
|
||||
@ -158,7 +158,7 @@ PokecenterNurseScript:
|
||||
closetext
|
||||
|
||||
.pokerus_done
|
||||
setflag ENGINE_POKERUS
|
||||
setflag ENGINE_CAUGHT_POKERUS
|
||||
specialphonecall SPECIALCALL_POKERUS
|
||||
end
|
||||
|
||||
|
@ -37,7 +37,7 @@ SweetScentEncounter: ; 506ef
|
||||
farcall CanUseSweetScent
|
||||
jr nc, .no_battle
|
||||
ld hl, wStatusFlags2
|
||||
bit 2, [hl]
|
||||
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
||||
jr nz, .not_in_bug_contest
|
||||
farcall GetMapEncounterRate
|
||||
ld a, b
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
Special_WarpToSpawnPoint:: ; 97c28
|
||||
ld hl, wStatusFlags2
|
||||
res 1, [hl] ; safari zone?
|
||||
res 2, [hl] ; bug contest
|
||||
res STATUSFLAGS2_SAFARI_GAME_F, [hl]
|
||||
res STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
||||
ret
|
||||
; 97c30
|
||||
|
||||
@ -109,7 +109,7 @@ RandomEncounter:: ; 97cc0
|
||||
call CanUseSweetScent
|
||||
jr nc, .nope
|
||||
ld hl, wStatusFlags2
|
||||
bit 2, [hl] ; bug contest
|
||||
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
||||
jr nz, .bug_contest
|
||||
farcall TryWildEncounter
|
||||
jr nz, .nope
|
||||
@ -150,7 +150,7 @@ WildBattleScript: ; 97cf9
|
||||
|
||||
CanUseSweetScent:: ; 97cfd
|
||||
ld hl, wStatusFlags
|
||||
bit 5, [hl]
|
||||
bit STATUSFLAGS2_CAN_USE_SWEET_SCENT_F, [hl]
|
||||
jr nz, .no
|
||||
ld a, [wEnvironment]
|
||||
cp CAVE
|
||||
@ -264,7 +264,7 @@ DoBikeStep:: ; 97db3
|
||||
; if we've already gotten the call, we don't have to
|
||||
; be here.
|
||||
ld hl, wStatusFlags2
|
||||
bit 4, [hl] ; bike shop call
|
||||
bit STATUSFLAGS2_BIKE_SHOP_CALL_F, [hl]
|
||||
jr z, .NoCall
|
||||
|
||||
; If we're not on the bike, we don't have to be here.
|
||||
@ -315,7 +315,7 @@ DoBikeStep:: ; 97db3
|
||||
xor a
|
||||
ld [wSpecialPhoneCallID + 1], a
|
||||
ld hl, wStatusFlags2
|
||||
res 4, [hl] ; bike shop call
|
||||
res STATUSFLAGS2_BIKE_SHOP_CALL_F, [hl]
|
||||
scf
|
||||
ret
|
||||
|
||||
|
@ -541,7 +541,7 @@ Continue_LoadMenuHeader: ; 5ebf
|
||||
ld [hBGMapMode], a
|
||||
ld hl, .MenuDataHeader_Dex
|
||||
ld a, [wStatusFlags]
|
||||
bit 0, a ; pokedex
|
||||
bit STATUSFLAGS_POKEDEX_F, a
|
||||
jr nz, .show_menu
|
||||
ld hl, .MenuDataHeader_NoDex
|
||||
|
||||
@ -640,7 +640,7 @@ Continue_DisplayBadgeCount: ; 5f58
|
||||
|
||||
Continue_DisplayPokedexNumCaught: ; 5f6b
|
||||
ld a, [wStatusFlags]
|
||||
bit 0, a ; Pokedex
|
||||
bit STATUSFLAGS_POKEDEX_F, a
|
||||
ret z
|
||||
push hl
|
||||
ld hl, PokedexCaught
|
||||
|
@ -166,8 +166,9 @@ MainMenu_GetWhichMenu: ; 49da4
|
||||
cp -1
|
||||
call CloseSRAM
|
||||
jr nz, .mystery_gift
|
||||
; This check makes no difference.
|
||||
ld a, [wStatusFlags]
|
||||
bit 7, a
|
||||
bit STATUSFLAGS_BUG_CONTEST_ON_F, a
|
||||
ld a, $1 ; Continue
|
||||
jr z, .ok
|
||||
jr .ok
|
||||
@ -180,8 +181,9 @@ MainMenu_GetWhichMenu: ; 49da4
|
||||
ret
|
||||
|
||||
.mystery_gift
|
||||
; This check makes no difference.
|
||||
ld a, [wStatusFlags]
|
||||
bit 7, a
|
||||
bit STATUSFLAGS_BUG_CONTEST_ON_F, a
|
||||
jr z, .ok3
|
||||
jr .ok3
|
||||
|
||||
|
@ -82,7 +82,7 @@ RooftopSale: ; 15ac4
|
||||
ld b, BANK(RooftopSaleData1)
|
||||
ld de, RooftopSaleData1
|
||||
ld hl, wStatusFlags
|
||||
bit 6, [hl] ; hall of fame
|
||||
bit STATUSFLAGS_HALL_OF_FAME_F, [hl]
|
||||
jr z, .ok
|
||||
ld b, BANK(RooftopSaleData2)
|
||||
ld de, RooftopSaleData2
|
||||
|
@ -108,7 +108,7 @@ InitPokedex: ; 40063
|
||||
|
||||
Pokedex_CheckUnlockedUnownMode: ; 400a2
|
||||
ld a, [wStatusFlags]
|
||||
bit 1, a
|
||||
bit STATUSFLAGS_UNOWN_DEX_F, a
|
||||
jr nz, .unlocked
|
||||
|
||||
xor a
|
||||
|
@ -764,7 +764,7 @@ PokegearMap_UpdateCursorPosition: ; 910d4
|
||||
|
||||
TownMap_GetKantoLandmarkLimits: ; 910e8
|
||||
ld a, [wStatusFlags]
|
||||
bit 6, a ; ENGINE_CREDITS_SKIP
|
||||
bit STATUSFLAGS_HALL_OF_FAME_F, a
|
||||
jr z, .not_hof
|
||||
ld d, ROUTE_28
|
||||
ld e, PALLET_TOWN
|
||||
@ -1613,7 +1613,7 @@ RadioChannels:
|
||||
.EvolutionRadio:
|
||||
; This station airs in the Lake of Rage area when Rocket are still in Mahogany.
|
||||
ld a, [wStatusFlags]
|
||||
bit 4, a ; ENGINE_ROCKET_SIGNAL_ON_CH20
|
||||
bit STATUSFLAGS_ROCKET_SIGNAL_F, a
|
||||
jr z, .NoSignal
|
||||
ld a, [wPokegearMapPlayerIconLandmark]
|
||||
cp MAHOGANY_TOWN
|
||||
@ -1699,7 +1699,7 @@ LoadStation_BuenasPassword: ; 917a5 (24:57a5)
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, NotBuenasPasswordName
|
||||
ld a, [wStatusFlags2]
|
||||
bit 0, a ; ENGINE_ROCKETS_IN_RADIO_TOWER
|
||||
bit STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F, a
|
||||
ret z
|
||||
ld de, BuenasPasswordName
|
||||
ret
|
||||
@ -2561,7 +2561,7 @@ Pokedex_GetArea: ; 91d11
|
||||
|
||||
.right
|
||||
ld a, [wStatusFlags]
|
||||
bit 6, a ; ENGINE_CREDITS_SKIP
|
||||
bit STATUSFLAGS_HALL_OF_FAME_F, a
|
||||
ret z
|
||||
ld a, [hWY]
|
||||
and a
|
||||
|
@ -5,7 +5,7 @@ PlayRadioShow:
|
||||
jr nc, .ok
|
||||
; If Team Rocket is not occupying the radio tower, we don't need to be here.
|
||||
ld a, [wStatusFlags2]
|
||||
bit 0, a ; checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
|
||||
bit STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F, a
|
||||
jr z, .ok
|
||||
; If we're in Kanto, we don't need to be here.
|
||||
call IsInJohto
|
||||
@ -1171,7 +1171,7 @@ PeoplePlaces4: ; People
|
||||
push af
|
||||
ld hl, PnP_HiddenPeople
|
||||
ld a, [wStatusFlags]
|
||||
bit 6, a ; ENGINE_CREDITS_SKIP
|
||||
bit STATUSFLAGS_HALL_OF_FAME_F, a
|
||||
jr z, .ok
|
||||
ld hl, PnP_HiddenPeople_BeatE4
|
||||
ld a, [wKantoBadges]
|
||||
|
@ -2449,14 +2449,14 @@ Script_wildoff:
|
||||
; script command 0x38
|
||||
|
||||
ld hl, wStatusFlags
|
||||
set 5, [hl]
|
||||
set STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl]
|
||||
ret
|
||||
|
||||
Script_wildon:
|
||||
; script command 0x37
|
||||
|
||||
ld hl, wStatusFlags
|
||||
res 5, [hl]
|
||||
res STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl]
|
||||
ret
|
||||
|
||||
Script_xycompare:
|
||||
|
@ -21,7 +21,7 @@ StartMenu:: ; 125cd
|
||||
farcall ReanchorBGMap_NoOAMUpdate
|
||||
|
||||
ld hl, wStatusFlags2
|
||||
bit 2, [hl] ; bug catching contest
|
||||
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
||||
ld hl, .MenuDataHeader
|
||||
jr z, .GotMenuData
|
||||
ld hl, .ContestMenuDataHeader
|
||||
@ -306,7 +306,7 @@ endr
|
||||
call .FillMenuList
|
||||
|
||||
ld hl, wStatusFlags
|
||||
bit 0, [hl]
|
||||
bit STATUSFLAGS_POKEDEX_F, [hl]
|
||||
jr z, .no_pokedex
|
||||
ld a, STARTMENUITEM_POKEDEX
|
||||
call .AppendMenuList
|
||||
@ -323,7 +323,7 @@ endr
|
||||
and a
|
||||
jr nz, .no_pack
|
||||
ld hl, wStatusFlags2
|
||||
bit 2, [hl] ; bug catching contest
|
||||
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
||||
jr nz, .no_pack
|
||||
ld a, STARTMENUITEM_PACK
|
||||
call .AppendMenuList
|
||||
@ -336,14 +336,14 @@ endr
|
||||
call .AppendMenuList
|
||||
.no_pokegear
|
||||
|
||||
ld a, 3 ; status
|
||||
ld a, STARTMENUITEM_STATUS
|
||||
call .AppendMenuList
|
||||
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
jr nz, .no_save
|
||||
ld hl, wStatusFlags2
|
||||
bit 2, [hl] ; bug catching contest
|
||||
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
||||
ld a, STARTMENUITEM_QUIT
|
||||
jr nz, .write
|
||||
ld a, STARTMENUITEM_SAVE
|
||||
@ -412,7 +412,7 @@ endr
|
||||
|
||||
.DrawBugContestStatusBox: ; 128d1
|
||||
ld hl, wStatusFlags2
|
||||
bit 2, [hl] ; bug catching contest
|
||||
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
||||
ret z
|
||||
farcall StartMenu_DrawBugContestStatusBox
|
||||
ret
|
||||
@ -420,7 +420,7 @@ endr
|
||||
|
||||
.DrawBugContestStatus: ; 128de
|
||||
ld hl, wStatusFlags2
|
||||
bit 2, [hl] ; bug catching contest
|
||||
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
|
||||
jr nz, .contest
|
||||
ret
|
||||
.contest
|
||||
|
@ -216,7 +216,7 @@ ReplaceTimeOfDayPals: ; 8c0e5
|
||||
|
||||
.DarkCave:
|
||||
ld a, [wStatusFlags]
|
||||
bit 2, a ; Flash
|
||||
bit STATUSFLAGS_FLASH_F, a
|
||||
jr nz, .UsedFlash
|
||||
ld a, %11111111 ; 3, 3, 3, 3
|
||||
ld [wTimeOfDayPalset], a
|
||||
|
@ -290,7 +290,7 @@ TrainerCard_Page1_PrintDexCaught_GameTime: ; 2530a (9:530a)
|
||||
ld de, .StatusTilemap
|
||||
call TrainerCardSetup_PlaceTilemapString
|
||||
ld a, [wStatusFlags]
|
||||
bit 0, a ; ENGINE_POKEDEX
|
||||
bit STATUSFLAGS_POKEDEX_F, a
|
||||
ret nz
|
||||
hlcoord 1, 9
|
||||
lb bc, 2, 17
|
||||
|
@ -429,7 +429,7 @@ _SwarmWildmonCheck
|
||||
call CopyCurrMapDE
|
||||
push hl
|
||||
ld hl, wSwarmFlags
|
||||
bit 2, [hl]
|
||||
bit SWARMFLAGS_DUNSPARCE_SWARM_F, [hl]
|
||||
pop hl
|
||||
jr z, .CheckYanma
|
||||
ld a, [wDunsparceMapGroup]
|
||||
@ -446,7 +446,7 @@ _SwarmWildmonCheck
|
||||
.CheckYanma:
|
||||
push hl
|
||||
ld hl, wSwarmFlags
|
||||
bit 3, [hl]
|
||||
bit SWARMFLAGS_YANMA_SWARM_F, [hl]
|
||||
pop hl
|
||||
jr z, _NoSwarmWildmon
|
||||
ld a, [wYanmaMapGroup]
|
||||
|
@ -462,7 +462,7 @@ SpecialMapMusic:: ; 3d62
|
||||
jr z, .surf
|
||||
|
||||
ld a, [wStatusFlags2]
|
||||
bit 2, a
|
||||
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, a
|
||||
jr nz, .contest
|
||||
|
||||
.no
|
||||
|
@ -15,15 +15,15 @@ ResetBikeFlags:: ; 2e56
|
||||
|
||||
ResetFlashIfOutOfCave:: ; 2e5d
|
||||
ld a, [wEnvironment]
|
||||
cp $2
|
||||
jr z, .asm_2e69
|
||||
cp $1
|
||||
jr z, .asm_2e69
|
||||
cp ROUTE
|
||||
jr z, .outdoors
|
||||
cp TOWN
|
||||
jr z, .outdoors
|
||||
ret
|
||||
|
||||
.asm_2e69
|
||||
.outdoors
|
||||
ld hl, wStatusFlags
|
||||
res 2, [hl]
|
||||
res STATUSFLAGS_FLASH_F, [hl]
|
||||
ret
|
||||
; 2e6f
|
||||
|
||||
|
@ -2306,7 +2306,7 @@ GetMapMusic:: ; 2cbd
|
||||
|
||||
.radiotower
|
||||
ld a, [wStatusFlags2]
|
||||
bit 0, a
|
||||
bit STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F, a
|
||||
jr z, .clearedradiotower
|
||||
ld de, MUSIC_ROCKET_OVERTURE
|
||||
jr .done
|
||||
@ -2321,7 +2321,7 @@ GetMapMusic:: ; 2cbd
|
||||
|
||||
.mahoganymart
|
||||
ld a, [wStatusFlags2]
|
||||
bit 7, a
|
||||
bit STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F, a
|
||||
jr z, .clearedmahogany
|
||||
ld de, MUSIC_ROCKET_HIDEOUT
|
||||
jr .done
|
||||
|
@ -26,7 +26,7 @@ GoldenrodCity_MapScripts:
|
||||
|
||||
.FlyPointAndFloria:
|
||||
setflag ENGINE_FLYPOINT_GOLDENROD
|
||||
setflag ENGINE_FLORIA
|
||||
setflag ENGINE_REACHED_GOLDENROD
|
||||
checkevent EVENT_MET_FLORIA
|
||||
iftrue .FloriaDone
|
||||
clearevent EVENT_FLORIA_AT_SUDOWOODO
|
||||
|
@ -7894,7 +7894,7 @@ Function1036f9: ; 1036f9
|
||||
Function103700: ; 103700
|
||||
ld c, $0a
|
||||
ld hl, wSwarmFlags
|
||||
bit 4, [hl]
|
||||
bit SWARMFLAGS_MOBILE_4_F, [hl]
|
||||
jr z, .asm_10370f
|
||||
farcall Function1008a6
|
||||
|
||||
@ -7991,18 +7991,18 @@ Special_Function103780: ; 103780
|
||||
Function10378c: ; 10378c
|
||||
ld c, 0
|
||||
ld hl, wSwarmFlags
|
||||
bit 4, [hl]
|
||||
bit SWARMFLAGS_MOBILE_4_F, [hl]
|
||||
jr nz, .already_set
|
||||
ld c, $01
|
||||
ld c, 1
|
||||
ld hl, wSwarmFlags
|
||||
set 4, [hl]
|
||||
set SWARMFLAGS_MOBILE_4_F, [hl]
|
||||
|
||||
.already_set
|
||||
push bc
|
||||
farcall Link_SaveGame
|
||||
pop bc
|
||||
jr c, .failed_to_save
|
||||
ld a, $01
|
||||
ld a, 1
|
||||
ld [ScriptVar], a
|
||||
ld a, c
|
||||
and a
|
||||
@ -8017,7 +8017,7 @@ Function10378c: ; 10378c
|
||||
and a
|
||||
ret z
|
||||
ld hl, wSwarmFlags
|
||||
res 4, [hl]
|
||||
res SWARMFLAGS_MOBILE_4_F, [hl]
|
||||
ret
|
||||
; 1037c2
|
||||
|
||||
|
@ -1199,15 +1199,15 @@ BattleTowerRoomMenu_PlacePickLevelMenu:
|
||||
ld a, $1
|
||||
ld [rSVBK], a
|
||||
ld a, [wStatusFlags]
|
||||
bit 6, a ; Hall Of Fame
|
||||
bit STATUSFLAGS_HALL_OF_FAME_F, a
|
||||
jr nz, .asm_11896b
|
||||
ld hl, Strings_Ll0ToL40 ; Address to list of strings with the choosable levels
|
||||
ld a, 5 ; 4 levels to choose from, including 'Cancel'-option
|
||||
ld hl, Strings_Ll0ToL40 ; Address to list of strings with the choosable levels
|
||||
ld a, 5 ; 4 levels to choose from, including 'Cancel'-option
|
||||
jr .asm_118970
|
||||
|
||||
.asm_11896b
|
||||
ld hl, Strings_L10ToL100 ; Address to list of strings with the choosable levels
|
||||
ld a, 11 ; 10 levels to choose from, including 'Cancel'-option
|
||||
ld hl, Strings_L10ToL100 ; Address to list of strings with the choosable levels
|
||||
ld a, 11 ; 10 levels to choose from, including 'Cancel'-option
|
||||
|
||||
.asm_118970
|
||||
ld [wcd4a], a
|
||||
|
10
wram.asm
10
wram.asm
@ -2420,8 +2420,8 @@ wSecretID:: dw
|
||||
wStatusFlags:: ; d84c
|
||||
; bit 0: pokedex
|
||||
; bit 1: unown dex
|
||||
; bit 2: unused
|
||||
; bit 3: pokerus
|
||||
; bit 2: flash
|
||||
; bit 3: caught pokerus
|
||||
; bit 4: rocket signal
|
||||
; bit 5: wild encounters on/off
|
||||
; bit 6: hall of fame
|
||||
@ -2430,12 +2430,12 @@ wStatusFlags:: ; d84c
|
||||
|
||||
wStatusFlags2:: ; d84d
|
||||
; bit 0: rockets
|
||||
; bit 1: unused
|
||||
; bit 1: safari game (unused)
|
||||
; bit 2: bug contest timer
|
||||
; bit 3: unused
|
||||
; bit 4: bike shop call
|
||||
; bit 5: pokerus
|
||||
; bit 6: berry juice
|
||||
; bit 5: can use sweet scent
|
||||
; bit 6: reached goldenrod
|
||||
; bit 7: rockets in mahogany
|
||||
db
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user