Further WRAM organization

This commit is contained in:
Remy Oukaour 2017-12-09 15:14:51 -05:00
parent 5a5df2ab87
commit e3c686f6df
13 changed files with 211 additions and 323 deletions

View File

@ -2581,8 +2581,8 @@ BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
ld a, h ld a, h
push bc push bc
push af push af
ld hl, BGPals ; BGPals ld hl, BGPals
ld de, UnknBGPals ; wd000 ld de, UnknBGPals
ld b, a ld b, a
ld c, $1 ld c, $1
call CopyPals call CopyPals

View File

@ -111,8 +111,8 @@ _ResetWRAM: ; 5bae
xor a xor a
call ByteFill call ByteFill
ld hl, wd000 ld hl, wRAM1Start
ld bc, wGameData - wd000 ld bc, wGameData - wRAM1Start
xor a xor a
call ByteFill call ByteFill

View File

@ -331,7 +331,7 @@ ReceiveKeyItem: ; d35a
ret ret
TossKeyItem: ; d374 TossKeyItem: ; d374
ld a, [wd107] ld a, [CurItemQuantity]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, NumKeyItems ld hl, NumKeyItems

View File

@ -2668,7 +2668,7 @@ Script_warp:
call GetScriptByte call GetScriptByte
ld [YCoord], a ld [YCoord], a
ld a, -1 ld a, -1
ld [wd001], a ld [DefaultSpawnpoint], a
ld a, MAPSETUP_WARP ld a, MAPSETUP_WARP
ld [hMapEntryMethod], a ld [hMapEntryMethod], a
ld a, 1 ld a, 1
@ -2681,7 +2681,7 @@ Script_warp:
call GetScriptByte call GetScriptByte
call GetScriptByte call GetScriptByte
ld a, -1 ld a, -1
ld [wd001], a ld [DefaultSpawnpoint], a
ld a, MAPSETUP_BADWARP ld a, MAPSETUP_BADWARP
ld [hMapEntryMethod], a ld [hMapEntryMethod], a
ld a, 1 ld a, 1

View File

@ -94,7 +94,7 @@ CheckRegisteredItem: ; 13345
dec a dec a
cp [hl] cp [hl]
jr nc, .NotEnoughItems jr nc, .NotEnoughItems
ld [wd107], a ld [CurItemQuantity], a
and a and a
ret ret

View File

@ -42,10 +42,10 @@ ENDM
LoadSpawnPoint: ; 1531f LoadSpawnPoint: ; 1531f
; loads the spawn point in wd001 ; loads the spawn point in DefaultSpawnpoint
push hl push hl
push de push de
ld a, [wd001] ld a, [DefaultSpawnpoint]
cp SPAWN_N_A cp SPAWN_N_A
jr z, .spawn_n_a jr z, .spawn_n_a
ld l, a ld l, a

View File

@ -614,7 +614,7 @@ TossItemFromPC: ; 129f4
pop af pop af
jr c, .quit jr c, .quit
pop hl pop hl
ld a, [wd107] ld a, [CurItemQuantity]
call TossItem call TossItem
call PartyMonItemName call PartyMonItemName
ld hl, .TossedThisMany ld hl, .TossedThisMany

View File

@ -632,7 +632,7 @@ FlyFunction: ; ca3b
cp NUM_SPAWNS cp NUM_SPAWNS
jr nc, .illegal jr nc, .illegal
ld [wd001], a ld [DefaultSpawnpoint], a
call CloseWindow call CloseWindow
ld a, $1 ld a, $1
ret ret
@ -962,7 +962,7 @@ TeleportFunction: ; cc61
callba IsSpawnPoint callba IsSpawnPoint
jr nc, .nope jr nc, .nope
ld a, c ld a, c
ld [wd001], a ld [DefaultSpawnpoint], a
ld a, $1 ld a, $1
ret ret

View File

@ -77,6 +77,6 @@ GetWhiteoutSpawn: ; 12527
xor a ; SPAWN_HOME xor a ; SPAWN_HOME
.yes .yes
ld [wd001], a ld [DefaultSpawnpoint], a
ret ret
; 1253d ; 1253d

View File

@ -69,8 +69,8 @@ Init:: ; 17d
ld [rLCDC], a ld [rLCDC], a
; Clear WRAM bank 0 ; Clear WRAM bank 0
ld hl, wc000 ld hl, wRAM0Start
ld bc, wd000 - wc000 ld bc, wRAM1Start - wRAM0Start
.ByteFill: .ByteFill:
ld [hl], 0 ld [hl], 0
inc hl inc hl

View File

@ -3332,7 +3332,7 @@ InitDisplayForRedCredits: ; 4e8c2
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a xor a
call ByteFill call ByteFill
ld hl, wd000 ; UnknBGPals ld hl, UnknBGPals
ld c, 4 tiles ld c, 4 tiles
.load_white_palettes .load_white_palettes
ld a, (palred 31 + palgreen 31 + palblue 31) % $100 ld a, (palred 31 + palgreen 31 + palblue 31) % $100

View File

@ -5410,7 +5410,7 @@ Function1023c6: ; 1023c6
dec a dec a
ld [CurPartyMon], a ld [CurPartyMon], a
xor a xor a
ld [wd10b], a ld [wPokemonWithdrawDepositParameter], a
callba RemoveMonFromPartyOrBox callba RemoveMonFromPartyOrBox
ld hl, PartyCount ld hl, PartyCount
inc [hl] inc [hl]

498
wram.asm
View File

@ -5,7 +5,7 @@ INCLUDE "vram.asm"
SECTION "Stack", WRAM0 SECTION "Stack", WRAM0
wc000:: wRAM0Start::
StackBottom:: StackBottom::
ds $100 - 1 ds $100 - 1
Stack:: Stack::
@ -1484,20 +1484,18 @@ wMinutesSince:: ds 1
wHoursSince:: ds 1 wHoursSince:: ds 1
wDaysSince:: ds 1 wDaysSince:: ds 1
wRAM0End:: ; cfd8
SECTION "WRAM 1", WRAMX SECTION "WRAM 1", WRAMX
wRAM1Start::
wd000:: ds 1 wd000:: ds 1
DefaultSpawnpoint::
wd001:: ds 1
; d002 DefaultSpawnpoint:: db
UNION
UNION ; d002
wTempMail:: mailmsg wTempMail wTempMail:: mailmsg wTempMail
NEXTU NEXTU ; d002
wSeerAction:: ds 1 wSeerAction:: ds 1
wSeerNickname:: ds PKMN_NAME_LENGTH wSeerNickname:: ds PKMN_NAME_LENGTH
wSeerCaughtLocation:: ds 17 wSeerCaughtLocation:: ds 17
@ -1509,14 +1507,14 @@ wSeerCaughtLevel:: ds 1
wSeerCaughtData:: ds 1 wSeerCaughtData:: ds 1
wSeerCaughtGender:: ds 1 wSeerCaughtGender:: ds 1
NEXTU NEXTU ; d002
wBufferMonNick:: ds PKMN_NAME_LENGTH ; d002 wBufferMonNick:: ds PKMN_NAME_LENGTH ; d002
wBufferMonOT:: ds NAME_LENGTH ; d00d wBufferMonOT:: ds NAME_LENGTH ; d00d
wBufferMon:: party_struct wBufferMon ; d018 wBufferMon:: party_struct wBufferMon ; d018
ds 8 ds 8
wMonOrItemNameBuffer:: wMonOrItemNameBuffer::
NEXTU NEXTU ; d002
wBugContestResults:: wBugContestResults::
bugcontestwinner wBugContestFirstPlace bugcontestwinner wBugContestFirstPlace
bugcontestwinner wBugContestSecondPlace bugcontestwinner wBugContestSecondPlace
@ -1526,7 +1524,7 @@ wBugContestWinnersEnd::
ds 4 ds 4
wBugContestWinnerName:: ds NAME_LENGTH wBugContestWinnerName:: ds NAME_LENGTH
NEXTU NEXTU ; d002
wd002:: wd002::
wTempDayOfWeek:: wTempDayOfWeek::
wApricorns:: wApricorns::
@ -1577,11 +1575,11 @@ wd00a:: ds 1
wMartItem4BCD:: wMartItem4BCD::
wd00b:: ds 1 wd00b:: ds 1
UNION UNION ; d00c
wRadioText:: ds 2 * SCREEN_WIDTH wRadioText:: ds 2 * SCREEN_WIDTH
wRadioTextEnd:: wRadioTextEnd::
NEXTU NEXTU ; d00c
wMobileParticipant2Nickname:: wMobileParticipant2Nickname::
wd00c:: ds 1 wd00c:: ds 1
wd00d:: ds 1 wd00d:: ds 1
@ -1692,45 +1690,35 @@ wTempTrainerHeaderEnd::
wPlayerTurningDirection:: ; d04e wPlayerTurningDirection:: ; d04e
ds 24 ds 24
ENDU ENDU
wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH ; d066 wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH ; d066
StringBuffer1:: ; d073 StringBuffer1:: ds 19 ; d073
ds 19 StringBuffer2:: ds 19 ; d086
StringBuffer3:: ds 19 ; d099
StringBuffer2:: ; d086 StringBuffer4:: ds 19 ; d0ac
ds 19 StringBuffer5:: ds 19 ; d0bf
StringBuffer3:: ; d099
ds 19
StringBuffer4:: ; d0ac
ds 19
StringBuffer5:: ; d0bf
ds 19
wd0d2:: ds 2 wd0d2:: ds 2
CurBattleMon:: ; d0d4 CurBattleMon:: db ; d0d4
ds 1 CurMoveNum:: db ; d0d5
CurMoveNum:: ; d0d5
ds 1
wLastPocket:: ds 1 wLastPocket:: db
wPCItemsCursor:: ds 1 wPCItemsCursor:: db
wPartyMenuCursor:: ds 1 wPartyMenuCursor:: db
wItemsPocketCursor:: ds 1 wItemsPocketCursor:: db
wKeyItemsPocketCursor:: ds 1 wKeyItemsPocketCursor:: db
wBallsPocketCursor:: ds 1 wBallsPocketCursor:: db
wTMHMPocketCursor:: ds 1 wTMHMPocketCursor:: db
wPCItemsScrollPosition:: ds 1 wPCItemsScrollPosition:: db
wPartyMenuScrollPosition:: ds 1 ; unused wPartyMenuScrollPosition:: db ; unused
wItemsPocketScrollPosition:: ds 1 wItemsPocketScrollPosition:: db
wKeyItemsPocketScrollPosition:: ds 1 wKeyItemsPocketScrollPosition:: db
wBallsPocketScrollPosition:: ds 1 wBallsPocketScrollPosition:: db
wTMHMPocketScrollPosition:: ds 1 wTMHMPocketScrollPosition:: db
wMoveSwapBuffer:: wMoveSwapBuffer::
wSwitchMon:: wSwitchMon::
@ -1755,255 +1743,190 @@ VramState:: ; d0ed
; bit 6: something to do with text ; bit 6: something to do with text
; bit 7: on when surf initiates ; bit 7: on when surf initiates
; flickers when climbing waterfall ; flickers when climbing waterfall
ds 1 db
wBattleResult:: ds 1 ; d0ee wBattleResult:: db ; d0ee
wUsingItemWithSelect:: ds 1 ; d0ef wUsingItemWithSelect:: db ; d0ef
UNION UNION ; d0f0
CurMart:: ds 16 ; d0f0 ; mart data
CurMart:: ds 16
CurMartEnd:: CurMartEnd::
NEXTU NEXTU ; d0f0
CurElevator:: ds 1 ; elevator data
wd0f1:: CurElevator:: db
CurElevatorFloors:: CurElevatorFloors:: db
wCurMessageIndex:: ds 1
wd0f2:: NEXTU ; d0f0
wMailboxCount:: ds 1 ; mailbox data
ds 1
wCurMessageIndex:: db
wMailboxCount:: db
wMailboxItems:: ds MAILBOX_CAPACITY wMailboxItems:: ds MAILBOX_CAPACITY
wMailboxEnd:: ds 1 ; d0fe wMailboxEnd:: ds 1 ; d0fe
ENDU ENDU
wListPointer:: dw ; d100 wListPointer:: dw ; d100
wUnusedD102:: dw ; d102 wUnusedD102:: dw ; d102
wItemAttributesPtr:: dw ; d104 wItemAttributesPtr:: dw ; d104
CurItem:: ds 1 ; d106 CurItem:: db ; d106
CurItemQuantity:: ; d107 CurItemQuantity:: ; d107
wMartItemID:: wMartItemID::
wd107:: ds 1 db
CurPartySpecies:: ; d108 CurPartySpecies:: db ; d108
ds 1
CurPartyMon:: ; d109 CurPartyMon:: ; d109
; contains which monster in a party ; contains which monster in a party
; is being dealt with at the moment ; is being dealt with at the moment
; 0-5 ; 0-5
ds 1 db
wWhichHPBar:: wWhichHPBar::
; 0: Enemy ; 0: Enemy
; 1: Player ; 1: Player
; 2: Party Menu ; 2: Party Menu
ds 1 db
wPokemonWithdrawDepositParameter:: wPokemonWithdrawDepositParameter::
; 0: Take from PC ; 0: Take from PC
; 1: Put into PC ; 1: Put into PC
; 2: Take from Daycare ; 2: Take from Daycare
; 3: Put into Daycare ; 3: Put into Daycare
wd10b:: ds 1 db
wItemQuantityChangeBuffer:: ds 1
wItemQuantityBuffer:: ds 1
TempMon:: ; d10e wItemQuantityChangeBuffer:: db
party_struct TempMon wItemQuantityBuffer:: db
wSpriteFlags:: ds 1 ; d13e TempMon:: party_struct TempMon ; d10e
wHandlePlayerStep:: ds 2 ; d13f wSpriteFlags:: db ; d13e
PartyMenuActionText:: ; d141 wHandlePlayerStep:: dw ; d13f
ds 1
wItemAttributeParamBuffer:: ; d142 PartyMenuActionText:: db ; d141
ds 1
CurPartyLevel:: ; d143 wItemAttributeParamBuffer:: db ; d142
ds 1
wScrollingMenuListSize:: ds 2 CurPartyLevel:: db ; d143
wScrollingMenuListSize:: dw
; used when following a map warp ; used when following a map warp
; d146 ; d146
wNextWarp:: ds 1 wNextWarp:: db
wNextMapGroup:: ds 1 wNextMapGroup:: db
wNextMapNumber:: ds 1 wNextMapNumber:: db
wPrevWarp:: ds 1 wPrevWarp:: db
wPrevMapGroup:: ds 1 wPrevMapGroup:: db
wPrevMapNumber:: ds 1 wPrevMapNumber:: db
; d14c ; d14c
wPlayerBGMapOffsetX:: ds 1 ; used in FollowNotExact; unit is pixels wPlayerBGMapOffsetX:: db ; used in FollowNotExact; unit is pixels
wPlayerBGMapOffsetY:: ds 1 ; used in FollowNotExact; unit is pixels wPlayerBGMapOffsetY:: db ; used in FollowNotExact; unit is pixels
; Player movement ; Player movement
wPlayerStepVectorX:: ds 1 ; d14e wPlayerStepVectorX:: db ; d14e
wPlayerStepVectorY:: ds 1 ; d14f wPlayerStepVectorY:: db ; d14f
wPlayerStepFlags:: ds 1 ; d150 wPlayerStepFlags:: db ; d150
wPlayerStepDirection:: ; d151
; bit 7: Start step ; bit 7: Start step
; bit 6: Stop step ; bit 6: Stop step
; bit 5: Doing step ; bit 5: Doing step
; bit 4: In midair ; bit 4: In midair
; bits 0-3: unused ; bits 0-3: unused
wPlayerStepDirection:: ds 1 ; d151 db
wBGMapAnchor:: ds 2 ; d152 wBGMapAnchor:: dw ; d152
UNION UNION ; d154
UsedSprites:: ds 64 ; d154 UsedSprites:: ds 64
UsedSpritesEnd:: UsedSpritesEnd::
NEXTU NEXTU ; d154
wd154:: ; d154 ds 31
ds 31 ; 64
wd173:: ds 1 ; related to command queue type 3 wd173:: ds 1 ; related to command queue type 3
ds 13
wd181:: ds 1
wd182:: ds 1
ds 14
wd191:: ds 1
wd192:: ds 1
wd193:: ds 1
ENDU ENDU
wOverworldMapAnchor:: dw ; d194 wOverworldMapAnchor:: dw ; d194
wMetatileStandingY:: ds 1 ; d196 wMetatileStandingY:: db ; d196
wMetatileStandingX:: ds 1 ; d197 wMetatileStandingX:: db ; d197
wSecondMapHeaderBank:: ds 1 ; d198
wTileset:: ds 1 ; d199 wSecondMapHeaderBank:: db ; d198
wPermission:: ds 1 ; d19a wTileset:: db ; d199
wPermission:: db ; d19a
wSecondMapHeaderAddr:: dw ; d19b wSecondMapHeaderAddr:: dw ; d19b
; width/height are in blocks (2x2 walkable tiles, 4x4 graphics tiles) ; width/height are in blocks (2x2 walkable tiles, 4x4 graphics tiles)
MapHeader:: ; d19d MapHeader:: ; d19d
MapBorderBlock:: ; d19d MapBorderBlock:: db ; d19d
ds 1 MapHeight:: db ; d19e
MapHeight:: ; d19e MapWidth:: db ; d19f
ds 1 MapBlockDataBank:: db; d1a0
MapWidth:: ; d19f MapBlockDataPointer:: dw ; d1a1
ds 1 MapScriptHeaderBank:: db ; d1a3
MapBlockDataBank:: ; d1a0 MapScriptHeaderPointer:: dw ; d1a4
ds 1 MapEventHeaderPointer:: dw ; d1a6
MapBlockDataPointer:: ; d1a1
ds 2
MapScriptHeaderBank:: ; d1a3
ds 1
MapScriptHeaderPointer:: ; d1a4
ds 2
MapEventHeaderPointer:: ; d1a6
ds 2
; bit set ; bit set
MapConnections:: ; d1a8 MapConnections:: db ; d1a8
ds 1
NorthMapConnection:: ; d1a9 NorthMapConnection:: ; d1a9
NorthConnectedMapGroup:: ; d1a9 NorthConnectedMapGroup:: db ; d1a9
ds 1 NorthConnectedMapNumber:: db ; d1aa
NorthConnectedMapNumber:: ; d1aa NorthConnectionStripPointer:: dw ; d1ab
ds 1 NorthConnectionStripLocation:: dw ; d1ad
NorthConnectionStripPointer:: ; d1ab NorthConnectionStripLength:: db ; d1af
ds 2 NorthConnectedMapWidth:: db ; d1b0
NorthConnectionStripLocation:: ; d1ad NorthConnectionStripYOffset:: db ; d1b1
ds 2 NorthConnectionStripXOffset:: db ; d1b2
NorthConnectionStripLength:: ; d1af NorthConnectionWindow:: dw ; d1b3
ds 1
NorthConnectedMapWidth:: ; d1b0
ds 1
NorthConnectionStripYOffset:: ; d1b1
ds 1
NorthConnectionStripXOffset:: ; d1b2
ds 1
NorthConnectionWindow:: ; d1b3
ds 2
SouthMapConnection:: ; d1b5 SouthMapConnection:: ; d1b5
SouthConnectedMapGroup:: ; d1b5 SouthConnectedMapGroup:: db ; d1b5
ds 1 SouthConnectedMapNumber:: db ; d1b6
SouthConnectedMapNumber:: ; d1b6 SouthConnectionStripPointer:: dw ; d1b7
ds 1 SouthConnectionStripLocation:: dw ; d1b9
SouthConnectionStripPointer:: ; d1b7 SouthConnectionStripLength:: db ; d1bb
ds 2 SouthConnectedMapWidth:: db ; d1bc
SouthConnectionStripLocation:: ; d1b9 SouthConnectionStripYOffset:: db ; d1bd
ds 2 SouthConnectionStripXOffset:: db ; d1be
SouthConnectionStripLength:: ; d1bb SouthConnectionWindow:: dw ; d1bf
ds 1
SouthConnectedMapWidth:: ; d1bc
ds 1
SouthConnectionStripYOffset:: ; d1bd
ds 1
SouthConnectionStripXOffset:: ; d1be
ds 1
SouthConnectionWindow:: ; d1bf
ds 2
WestMapConnection:: ; d1c1 WestMapConnection:: ; d1c1
WestConnectedMapGroup:: ; d1c1 WestConnectedMapGroup:: db ; d1c1
ds 1 WestConnectedMapNumber:: db ; d1c2
WestConnectedMapNumber:: ; d1c2 WestConnectionStripPointer:: dw ; d1c3
ds 1 WestConnectionStripLocation:: dw ; d1c5
WestConnectionStripPointer:: ; d1c3 WestConnectionStripLength:: db ; d1c7
ds 2 WestConnectedMapWidth:: db ; d1c8
WestConnectionStripLocation:: ; d1c5 WestConnectionStripYOffset:: db ; d1c9
ds 2 WestConnectionStripXOffset:: db ; d1ca
WestConnectionStripLength:: ; d1c7 WestConnectionWindow:: dw ; d1cb
ds 1
WestConnectedMapWidth:: ; d1c8
ds 1
WestConnectionStripYOffset:: ; d1c9
ds 1
WestConnectionStripXOffset:: ; d1ca
ds 1
WestConnectionWindow:: ; d1cb
ds 2
EastMapConnection:: ; d1cd EastMapConnection:: ; d1cd
EastConnectedMapGroup:: ; d1cd EastConnectedMapGroup:: db ; d1cd
ds 1 EastConnectedMapNumber:: db ; d1ce
EastConnectedMapNumber:: ; d1ce EastConnectionStripPointer:: dw ; d1cf
ds 1 EastConnectionStripLocation:: dw ; d1d1
EastConnectionStripPointer:: ; d1cf EastConnectionStripLength:: db ; d1d3
ds 2 EastConnectedMapWidth:: db ; d1d4
EastConnectionStripLocation:: ; d1d1 EastConnectionStripYOffset:: db ; d1d5
ds 2 EastConnectionStripXOffset:: db ; d1d6
EastConnectionStripLength:: ; d1d3 EastConnectionWindow:: dw ; d1d7
ds 1
EastConnectedMapWidth:: ; d1d4
ds 1
EastConnectionStripYOffset:: ; d1d5
ds 1
EastConnectionStripXOffset:: ; d1d6
ds 1
EastConnectionWindow:: ; d1d7
ds 2
TilesetHeader:: TilesetHeader::
TilesetBank:: ; d1d9 TilesetBank:: db ; d1d9
ds 1 TilesetAddress:: dw ; d1da
TilesetAddress:: ; d1da TilesetBlocksBank:: db ; d1dc
ds 2 TilesetBlocksAddress:: dw ; d1dd
TilesetBlocksBank:: ; d1dc TilesetCollisionBank:: db ; d1df
ds 1 TilesetCollisionAddress:: dw ; d1e0
TilesetBlocksAddress:: ; d1dd TilesetAnim:: dw ; bank 3f ; d1e2
ds 2 ds 2 ; unused ; d1e4
TilesetCollisionBank:: ; d1df TilesetPalettes:: dw ; bank 3f ; d1e6
ds 1
TilesetCollisionAddress:: ; d1e0
ds 2
TilesetAnim:: ; d1e2
; bank 3f
ds 2
; unused ; d1e4
ds 2
TilesetPalettes:: ; d1e6
; bank 3f
ds 2
EvolvableFlags:: ; d1e8 EvolvableFlags:: flag_array PARTY_LENGTH ; d1e8
flag_array PARTY_LENGTH
wForceEvolution:: db ; d1e9 wForceEvolution:: db ; d1e9
@ -2066,115 +1989,80 @@ wBattleMode:: ; d22d
; 0: overworld ; 0: overworld
; 1: wild battle ; 1: wild battle
; 2: trainer battle ; 2: trainer battle
ds 1 db
TempWildMonSpecies:: db
TempWildMonSpecies:: ds 1
OtherTrainerClass:: ; d22f OtherTrainerClass:: ; d22f
; class (Youngster, Bug Catcher, etc.) of opposing trainer ; class (Youngster, Bug Catcher, etc.) of opposing trainer
; 0 if opponent is a wild Pokémon, not a trainer ; 0 if opponent is a wild Pokémon, not a trainer
ds 1 db
BattleType:: ; d230 ; BATTLETYPE_* values
; $00 normal BattleType:: db ; d230
; $01 can lose
; $02 debug
; $03 dude/tutorial
; $04 fishing
; $05 roaming
; $06 contest
; $07 shiny
; $08 headbutt/rock smash
; $09 trap
; $0a force Item1
; $0b celebi
; $0c suicune
ds 1
OtherTrainerID:: ; d231 OtherTrainerID:: ; d231
; which trainer of the class that you're fighting ; which trainer of the class that you're fighting
; (Joey, Mikey, Albert, etc.) ; (Joey, Mikey, Albert, etc.)
ds 1 db
wForcedSwitch:: ds 1 wForcedSwitch:: db
TrainerClass:: ; d233 TrainerClass:: db ; d233
ds 1
UnownLetter:: ; d234 UnownLetter:: db ; d234
ds 1
wMoveSelectionMenuType:: ds 1 wMoveSelectionMenuType:: db
; corresponds to the data/base_stats/*.asm contents
CurBaseData:: ; d236 CurBaseData:: ; d236
BaseDexNo:: ; d236 BaseDexNo:: db ; d236
ds 1
BaseStats:: ; d237 BaseStats:: ; d237
BaseHP:: ; d237 BaseHP:: db ; d237
ds 1 BaseAttack:: db ; d238
BaseAttack:: ; d238 BaseDefense:: db ; d239
ds 1 BaseSpeed:: db ; d23a
BaseDefense:: ; d239 BaseSpecialAttack:: db ; d23b
ds 1 BaseSpecialDefense:: db ; d23c
BaseSpeed:: ; d23a
ds 1
BaseSpecialAttack:: ; d23b
ds 1
BaseSpecialDefense:: ; d23c
ds 1
BaseType:: ; d23d BaseType:: ; d23d
BaseType1:: ; d23d BaseType1:: db ; d23d
ds 1 BaseType2:: db ; d23e
BaseType2:: ; d23e BaseCatchRate:: db ; d23f
ds 1 BaseExp:: db ; d240
BaseCatchRate:: ; d23f BaseItems:: dw ; d241
ds 1 BaseGender:: db ; d243
BaseExp:: ; d240 BaseUnknown1:: db ; d244
ds 1 BaseEggSteps:: db ; d245
BaseItems:: ; d241 BaseUnknown2:: db ; d246
ds 2 BasePicSize:: db ; d247
BaseGender:: ; d243 BasePadding:: ds 4 ; d248
ds 1 BaseGrowthRate:: db ; d24c
BaseUnknown1:: ; d244 BaseEggGroups:: db ; d24d
ds 1 BaseTMHM:: flag_array NUM_TM_HM_TUTOR ; d24e
BaseEggSteps:: ; d245
ds 1
BaseUnknown2:: ; d246
ds 1
BasePicSize:: ; d247
ds 1
BasePadding:: ; d248
ds 4
BaseGrowthRate:: ; d24c
ds 1
BaseEggGroups:: ; d24d
ds 1
BaseTMHM:: ; d24e
flag_array NUM_TM_HM_TUTOR
CurDamage:: dw ; d256
CurDamage:: ; d256
ds 2 ds 2
ds 2 wMornEncounterRate:: db ; d25a
wMornEncounterRate:: ds 1 ; d25a wDayEncounterRate:: db ; d25b
wDayEncounterRate:: ds 1 ; d25b wNiteEncounterRate:: db ; d25c
wNiteEncounterRate:: ds 1 ; d25c wWaterEncounterRate:: db ; d25d
wWaterEncounterRate:: ds 1 ; d25d
wListMoves_MoveIndicesBuffer:: ds NUM_MOVES wListMoves_MoveIndicesBuffer:: ds NUM_MOVES
wPutativeTMHMMove:: ds 1 wPutativeTMHMMove:: db
wInitListType:: ds 1 wInitListType:: db
wBattleHasJustStarted:: ds 1 wBattleHasJustStarted:: db
wFoundMatchingIDInParty:: wFoundMatchingIDInParty::
wNamedObjectIndexBuffer:: wNamedObjectIndexBuffer::
wCurTMHM:: wCurTMHM::
wTypeMatchup:: wTypeMatchup::
wd265:: ds 1 wd265:: db
wFailedToFlee:: ds 1
wNumFleeAttempts:: ds 1
wMonTriedToEvolve:: ds 1
TimeOfDay:: ; d269 wFailedToFlee:: db
ds 1 wNumFleeAttempts:: db
wMonTriedToEvolve:: db
TimeOfDay:: db ; d269
ds 1 ds 1