Clean up WRAM, SRAM, and HRAM space (#6)

This commit is contained in:
xCrystal 2023-07-25 19:49:25 +02:00
parent 787caa2147
commit 2d5bd722cd
10 changed files with 19 additions and 335 deletions

View File

@ -51,11 +51,3 @@ DEF MOBILE_EVENT_OBJECT_GS_BALL EQU $b
const BATTLETOWERTEXT_INTRO
const BATTLETOWERTEXT_WIN_TEXT
const BATTLETOWERTEXT_LOSS_TEXT
; sBattleTowerChallengeState values
const_def
const BATTLETOWER_NO_CHALLENGE
const BATTLETOWER_SAVED_AND_LEFT
const BATTLETOWER_CHALLENGE_IN_PROGRESS
const BATTLETOWER_WON_CHALLENGE
const BATTLETOWER_RECEIVED_REWARD

View File

@ -39,7 +39,7 @@
DEF NUM_TILESETS EQU const_value - 1
; wTileset struct size
DEF TILESET_LENGTH EQU 15
DEF TILESET_LENGTH EQU 13
; roof length (see gfx/tilesets/roofs)
DEF ROOF_LENGTH EQU 9

View File

@ -1,7 +1,6 @@
MACRO tileset
dba \1GFX, \1Meta, \1Coll
dw \1Anim
dw NULL
dw \1PalMap
ENDM

View File

@ -39,8 +39,8 @@ LoadMenuMonIcon:
dw NamingScreen_InitAnimatedMonIcon ; MONICON_NAMINGSCREEN
dw MoveList_InitAnimatedMonIcon ; MONICON_MOVES
dw Trade_LoadMonIconGFX ; MONICON_TRADE
dw Mobile_InitAnimatedMonIcon ; MONICON_MOBILE1
dw Mobile_InitPartyMenuBGPal71 ; MONICON_MOBILE2
dw Unused_GetPartyMenuMonIcon ; MONICON_MOBILE1
dw Unused_GetPartyMenuMonIcon ; MONICON_MOBILE2
dw Unused_GetPartyMenuMonIcon ; MONICON_UNUSED
Unused_GetPartyMenuMonIcon:
@ -80,43 +80,6 @@ Unused_GetPartyMenuMonIcon:
ld [hl], a
ret
Mobile_InitAnimatedMonIcon:
call PartyMenu_InitAnimatedMonIcon
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld a, SPRITE_ANIM_SEQ_NULL
ld [hl], a
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, 9 * 8
ld [hl], a
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, 9 * 8
ld [hl], a
ret
Mobile_InitPartyMenuBGPal71:
call InitPartyMenuIcon
call SetPartyMonIconAnimSpeed
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld a, SPRITE_ANIM_SEQ_NULL
ld [hl], a
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, 3 * 8
ld [hl], a
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, 12 * 8
ld [hl], a
ld a, c
ld [wc608], a
ld a, b
ld [wc608 + 1], a
ret
PartyMenu_InitAnimatedMonIcon:
call InitPartyMenuIcon
call .SpawnItemIcon

View File

@ -278,15 +278,6 @@ _SaveGameData:
call UpdateStackTop
farcall BackupPartyMonMail
farcall SaveRTC
ld a, BANK(sBattleTowerChallengeState)
call OpenSRAM
ld a, [sBattleTowerChallengeState]
cp BATTLETOWER_RECEIVED_REWARD
jr nz, .ok
xor a
ld [sBattleTowerChallengeState], a
.ok
call CloseSRAM
ret
UpdateStackTop:
@ -659,15 +650,6 @@ LoadPlayerData:
ld de, wCurMapData
ld bc, wCurMapDataEnd - wCurMapData
call CopyBytes
call CloseSRAM
ld a, BANK(sBattleTowerChallengeState)
call OpenSRAM
ld a, [sBattleTowerChallengeState]
cp BATTLETOWER_RECEIVED_REWARD
jr nz, .not_4
ld a, BATTLETOWER_WON_CHALLENGE
ld [sBattleTowerChallengeState], a
.not_4
call CloseSRAM
ret

View File

@ -7,7 +7,6 @@ ResetMapBufferEventFlags::
ResetBikeFlags::
xor a
ld hl, wBikeFlags
ld [hli], a
ld [hl], a
ret

View File

@ -285,7 +285,6 @@ SRAM $01
"Link Battle Data"
"SRAM Hall of Fame"
"SRAM Crystal Data"
"SRAM Battle Tower"
SRAM $02
"Boxes 1-7"
SRAM $03

View File

@ -11,8 +11,6 @@ hRTCHours:: db
hRTCMinutes:: db
hRTCSeconds:: db
ds 2
hHours:: db
ds 1
hMinutes:: db
@ -20,12 +18,8 @@ hMinutes:: db
hSeconds:: db
ds 1
ds 1
hVBlankCounter:: db
ds 1
hROMBank:: db
hVBlank:: db
hMapEntryMethod:: db
@ -44,8 +38,6 @@ hJoyLast:: db
hInMenu:: db
ds 1
hPrinter:: db
hGraphicStartTile:: db
hMoveMon:: db
@ -86,17 +78,6 @@ hMathBuffer:: ds 5
NEXTU
; PrintNum scratch space
hPrintNumBuffer:: ds 10
NEXTU
; Mystery Gift
hMGExchangedByte:: db
hMGExchangedWord:: dw
hMGNumBits:: db
hMGChecksum:: dw
ds 1
hMGUnusedMsgLength:: db
hMGRole:: db
hMGStatusFlags:: db
ENDU
UNION
@ -145,8 +126,6 @@ hSPBuffer:: dw
hBGMapUpdate:: db
hBGMapTileCount:: db
ds 1
hMapAnims:: db
hTileAnimFrame:: db
@ -172,5 +151,3 @@ if DEF(_DEBUG)
hDebugRoomMenuPage::
endc
hClockResetTrigger:: db
ds 19

View File

@ -32,7 +32,6 @@ sMailbox{d:n}Backup:: mailmsg sMailbox{d:n}Backup
endr
sRTCStatusFlags:: db
ds 7
sLuckyNumberDay:: db
sLuckyIDNumber:: dw
@ -49,8 +48,6 @@ sBackupCurMapData:: ds wCurMapDataEnd - wCurMapData
sBackupPokemonData:: ds wPokemonDataEnd - wPokemonData
sBackupGameDataEnd::
ds $18a
sBackupChecksum:: dw
sBackupCheckValue2:: db ; loaded with SAVE_CHECK_VALUE_2, used to check save corruption
@ -78,8 +75,6 @@ sCurMapData:: ds wCurMapDataEnd - wCurMapData
sPokemonData:: ds wPokemonDataEnd - wPokemonData
sGameDataEnd::
ds $18a
sChecksum:: dw
sCheckValue2:: db ; loaded with SAVE_CHECK_VALUE_2, used to check save corruption
@ -89,8 +84,6 @@ SECTION "Active Box", SRAM
sBox:: box sBox
ds $100
SECTION "Link Battle Data", SRAM
@ -122,34 +115,6 @@ SECTION "SRAM Crystal Data", SRAM
sCrystalData:: ds wCrystalDataEnd - wCrystalData
SECTION "SRAM Battle Tower", SRAM
; Battle Tower data must be in SRAM because you can save and leave between battles
sBattleTowerChallengeState::
; 0: normal
; 2: battle tower
db
sNrOfBeatenBattleTowerTrainers:: db
sBTChoiceOfLevelGroup:: db
; Battle Tower trainers are saved here, so nobody appears more than once
sBTTrainers:: ds BATTLETOWER_STREAK_LENGTH
sBattleTowerSaveFileFlags:: db
sBattleTowerReward:: db
sBTMonOfTrainers::
; team of previous trainer
; sBTMonPrevTrainer1 - sBTMonPrevTrainer3
for n, 1, BATTLETOWER_PARTY_LENGTH + 1
sBTMonPrevTrainer{d:n}:: db
endr
; team of preprevious trainer
; sBTMonPrevPrevTrainer1 - sBTMonPrevPrevTrainer3
for n, 1, BATTLETOWER_PARTY_LENGTH + 1
sBTMonPrevPrevTrainer{d:n}:: db
endr
; The PC boxes will not fit into one SRAM bank,
; so they use multiple SECTIONs
DEF box_n = 0

View File

@ -114,8 +114,6 @@ SECTION "WRAM", WRAM0
wLZAddress:: dw
wLZBank:: db
ds 1
wBoxAlignment:: db
wInputType:: db
@ -131,8 +129,6 @@ wUnusedScriptByte:: db
wMapTimeOfDay:: db
ds 3
wPrinterConnectionOpen:: db
wPrinterOpcode:: db
wPrevDexEntry:: db
@ -150,16 +146,12 @@ wScriptVar:: db
wPlayerNextMovement:: db
wPlayerMovement:: db
ds 2
wMovementObject::
db
wMovementDataBank:: db
wMovementDataAddress:: dw
wIndexedMovement2Pointer:: dw
ds 2
wContinueReadingMovement:: db
UNION
@ -167,7 +159,6 @@ wObjectPriorities:: ds NUM_OBJECT_STRUCTS
NEXTU
wMovementPointer:: dw
ds 3
wTempObjectCopyMapObjectIndex:: db
wTempObjectCopySprite:: db
wTempObjectCopySpriteVTile:: db
@ -179,8 +170,6 @@ wTempObjectCopyY:: db
wTempObjectCopyRadius:: db
ENDU
ds 1
wTileDown:: db
wTileUp:: db
wTileLeft:: db
@ -237,8 +226,6 @@ wGlobalAnimXOffset:: db
wSpriteAnimDataEnd::
ds 11
SECTION "Sprites", WRAM0
@ -288,10 +275,7 @@ wBattleMonNickname:: ds MON_NAME_LENGTH
wBattleMon:: battle_struct wBattleMon
ds 2
wWildMon:: db
ds 1
wEnemyTrainerItem1:: db
wEnemyTrainerItem2:: db
@ -369,15 +353,12 @@ wBattleScriptBufferAddress:: dw
wTurnEnded:: db
ds 1
wPlayerStats::
wPlayerAttack:: dw
wPlayerDefense:: dw
wPlayerSpeed:: dw
wPlayerSpAtk:: dw
wPlayerSpDef:: dw
ds 1
wEnemyStats::
wEnemyAttack:: dw
@ -385,7 +366,6 @@ wEnemyDefense:: dw
wEnemySpeed:: dw
wEnemySpAtk:: dw
wEnemySpDef:: dw
ds 1
wPlayerStatLevels::
wPlayerAtkLevel:: db
@ -395,7 +375,7 @@ wPlayerSAtkLevel:: db
wPlayerSDefLevel:: db
wPlayerAccLevel:: db
wPlayerEvaLevel:: db
ds 1
ds 1 ; NUM_LEVEL_STATS
wEnemyStatLevels::
wEnemyAtkLevel:: db
@ -405,17 +385,15 @@ wEnemySAtkLevel:: db
wEnemySDefLevel:: db
wEnemyAccLevel:: db
wEnemyEvaLevel:: db
ds 1
ds 1 ; NUM_LEVEL_STATS
wEnemyTurnsTaken:: db
wPlayerTurnsTaken:: db
ds 1
wPlayerSubstituteHP:: db
wEnemySubstituteHP:: db
wUnusedPlayerLockedMove:: db
ds 1
wCurPlayerMove:: db
wCurEnemyMove:: db
@ -425,7 +403,7 @@ wLinkBattleRNCount::
db
wEnemyItemState:: db
ds 2
wCurEnemyMoveNum:: db
wEnemyHPAtTimeOfPlayerSwitch:: dw
@ -433,7 +411,7 @@ wPayDayMoney:: ds 3
wSafariMonAngerCount:: db ; unreferenced
wSafariMonEating:: db
ds 1
wEnemyBackupDVs:: dw ; used when enemy is transformed
wAlreadyDisobeyed:: db
@ -469,14 +447,10 @@ wEnemyScreens::
wPlayerSafeguardCount:: db
wPlayerLightScreenCount:: db
wPlayerReflectCount:: db
ds 1
wEnemySafeguardCount:: db
wEnemyLightScreenCount:: db
wEnemyReflectCount:: db
ds 1
ds 1
wBattleWeather::
; 00 normal
@ -579,7 +553,6 @@ NEXTU
wDebugMiddleColors::
wDebugLightColor:: ds 2
wDebugDarkColor:: ds 2
ds 6
wDebugRedChannel:: db
wDebugGreenChannel:: db
wDebugBlueChannel:: db
@ -602,17 +575,6 @@ wUnknownMon:: party_struct wUnknownMon
wUnknownMonOT:: ds NAME_LENGTH_JAPANESE - 1
wUnknownMonNick:: ds NAME_LENGTH_JAPANESE - 1
wUnknownMonMail:: mailmsg_jp wUnknownMonMail
NEXTU
wc608:: ds 7
wc60f:: ds 9
wc618:: ds 48
wc648:: ds 2
wc64a:: ds 62
wc688:: ds 2
wc68a:: ds 15
wc699:: ds 15
wc6a8:: ds 40
ENDU
; This union spans 280 bytes.
@ -642,14 +604,8 @@ wDexListingCursorBackup:: db
wBackupDexListingCursor:: db
wBackupDexListingPage:: db
wDexCurLocation:: db
if DEF(_CRYSTAL11)
wPokedexStatus:: db
wPokedexDataEnd::
else
wPokedexDataEnd::
ds 1
endc
ds 2
NEXTU
; pokegear
@ -703,10 +659,8 @@ wCurReelStopped:: ds 3
wPayout:: dw
wCurReelXCoord:: db
wCurReelYCoord:: db
ds 2
wSlotBuildingMatch:: db
wSlotsDataEnd::
ds 28
wSlotsEnd::
NEXTU
@ -720,7 +674,6 @@ wDiscardPileEnd::
; beta poker game
wBetaPokerSGBPals:: dw
ds 1
wBetaPokerSGBAttr:: db
wBetaPokerSGBCol:: db
wBetaPokerSGBRow:: db
@ -788,11 +741,9 @@ wPrinterSendByteCounter:: dw
; tilemap backup?
wPrinterTilemapBuffer:: ds SCREEN_HEIGHT * SCREEN_WIDTH
wPrinterStatus:: db
ds 1
; High nibble is for margin before the image, low nibble is for after.
wPrinterMargins:: db
wPrinterExposureTime:: db
ds 16
wGameboyPrinterRAMEnd::
@ -1002,8 +953,6 @@ wEnemyHPPal:: db
wHPPals:: ds PARTY_LENGTH
wCurHPPal:: db
ds 7
wSGBPals:: ds 48
wAttrmap::
@ -1020,9 +969,7 @@ wAttrmapEnd::
UNION
; addresses dealing with serial comms
ds 1
wcf42:: db
ds 1
wcf44:: db
wcf45:: db
@ -1034,10 +981,8 @@ ENDU
UNION
wOtherPlayerLinkMode:: db
wOtherPlayerLinkAction:: db
ds 3
wPlayerLinkAction:: db
wUnusedLinkAction:: db
ds 3
NEXTU
wLinkReceivedSyncBuffer:: ds 5
wLinkPlayerSyncBuffer:: ds 5
@ -1051,10 +996,7 @@ wCurSpecies:: db
wNamedObjectType:: db
ds 1
wJumptableIndex::
db
wJumptableIndex:: db
UNION
; intro data
@ -1075,14 +1017,7 @@ wCreditsLYOverride:: db
NEXTU
; pokedex
wPrevDexEntryJumptableIndex:: db
if DEF(_CRYSTAL11)
wPrevDexEntryBackup:: db
else
; BUG: Crystal 1.0 reused the same byte in WRAM for
; wPokedexStatus and wPrevDexEntryBackup.
wPokedexStatus::
wPrevDexEntryBackup:: db
endc
wUnusedPokedexByte:: db
NEXTU
@ -1106,7 +1041,6 @@ wTrainerCardBadgeAttributes:: db
NEXTU
; slot machine
wSlotsDelay:: db
ds 1
wUnusedSlotReelIconDelay:: db
NEXTU
@ -1281,8 +1215,6 @@ wGameTimerPaused::
; bit 7: something mobile
db
ds 1
wJoypadDisable::
; bits 4, 6, or 7 can be used to disable joypad input
; bit 4
@ -1290,15 +1222,11 @@ wJoypadDisable::
; bit 7: ongoing sgb data transfer
db
ds 1
wInBattleTowerBattle::
; 0 not in BattleTower-Battle
; 1 BattleTower-Battle
db
ds 1
wFXAnimID:: dw
wPlaceBallsX:: db
@ -1313,8 +1241,6 @@ wOBP1:: db
wNumHits:: db
ds 1
wOptions::
; bit 0-2: number of frames to delay when printing text
; fast 1; mid 3; slow 5
@ -1371,7 +1297,6 @@ SECTION UNION "Miscellaneous WRAM 1", WRAMX
wBufferMonNickname:: ds MON_NAME_LENGTH
wBufferMonOT:: ds NAME_LENGTH
wBufferMon:: party_struct wBufferMon
ds 8
wMonOrItemNameBuffer:: ds NAME_LENGTH
ds NAME_LENGTH
@ -1406,7 +1331,6 @@ wBugContestResults::
bugcontestwinner wBugContestThirdPlace
wBugContestWinnersEnd::
bugcontestwinner wBugContestTemp
ds 4
wBugContestWinnerName:: ds NAME_LENGTH
@ -1454,7 +1378,6 @@ wNextRadioLine:: db
wRadioTextDelay:: db
wNumRadioLinesPrinted:: db
wOaksPKMNTalkSegmentCounter:: db
ds 5
wRadioText:: ds 2 * SCREEN_WIDTH
@ -1494,7 +1417,6 @@ wPrintedUnownTileDest:: ds 1 tiles
SECTION UNION "Miscellaneous WRAM 1", WRAMX
; trainer HUD data
ds 1
wPlaceBallsDirection:: db
wTrainerHUDTiles:: ds 4
@ -1543,7 +1465,6 @@ SECTION UNION "Miscellaneous WRAM 1", WRAMX
UNION
wBoxNameBuffer:: ds BOX_NAME_LENGTH
NEXTU
ds 1
wBillsPCTempListIndex:: db
wBillsPCTempBoxCount:: db
ENDU
@ -1608,12 +1529,6 @@ wDebugColorIsShiny:: db
wDebugColorCurTMHM:: db
SECTION UNION "Miscellaneous WRAM 1", WRAMX
; Every previous SECTION UNION takes up 60 or fewer bytes,
; except the initial "mon buffer" one.
ds 60
UNION
; trainer data
wSeenTrainerBank:: db
@ -1668,7 +1583,6 @@ wCurCoordEvent::
wCurCoordEventSceneID:: db
wCurCoordEventMapY:: db
wCurCoordEventMapX:: db
ds 1
wCurCoordEventScriptAddr:: dw
NEXTU
@ -1700,12 +1614,10 @@ wFacingDirection:: db
wWalkingX:: db
wWalkingY:: db
wWalkingTile:: db
ds 6
wPlayerTurningDirection:: db
NEXTU
; std script buffer
ds 1
wJumpStdScriptBuffer:: ds 3
NEXTU
@ -1717,12 +1629,10 @@ wAvailableCallers:: ds CONTACT_LIST_SIZE
NEXTU
; phone caller contact
ds 1
wCallerContact:: ds PHONE_CONTACT_SIZE
NEXTU
; backup menu data
ds 7
wMenuCursorPositionBackup:: db
wMenuScrollPositionBackup:: db
@ -1734,8 +1644,6 @@ wPoisonStepPartyFlags:: ds PARTY_LENGTH
wPoisonStepDataEnd::
ENDU
ds 23
SECTION "More WRAM 1", WRAMX
@ -1749,8 +1657,6 @@ wStringBuffer5:: ds STRING_BUFFER_LENGTH
wBattleMenuCursorPosition:: db
ds 1
wCurBattleMon::
; index of the player's mon currently in battle (0-5)
db
@ -1767,7 +1673,6 @@ wBallsPocketCursor:: db
wTMHMPocketCursor:: db
wPCItemsScrollPosition:: db
ds 1
wItemsPocketScrollPosition:: db
wKeyItemsPocketScrollPosition:: db
wBallsPocketScrollPosition:: db
@ -1865,8 +1770,6 @@ wSpriteFlags:: db
wHandlePlayerStep:: db
ds 1
wPartyMenuActionText:: db
wItemAttributeValue:: db
@ -1875,8 +1778,6 @@ wCurPartyLevel:: db
wScrollingMenuListSize:: db
ds 1
; used when following a map warp
wNextWarp:: db
wNextMapGroup:: db
@ -1901,7 +1802,6 @@ wUsedSprites:: ds SPRITE_GFX_LIST_CAPACITY * 2
wUsedSpritesEnd::
NEXTU
ds 31
wd173:: db ; related to command queue type 3
ENDU
@ -1943,7 +1843,6 @@ wTilesetBlocksAddress:: dw
wTilesetCollisionBank:: db
wTilesetCollisionAddress:: dw
wTilesetAnim:: dw ; bank 3f
ds 2 ; unused
wTilesetPalettes:: dw ; bank 3f
wTilesetEnd::
assert wTilesetEnd - wTileset == TILESET_LENGTH
@ -2024,7 +1923,6 @@ wCutWhirlpoolReplacementBlock:: db
wCutWhirlpoolAnimationType::
wStrengthSpecies::
wFishingResult:: db
ds 1
wFieldMoveDataEnd::
NEXTU
@ -2080,7 +1978,6 @@ wRestartClockMin:: db
NEXTU
; link
ds 9
wLinkBattleRNPreamble:: ds SERIAL_RN_PREAMBLE_LENGTH
wLinkBattleRNs:: ds SERIAL_RNS_LENGTH
@ -2091,7 +1988,6 @@ wRegisteredPhoneNumbers::
wListMovesLineSpacing:: db
wSwitchMonTo:: db
wSwitchMonFrom:: db
ds 4
wCurEnemyItem:: db
NEXTU
@ -2175,8 +2071,6 @@ wCurBaseDataEnd::
wCurDamage:: dw
ds 2
wMornEncounterRate:: db
wDayEncounterRate:: db
wNiteEncounterRate:: db
@ -2210,8 +2104,6 @@ wMonTriedToEvolve:: db
wTimeOfDay:: db
ds 1
SECTION "Enemy Party", WRAMX
@ -2227,7 +2119,6 @@ NEXTU
wOTPartyData::
wOTPlayerName:: ds NAME_LENGTH
wOTPlayerID:: dw
ds 8
wOTPartyCount:: db
wOTPartySpecies:: ds PARTY_LENGTH
wOTPartyEnd:: db ; older code doesn't check PartyCount
@ -2266,8 +2157,6 @@ wDudeNumBalls:: db
wDudeBalls:: ds 2 * 4 + 1
ENDU
ds 4
wBattleAction:: db
wLinkBattleSentAction:: db
@ -2277,7 +2166,6 @@ wMapEventStatus:: db
wScriptFlags::
; bit 3: run deferred script
db
ds 1
wScriptFlags2::
; bit 0: count steps
; bit 1: coord events
@ -2293,7 +2181,7 @@ wScriptPos:: dw
wScriptStackSize:: db
wScriptStack:: ds 3 * 5
ds 1
wScriptDelay:: db
wDeferredScriptBank::
@ -2302,14 +2190,13 @@ wScriptTextBank::
wDeferredScriptAddr::
wScriptTextAddr::
dw
ds 1
wWildEncounterCooldown:: db
wXYComparePointer:: dw
ds 4
wBattleScriptFlags:: db
ds 1
wPlayerSpriteSetupFlags::
; bit 7: if set, cancel wPlayerAction
; bit 6: RefreshMapSprites doesn't reload player sprite
@ -2322,23 +2209,15 @@ wMapReentryScriptQueueFlag:: db
wMapReentryScriptBank:: db
wMapReentryScriptAddress:: dw
ds 4
wTimeCyclesSinceLastCall:: db
wReceiveCallDelay_MinsRemaining:: db
wReceiveCallDelay_StartTime:: ds 3
ds 3
wBugContestMinsRemaining:: db
wBugContestSecsRemaining:: db
ds 2
wMapStatusEnd::
ds 2
wCrystalData::
wPlayerGender::
; bit 0:
@ -2376,8 +2255,6 @@ wStartSecond:: db
wRTC:: ds 4
ds 4
wDST::
; bit 7: dst
db
@ -2389,12 +2266,8 @@ wGameTimeMinutes:: db
wGameTimeSeconds:: db
wGameTimeFrames:: db
ds 2
wCurDay:: db
ds 1
wObjectFollow_Leader:: db
wObjectFollow_Follower:: db
wCenteredObject:: db
@ -2410,8 +2283,6 @@ endr
wCmdQueue:: ds CMDQUEUE_CAPACITY * CMDQUEUE_ENTRY_SIZE
ds 40
wMapObjects::
wPlayerObject:: map_object wPlayer ; player is map object 0
; wMap1Object - wMap15Object
@ -2424,15 +2295,12 @@ wObjectMasks:: ds NUM_OBJECTS
wVariableSprites:: ds $100 - SPRITE_VARS
wEnteredMapFromContinue:: db
ds 2
wTimeOfDayPal:: db
ds 4
wTimeOfDayPalFlags:: db
wTimeOfDayPalset:: db
wCurTimeOfDay:: db
ds 1
wSecretID:: dw
wStatusFlags::
; bit 0: pokedex
@ -2495,79 +2363,38 @@ wPokegearFlags::
db
wRadioTuningKnob:: db
wLastDexMode:: db
ds 1
wWhichRegisteredItem:: db
wRegisteredItem:: db
wPlayerState:: db
wHallOfFameCount:: db
ds 1
wTradeFlags:: flag_array NUM_NPC_TRADES
ds 1
wMooMooBerries:: db
wUndergroundSwitchPositions:: db
wFarfetchdPosition:: db
ds 13
; map scene ids (data/maps/scenes.asm:MapScenes)
; wPokecenter2FSceneID:: db
ds 49
; fight counts
wJackFightCount:: db
wBeverlyFightCount:: db ; unreferenced
wHueyFightCount:: db
wGavenFightCount:: db
wBethFightCount:: db
wJoseFightCount:: db
wReenaFightCount:: db
wJoeyFightCount:: db
wWadeFightCount:: db
wRalphFightCount:: db
wLizFightCount:: db
wAnthonyFightCount:: db
wToddFightCount:: db
wGinaFightCount:: db
wIrwinFightCount:: db ; unreferenced
wArnieFightCount:: db
wAlanFightCount:: db
wDanaFightCount:: db
wChadFightCount:: db
wDerekFightCount:: db ; unreferenced
wTullyFightCount:: db
wBrentFightCount:: db
wTiffanyFightCount:: db
wVanceFightCount:: db
wWiltonFightCount:: db
wKenjiFightCount:: db ; unreferenced
wParryFightCount:: db
wErinFightCount:: db
ds 100
wEventFlags:: flag_array NUM_EVENTS
wCurBox:: db
ds 2
wBoxNames:: ds BOX_NAME_LENGTH * NUM_BOXES
wCelebiEvent::
; bit 2: forest is restless
db
ds 1
wBikeFlags::
; bit 0: using strength
; bit 1: always on bike
; bit 2: downhill
db
ds 1 ; cleared along with wBikeFlags by ResetBikeFlags
wCurMapSceneScriptPointer:: dw
@ -2585,8 +2412,6 @@ wCurMapSceneScriptsPointer:: dw
wCurMapCallbackCount:: db
wCurMapCallbacksPointer:: dw
ds 2
; Sprite id of each decoration
wDecoBed:: db
wDecoCarpet:: db
@ -2606,39 +2431,29 @@ wDailyResetTimer:: dw
wDailyFlags1:: db
wDailyFlags2:: db
wSwarmFlags:: db
ds 2
wTimerEventStartDay:: db
ds 3
wFruitTreeFlags:: flag_array NUM_FRUIT_TREES
ds 2
wLuckyNumberDayTimer:: dw
ds 2
wSpecialPhoneCallID:: db
ds 3
wBugContestStartTime:: ds 4 ; day, hour, min, sec
wUnusedTwoDayTimerOn:: db
wUnusedTwoDayTimer:: db
wUnusedTwoDayTimerStartDate:: db
ds 4
wMobileOrCable_LastSelection:: db
wdc41:: ds 1
wdc42:: ds 8
wBuenasPassword:: db
wBlueCardBalance:: db
wKenjiBreakTimer:: ds 2 ; Kenji
wYanmaMapGroup:: db
wYanmaMapNumber:: db
ds 18
wStepCount:: db
wPoisonStepCount:: db
ds 2
wHappinessStepCount:: db
ds 1
wParkBallsRemaining::
wSafariBallsRemaining:: db
@ -2646,10 +2461,7 @@ wSafariTimeRemaining:: dw
wPhoneList:: ds CONTACT_LIST_SIZE + 1
ds 22
wLuckyNumberShowFlag:: db
ds 1
wLuckyIDNumber:: dw
wRepelEffect:: db ; If a Repel is in use, it contains the nr of steps it's still active
@ -2672,8 +2484,6 @@ wBackupWarpNumber:: db
wBackupMapGroup:: db
wBackupMapNumber:: db
ds 3
wLastSpawnMapGroup:: db
wLastSpawnMapNumber:: db
@ -2714,8 +2524,6 @@ wPartyMon{d:n}Nickname:: ds MON_NAME_LENGTH
endr
wPartyMonNicknamesEnd::
ds 22
wPokedexCaught:: flag_array NUM_POKEMON
wEndPokedexCaught::