You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Prefix engine_flags wram addresses with w
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -193,7 +193,7 @@ SetBoxmonOrEggmonCaughtData: ; 4db53
|
||||
.NotPokecenter2F:
|
||||
call GetWorldMapLocation
|
||||
ld b, a
|
||||
ld a, [PlayerGender]
|
||||
ld a, [wPlayerGender]
|
||||
rrca
|
||||
or b
|
||||
ld [hl], a
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ PlayWhirlpoolSound: ; 8c7d4
|
||||
|
||||
BlindingFlash: ; 8c7e1
|
||||
farcall FadeOutPalettes
|
||||
ld hl, StatusFlags
|
||||
ld hl, wStatusFlags
|
||||
set 2, [hl] ; Flash
|
||||
farcall ReplaceTimeOfDayPals
|
||||
farcall UpdateTimeOfDayPal
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user