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