summaryrefslogtreecommitdiff
path: root/wram.asm
diff options
context:
space:
mode:
Diffstat (limited to 'wram.asm')
-rw-r--r--wram.asm588
1 files changed, 390 insertions, 198 deletions
diff --git a/wram.asm b/wram.asm
index 30b02eac4..a05e606a9 100644
--- a/wram.asm
+++ b/wram.asm
@@ -87,8 +87,8 @@ channel_struct: MACRO
; Addreses are Channel1 (c101).
\1MusicID:: dw
\1MusicBank:: db
-\1Flags:: db ; 0:on/off 1:subroutine 4:noise
-\1Flags2:: db ; 0:vibrato on/off 2:duty
+\1Flags:: db ; 0:on/off 1:subroutine 3:sfx 4:noise 5:rest
+\1Flags2:: db ; 0:vibrato on/off 2:duty 4:cry pitch
\1Flags3:: db ; 0:vibrato up/down
\1MusicAddress:: dw
\1LastMusicAddress:: dw
@@ -104,28 +104,30 @@ channel_struct: MACRO
\1Octave:: db ; 7-0 (0 is highest)
\1StartingOctave:: db ; raises existing octaves (to repeat phrases)
\1NoteDuration:: db ; frames remaining for the current note
- ds 1 ; c117
+\1Field0x16:: ds 1 ; c117
ds 1 ; c118
\1LoopCount:: db
\1Tempo:: dw
\1Tracks:: db ; hi:left lo:right
- ds 1 ; c11d
+\1Field0x1c:: ds 1 ; c11d
\1VibratoDelayCount:: db ; initialized by \1VibratoDelay
\1VibratoDelay:: db ; number of frames a note plays until vibrato starts
\1VibratoExtent:: db
\1VibratoRate:: db ; hi:frames for each alt lo:frames to the next alt
- ds 1 ; c122
- ds 1 ; c123
- ds 1 ; c124
- ds 1 ; c125
- ds 1 ; c126
+\1Field0x21:: ds 1 ; c122
+\1Field0x22:: ds 1 ; c123
+\1Field0x23:: ds 1 ; c124
+\1Field0x24:: ds 1 ; c125
+\1Field0x25:: ds 1 ; c126
ds 1 ; c127
\1CryPitch:: dw
- ds 4
+\1Field0x29:: ds 1
+\1Field0x2a:: ds 2
+\1Field0x2c:: ds 1
\1NoteLength:: db ; frames per 16th note
- ds 1 ; c12f
- ds 1 ; c130
- ds 1 ; c131
+\1Field0x2e:: ds 1 ; c12f
+\1Field0x2f:: ds 1 ; c130
+\1Field0x30:: ds 1 ; c131
ds 1 ; c132
ENDM
@@ -156,6 +158,26 @@ mailmsg: MACRO
\1End::
endm
+hof_mon: MACRO
+\1Species:: ds 1
+\1ID:: ds 2
+\1DVs:: ds 2
+\1Level:: ds 1
+\1Nickname:: ds PKMN_NAME_LENGTH +- 1
+\1End::
+endm
+
+hall_of_fame: MACRO
+\1::
+\1WinCount:: ds 1
+\1Mon1:: hof_mon \1Mon1
+\1Mon2:: hof_mon \1Mon2
+\1Mon3:: hof_mon \1Mon3
+\1Mon4:: hof_mon \1Mon4
+\1Mon5:: hof_mon \1Mon5
+\1Mon6:: hof_mon \1Mon6
+\1End:: ds 1
+ENDM
INCLUDE "vram.asm"
@@ -187,12 +209,11 @@ Channel7:: channel_struct Channel7 ; c22d
Channel8:: channel_struct Channel8 ; c25f
ds 1 ; c291
-wc292:: ds 1
-wc293:: ds 1
-wc294:: ds 1
-wc295:: ds 1
-wc296:: ds 1
-wc297:: ds 1
+wCurTrackDuty:: ds 1
+wCurTrackIntensity:: ds 1
+wCurTrackFrequency:: dw
+wc296:: ds 1 ; used only in an unused function
+wc297:: ds 1 ; used in MusicE0 and LoadNote
CurMusicByte:: ; c298
ds 1
@@ -232,7 +253,7 @@ NoiseSampleAddressLo:: ; c2a0
ds 1
NoiseSampleAddressHi:: ; c2a1
ds 1
-wc2a2:: ; noise delay? ; c2a2
+wNoiseSampleDelay:: ; noise delay? ; c2a2
ds 1
; c2a3
ds 1
@@ -272,10 +293,10 @@ SFXPriority:: ; c2b6
; if nonzero, turn off music when playing sfx
ds 1
ds 1
-wc2b8:: ds 1
-wc2b9:: ds 1
-wc2ba:: ds 1
-wc2bb:: ds 1
+Channel1JumpCondition:: ds 1
+Channel2JumpCondition:: ds 1
+Channel3JumpCondition:: ds 1
+Channel4JumpCondition:: ds 1
wc2bc:: ds 1
CryTracks:: ; c2bd
; plays only in left or right track depending on what side the monster is on
@@ -285,7 +306,7 @@ wc2be:: ds 1
CurSFX:: ; c2bf
; id of sfx currently playing
ds 1
-wc2c0::
+
wMapMusic:: ; c2c0
ds 1
@@ -313,10 +334,11 @@ wc2cc:: ds 1
wc2cd:: ds 1
wSpriteUpdatesEnabled:: ds 1
wc2cf:: ds 1
-wc2d0:: ds 4
+wMapTimeOfDay:: ds 1
+ ds 3
wc2d4:: ds 1
wc2d5:: ds 1
-wc2d6:: ds 1
+wLastDexEntry:: ds 1
wc2d7:: ds 1
wPreviousLandmark:: ds 1
wCurrentLandmark:: ds 1
@@ -373,8 +395,10 @@ TilePermissions:: ; c2fe
ds 1
-SECTION "c300", WRAM0 [$c300]
+SECTION "wSpriteAnims", WRAM0 [$c300]
; wc300 - wc313 is a 10x2 dictionary.
+; keys: taken from third column of SpriteAnimSeqData
+; values: VTiles
wSpriteAnimDict:: ds 10 * 2
ds wSpriteAnimDict - @
wc300:: ds 1
@@ -399,17 +423,17 @@ wc313:: ds 1
wSpriteAnimationStructs::
sprite_anim_struct: MACRO
-\1Index:: ds 1 ; 0
-\1Sprite01:: ds 1 ; 1
-\1AnimSeqID:: ds 1 ; 2
-\1TileID:: ds 1 ; 3
-\1XCoord:: ds 1 ; 4
-\1YCoord:: ds 1 ; 5
-\1XOffset:: ds 1 ; 6
-\1YOffset:: ds 1 ; 7
-\1FrameTimer:: ds 1 ; 8
-\1Sprite09:: ds 1 ; 9
-\1FrameIndex:: ds 1 ; a
+\1Index:: ds 1 ; 0
+\1FramesetID:: ds 1 ; 1
+\1AnimSeqID:: ds 1 ; 2
+\1TileID:: ds 1 ; 3
+\1XCoord:: ds 1 ; 4
+\1YCoord:: ds 1 ; 5
+\1XOffset:: ds 1 ; 6
+\1YOffset:: ds 1 ; 7
+\1Duration:: ds 1 ; 8
+\1DurationOffset:: ds 1 ; 9
+\1FrameIndex:: ds 1 ; a
\1Sprite0b:: ds 1
\1Sprite0c:: ds 1
\1Sprite0d:: ds 1
@@ -418,7 +442,7 @@ sprite_anim_struct: MACRO
ENDM
; Field 0: Index
-; Fields 1-3: Loaded from Unknown_8d1c4
+; Fields 1-3: Loaded from SpriteAnimSeqData
wc314::
SpriteAnim1:: sprite_anim_struct SpriteAnim1
wc324::
@@ -442,23 +466,25 @@ SpriteAnim10:: sprite_anim_struct SpriteAnim10
wSpriteAnimationStructsEnd::
ds -8
wc3ac:: ds 8 ; c3ac
-wSpriteAnimCount::
-wc3b4:: ds 1
-wc3b5:: ds 1
+wSpriteAnimCount:: ds 1
+wCurrSpriteOAMAddr:: ds 1
CurIcon:: ; c3b6
ds 1
-wc3b7:: ds 1
-wc3b8:: dw
-wc3ba:: ds 1
-wc3bb:: ds 1
-wc3bc:: ds 1
-wc3bd:: ds 1
-wc3be:: ds 1
-wc3bf:: ds 1
-wc3c0:: ds 1
+wCurIconTile:: ds 1
+wSpriteAnimAddrBackup::
+wSpriteAnimIDBuffer::
+wCurrSpriteAddSubFlags::
+ ds 2
+wCurrAnimVTile:: ds 1
+wCurrAnimXCoord:: ds 1
+wCurrAnimYCoord:: ds 1
+wCurrAnimXOffset:: ds 1
+wCurrAnimYOffset:: ds 1
+wGlobalAnimYOffset:: ds 1
+wGlobalAnimXOffset:: ds 1
wSpriteAnimsEnd::
wc3c1:: ds 11
@@ -512,15 +538,18 @@ TileMapEnd::
SECTION "Battle", WRAM0
- party_struct OddEgg
+wOddEgg:: party_struct OddEgg
wOddEggName:: ds PKMN_NAME_LENGTH
wOddEggOTName:: ds PKMN_NAME_LENGTH
- ds -70
+ ds wOddEgg - @
wBT_OTTemp:: battle_tower_struct wBT_OTTemp
ds wBT_OTTemp - @
-wMisc::
+ hall_of_fame wHallOfFameTemp
+ ds wHallOfFameTemp - @
+
+wMisc:: ; ds (SCREEN_WIDTH + 4) * (SCREEN_HEIGHT + 2)
wBattle::
wc608::
@@ -532,15 +561,14 @@ EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616
ds -5
wInitHourBuffer:: ds 5
BattleMonNick:: ds PKMN_NAME_LENGTH ; c621
+ ds -6
+wc626:: ds 6
BattleMon:: battle_struct BattleMon ; c62c
-wc64c::
- ds 1
+ ds 2
-wc64d:: ds 1
-wWildMon::
-wc64e:: ds 1
+wWildMon:: ds 1
ds 1
wEnemyTrainerItem1:: ds 1
wEnemyTrainerItem2:: ds 1
@@ -733,14 +761,76 @@ trademon: MACRO
\1CaughtData:: ds 1 ; wc701 | wc733
\1End::
ENDM
-
+wTrademons::
wPlayerTrademon:: trademon wPlayerTrademon
wOTTrademon:: trademon wOTTrademon
-
- ds wPlayerTrademon - @
-
+wTrademonsEnd::
+ ds wTrademons - @
+
+; Slot Machine
+wSlots::
+slot_reel: MACRO
+\1ReelAction:: db
+\1TilemapAddr:: dw
+\1Position:: db
+\1SpinDistance:: db
+\1SpinRate:: db
+\1OAMAddr:: dw
+\1XCoord:: db
+\1Slot09:: ds 1
+\1Slot0a:: ds 1
+\1Slot0b:: ds 1
+\1Slot0c:: ds 1
+\1Slot0d:: ds 1
+\1Slot0e:: ds 1
+\1Slot0f:: ds 1
+endm
+; c6d0
+wReel1:: slot_reel wReel1
+wReel2:: slot_reel wReel2
+wReel3:: slot_reel wReel3
+; c700
+wReel1Stopped:: ds 3
+wReel2Stopped:: ds 3
+wReel3Stopped:: ds 3
+wSlotBias:: ds 1
+wSlotBet:: ds 1
+wFirstTwoReelsMatching:: ds 1
+wFirstTwoReelsMatchingSevens:: ds 1
+wSlotMatched:: ds 1
+wCurrReelStopped:: ds 3
+wPayout:: ds 2
+wCurrReelXCoord:: ds 1
+wCurrReelYCoord:: ds 1
+ ds 2
+wSlotBuildingMatch:: ds 1
+wSlotsDataEnd::
+ ds 28
+wSlotsEnd::
+ ds wSlots - @
+
+; Card Flip
+; c6d0
+wCardFlip::
+wDeck:: ds 24
+wDeckEnd::
+; c6e8
+wCardFlipNumCardsPlayed:: ds 1
+wCardFlipFaceUpCard:: ds 1
+wDiscardPile:: ds 24
+wDiscardPileEnd::
+wCardFlipEnd::
+ ds wCardFlip - @
+
+; Unown Puzzle
+wUnownPuzzle::
+wPuzzlePieces::
+ ds 6 * 6
+wUnownPuzzleEnd::
+ ds wUnownPuzzle - @
+
+; Battle RAM
wc6d0::
-wPokedexDataStart::
PlayerSDefLevel:: ; c6d0
ds 1
wc6d1::
@@ -905,8 +995,9 @@ EffectFailed:: ; c70d
wc70e::
FailedMessage:: ; c70e
ds 1
-
-wEnemyGoesFirst:: ds 1
+wc70f::
+wEnemyGoesFirst::
+ ds 1
wc710::
wPlayerIsSwitching:: ds 1 ; c710
wc711::
@@ -921,7 +1012,9 @@ PlayerUsedMoves:: ; c712
wc716:: ds 1
wEnemySwitchMonParam::
wc717:: ds 1
+wc718::
wEnemySwitchMonIndex:: ds 1
+wTempLevel::
wc719:: ds 1
LastPlayerMon:: ; c71a
wc71a:: ds 1
@@ -979,12 +1072,22 @@ wc74d:: ds 1
wc74e:: ds 107
wc7b9:: ds 1
wc7ba:: ds 1
-wc7bb:: ds 15
-wc7ca:: ds 6
-wc7d0:: ds 1
-wc7d1:: ds 1
-wc7d2:: ds 1
-wc7d3:: ds 1
+wc7bb:: ds 2
+wc7bd::
+ ds wc6d0 - @
+
+wPokedexDataStart::
+wPokedexOrder:: ds NUM_POKEMON +- 1
+wPokedexOrderEnd:: ds 6
+wPokedexMetadata::
+wDexListingPage::
+wc7d0:: ds 1 ; Dex list page
+wDexListingCursor::
+wc7d1:: ds 1 ; Dex cursor
+wDexListingEnd::
+wc7d2:: ds 1 ; Last mon to display
+wc7d3:: ds 1 ; Number of mons visible per dex list page
+wCurrentDexMode:: ; Pokedex Mode
wc7d4:: ds 1 ; Index of the topmost visible item in a scrolling menu
wc7d5:: ds 1 ; Which row the cursor is at in a scrolling menu (0-6)
wc7d6:: ds 1
@@ -992,15 +1095,18 @@ wc7d7:: ds 1
wc7d8:: ds 1
wc7d9:: ds 1
wc7da:: ds 1
-wc7db:: ds 1
-wc7dc:: ds 1
+wDexSearchSlowpokeFrame:: ds 1
+wUnlockedUnownMode:: ds 1
wc7dd:: ds 1
wc7de:: ds 1
wc7df:: ds 1
wc7e0:: ds 1
wc7e1:: ds 1
+wBackupDexListingCursor::
wc7e2:: ds 1
+wBackupDexListingPage::
wc7e3:: ds 1
+wDexCurrentLocation::
wc7e4:: ds 1
IF DEF(CRYSTAL11)
wPokedexStatus::
@@ -1024,19 +1130,31 @@ OverworldMap:: ; c800
OverworldMapEnd::
ds OverworldMap - @
+wBillsPCPokemonList::
+; Pokemon, box number, list index
+
+wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES)
+wMysteryGiftStaging::
+
wc800:: ds 1
wc801:: ds 1
wc802:: ds 1
wc803:: ds 4
-wc807:: ds 9
-wc810:: ds 3
-wc813:: ds 5
+wc807:: ds 7
+wc80e:: ds 1
+wc80f:: ds 1
+wc810:: ds 1
+wc811:: ds 1
+wc812:: ds 1
+wc813:: ds 1
+wc814:: ds 4
wc818:: ds 8
wc820:: ds 1
wc821:: ds 15
wc830:: ds 16
wc840:: ds 16
wMysteryGiftTrainerData:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
+wMysteryGiftTrainerDataEnd::
ds wMysteryGiftTrainerData - @
wc850:: ds 16
wc860:: ds 16
@@ -1049,20 +1167,34 @@ wc8c0:: ds 16
wc8d0:: ds 16
wc8e0:: ds 16
wc8f0:: ds 16
+
+wMysteryGiftPartnerData::
wc900:: ds 1
wMysteryGiftPartnerID:: ds 2
wMysteryGiftPartnerName:: ds NAME_LENGTH
-wc90e:: ds 1
-wc90f:: ds 1
-wc910:: ds 1
-wc911:: ds 1
-wc912:: ds 14
+wMysteryGiftPartnerDexCaught:: ds 1
+wc90f::
+wMysteryGiftPartnerSentDeco:: ds 1
+wMysteryGiftPartnerWhichItem:: ds 1
+wMysteryGiftPartnerWhichDeco:: ds 1
+wc912:: ds 2
+wMysteryGiftPartnerDataEnd::
+ ds 12
wc920:: ds 16
wc930:: ds 16
wc940:: ds 16
-wc950:: ds 16
-wc960:: ds 2
-wc962:: ds 14
+wMysteryGiftPlayerData::
+wc950:: ds 1
+wMysteryGiftPlayerID:: ds 2
+wMysteryGiftPlayerName:: ds NAME_LENGTH
+wMysteryGiftPlayerDexCaught:: ds 1
+wMysteryGiftPlayerSentDeco:: ds 1
+wMysteryGiftPlayerWhichItem:: ds 1
+wMysteryGiftPlayerWhichDeco:: ds 1
+wMysteryGiftPlayerBackupItem:: ds 2
+wMysteryGiftPlayerDataEnd::
+
+wc964:: ds 12
wc970:: ds 16
wc980:: ds 16
wc990:: ds 16
@@ -1074,6 +1206,8 @@ wc9e0:: ds 16
wc9f0:: ds 4
wc9f4:: ds 5
wc9f9:: ds 7
+
+wCreditsFaux2bpp::
wca00:: ds 1
wca01:: ds 1
wca02:: ds 14
@@ -1126,15 +1260,16 @@ wcb08:: ds 6
wcb0e:: ds 5
wcb13:: ds 9
wcb1c:: ds 14
-wcb2a:: ds 1
-wcb2b:: ds 1
-wcb2c:: ds 1
-wcb2d:: ds 1
-wcb2e:: ds 1
-wcb2f:: ds 1
-wcb30:: ds 1
-wcb31:: ds 1
-wcb32:: ds 19
+wBillsPC_ScrollPosition:: ds 1
+wBillsPC_CursorPosition:: ds 1
+wBillsPC_NumMonsInBox:: ds 1
+wBillsPC_NumMonsOnScreen:: ds 1
+wBillsPC_LoadedBox:: ds 1 ; 0 if party, 1 - 14 if box, 15 if active box
+wBillsPC_BackupScrollPosition:: ds 1
+wBillsPC_BackupCursorPosition:: ds 1
+wBillsPC_BackupLoadedBox:: ds 1
+wBillsPC_MonHasMail:: ds 1
+ ds 18
wcb45:: ds 20
wcb59:: ds 20
wcb6d:: ds 1
@@ -1209,6 +1344,7 @@ wcd47:: ds 1
BGMapPalBuffer:: ; cd48
ds 1 ; 40
+wBTTempOTSprite::
wcd49:: ds 1
wcd4a:: ds 1
wcd4b:: ds 1
@@ -1317,20 +1453,28 @@ CurMove::
wNamedObjectTypeBuffer:: ds 1
ds 1
wJumptableIndex::
+wBattleTowerBattleEnded::
wcf63:: ds 1
wNrOfBeatenBattleTowerTrainers::
wMomBankDigitCursorPosition::
wIntroSceneFrameCounter::
+wHoldingUnownPuzzlePiece::
+wCardFlipCursorY::
wcf64:: ds 1
IF !DEF(CRYSTAL11)
wPokedexStatus::
ENDC
wTitleScreenTimerLo::
+wUnownPuzzleCursorPosition::
+wCardFlipCursorX::
wcf65:: ds 1
wTitleScreenTimerHi::
+wUnownPuzzleHeldPiece::
+wCardFlipWhichCard::
wcf66:: ds 1
Requested2bpp:: ; cf67
+Requested2bppSize::
ds 1
Requested2bppSource:: ; cf68
ds 2
@@ -1338,23 +1482,22 @@ Requested2bppDest:: ; cf6a
ds 2
Requested1bpp:: ; cf6c
+Requested1bppSize::
ds 1
Requested1bppSource:: ; cf6d
ds 2
Requested1bppDest:: ; cf6f
ds 2
-; something to do with menu
-wcf71:: ds 1
-wcf72:: ds 1
-wcf73:: ds 1
-MenuSelection:: ; cf74
- ds 1
+wWindowStackPointer:: dw ; cf71
+wMenuJoypad:: ds 1 ; cf73
+MenuSelection:: ds 1 ; cf74
wcf75:: ds 1
wcf76:: ds 1
+wCurrPocketCursorPosition::
wcf77:: ds 1
-wcf78:: ds 9
+wWindowStackSize:: ds 9
; menu data header
wMenuDataHeader:: ; cf81
@@ -1378,34 +1521,52 @@ wMenuData2Flags:: ds 1 ; cf91
; bit 4: ????
; bit 3: ????
; bit 2: ????
-; bit 1: ????
-; bit 0: ????
+; bit 1: Enable Select button
+; bit 0: Disable B button
wMenuData2Items:: ds 1
+wMenuData2IndicesPointer::
+wMenuData2Spacing::
wcf93:: ds 1
+wMenuData2_2DMenuItemStringsBank::
wcf94:: ds 1
+wMenuData2_2DMenuItemStringsAddr::
+wMenuData2DisplayFunctionPointer::
+wMenuData2Bank::
wcf95:: ds 1 ; bank
+wMenuData2Addr::
wcf96:: ds 1 ; addr lo
+wMenuData2PointerTableAddr::
+wMenuData2_2DMenuFunctionBank::
wcf97:: ds 1 ; addr hi
+wMenuData2_2DMenuFunctionAddr::
wcf98:: ds 3
wcf9b:: ds 3
wcf9e:: ds 3
wMenuData2End::
wMenuData3::
+w2DMenuCursorInitY::
wcfa1:: ds 1
+w2DMenuCursorInitX::
wcfa2:: ds 1
+w2DMenuNumRows::
wcfa3:: ds 1
+w2DMenuNumCols::
wcfa4:: ds 1
-wcfa5:: ds 1 ; dynamic menu flags?
-wcfa6:: ds 1 ; dynamic menu flags?
+w2DMenuFlags1::
+wcfa5:: ds 1
+w2DMenuFlags2::
+wcfa6:: ds 1
+w2DMenuFlags3::
wcfa7:: ds 1
+w2DMenuFlags4::
wcfa8:: ds 1
wMenuData3End::
-MenuSelection2:: ds 1
-wcfaa:: ds 1
-wcfab:: ds 1
-wcfac:: ds 1
-wcfad:: ds 4
+wMenuCursorY:: ds 1
+wMenuCursorX:: ds 1
+wCursorOffCharacter:: ds 1
+wCursorCurrentTile:: ds 2
+ ds 3
OverworldDelay:: ; cfb1
ds 1
@@ -1471,7 +1632,7 @@ wSaveFileExists:: ds 1
TextBoxFrame:: ; cfce
; bits 0-2: textbox frame 0-7
ds 1
-
+TextBoxFlags::
ds 1
GBPrinter:: ; cfd0
@@ -1498,7 +1659,7 @@ wMinutesSince:: ds 1
wHoursSince:: ds 1
wDaysSince:: ds 1
- ds 40
+wRAM0End:: ; cfc0
SECTION "WRAM 1", WRAMX, BANK [1]
@@ -1507,6 +1668,7 @@ wd000:: ds 1
DefaultSpawnpoint::
wd001:: ds 1
+; d002
wTempMail:: mailmsg wTempMail
ds wTempMail - @
@@ -1522,7 +1684,13 @@ wSeerCaughtData:: ds 1
wSeerCaughtGender:: ds 1
ds wSeerAction - @
+wBufferMonNick:: ds PKMN_NAME_LENGTH
+wBufferMonOT:: ds NAME_LENGTH
+wBufferMon:: party_struct wBufferMon
+ ds wBufferMonNick - @
+
wd002::
+
PhoneScriptBank::
LuckyNumberDigit1Buffer::
wCurrentRadioLine::
@@ -1598,11 +1766,6 @@ wd016:: ds 1
wMartItem8BCD::
wd017:: ds 1
- ds wd00d - @
-wd00d_MonOT:: ds NAME_LENGTH
-wd018_Mon:: party_struct wd018_Mon
- ds wd018_Mon - @
-
wd018:: ds 1
wd019:: ds 1
wMartItem9BCD::
@@ -1727,16 +1890,20 @@ wBallsPocketScrollPosition:: ds 1
wTMHMPocketScrollPosition:: ds 1
wMoveSwapBuffer::
wSwitchMon::
+wSwitchItem::
wd0e3:: ds 1
wMenuScrollPosition:: ds 4
wQueuedScriptBank:: ds 1
wQueuedScriptAddr:: ds 2
+wNumMoves::
wd0eb:: ds 1
wFieldMoveSucceeded::
+wItemEffectSucceeded::
wPlayerAction::
; 0 - use move
; 1 - use item
; 2 - switch
+wSolvedUnownPuzzle::
wd0ec:: ds 1
VramState:: ; d0ed
@@ -1804,8 +1971,7 @@ wd13f:: ds 2
PartyMenuActionText:: ; d141
ds 1
-wItemAttributeParamBuffer::
-wd142::
+wItemAttributeParamBuffer:: ; d142
ds 1
CurPartyLevel:: ; d143
@@ -1814,18 +1980,14 @@ CurPartyLevel:: ; d143
wd144:: ds 2
; used when following a map warp
-wNextWarp::
-wd146:: ds 1
-wNextMapGroup::
-wd147:: ds 1
-wNextMapNumber::
-wd148:: ds 1
-wPrevWarp::
-wd149:: ds 1
-wPrevMapGroup::
-wd14a:: ds 1
-wPrevMapNumber::
-wd14b:: ds 1
+; d146
+wNextWarp:: ds 1
+wNextMapGroup:: ds 1
+wNextMapNumber:: ds 1
+wPrevWarp:: ds 1
+wPrevMapGroup:: ds 1
+wPrevMapNumber:: ds 1
+; d14c
wd14c:: ds 1 ; used in FollowNotExact
wd14d:: ds 1 ; used in FollowNotExact
@@ -1854,9 +2016,9 @@ wd182:: ds 1
wd191:: ds 1
wd192:: ds 1
wd193:: ds 1
-wd194:: dw
-wd196:: ds 1
-wd197:: ds 1
+wOverworldMapAnchor:: dw
+wMetatileStandingY:: ds 1
+wMetatileStandingX:: ds 1
wSecondMapHeaderBank:: ds 1
wTileset:: ds 1
wPermission:: ds 1
@@ -1989,7 +2151,7 @@ TilesetPalettes:: ; d1e6
EvolvableFlags:: ; d1e8
flag_array PARTY_LENGTH
-wd1e9:: ds 1
+wForceEvolution:: ds 1
MagikarpLength::
Buffer1:: ; d1ea
ds 1
@@ -2120,10 +2282,12 @@ CurDamage:: ; d256
ds 2
ds 2
-wd25a:: ds 3
-wd25d:: ds 1
+wMornEncounterRate:: ds 1
+wDayEncounterRate:: ds 1
+wNiteEncounterRate:: ds 1
+wWaterEncounterRate:: ds 1
wListMoves_MoveIndicesBuffer:: ds 4
-wd262:: ds 1
+wPutativeTMHMMove:: ds 1
wd263:: ds 1
wd264:: ds 1
wFoundMatchingIDInParty::
@@ -2139,9 +2303,8 @@ TimeOfDay:: ; d269
ds 1
ds 1
+
SECTION "Enemy Party", WRAMX, BANK [1]
-OTPlayerName:: ds NAME_LENGTH
- ds OTPlayerName - @
wPokedexShowPointerAddr::
wd26b:: ds 1
wd26c:: ds 1
@@ -2149,13 +2312,33 @@ wPokedexShowPointerBank::
wd26d:: ds 1
ds 3
wd271:: ds 5
-OTPlayerID::
wd276:: ds 10
+ ds wd26b - @
+
+; SECTION "Enemy Party", WRAMX, BANK [1]
+OTPlayerName:: ds NAME_LENGTH
+OTPlayerID:: ds 2
+ ds 8
OTPartyCount:: ds 1 ; d280
OTPartySpecies:: ds PARTY_LENGTH ; d281
OTPartyEnd:: ds 1
+wDudeBag:: ; d288
+wDudeNumItems:: ds 1
+wDudeItems:: ds 2 * 4
+wDudeItemsEnd:: ds 1
+
+wDudeNumKeyItems:: ds 1 ; d292
+wDudeKeyItems:: ds 18
+wDudeKeyItemsEnd:: ds 1
+
+wDudeNumBalls:: ds 1 ; d2a6
+wDudeBalls:: ds 2 * 4
+wDudeBallsEnd:: ds 1
+wDudeBagEnd::
+ ds wDudeBag - @
+
OTPartyMons::
OTPartyMon1:: party_struct OTPartyMon1 ; d288
OTPartyMon2:: party_struct OTPartyMon2 ; d2b8
@@ -2182,6 +2365,7 @@ MapEventStatus:: ; d433
ds 1
ScriptFlags:: ; d434
+; bit 3: priority jump
ds 1
ScriptFlags2:: ; d435
ds 1
@@ -2203,16 +2387,16 @@ ScriptPos:: ; d43a
ds 2
wScriptStackSize:: ds 1
-wScriptStackBA1:: ds 3
-wScriptStackBA2:: ds 3
-wScriptStackBA3:: ds 3
-wScriptStackBA4:: ds 3
-wScriptStackBA5:: ds 3
+wScriptStack:: ds 3 * 5
ds 1
ScriptDelay:: ; d44d
ds 1
+wPriorityScriptBank::
+wScriptTextBank::
wd44e:: ds 1
+wPriorityScriptAddr::
+wScriptTextAddr::
wd44f:: ds 1
wd450:: ds 1
wd451:: ds 1
@@ -2233,7 +2417,8 @@ wReceiveCallDelay_StartTime:: ds 3
ds 3
wBugContestMinsRemaining:: ds 1
wBugContestSecsRemaining:: ds 1
- ds 4
+ ds 2
+wMapStatusEnd:: ds 2 ; d470
wCrystalData::
PlayerGender:: ; d472
@@ -2408,8 +2593,8 @@ TimeOfDayPal:: ; d841
ds 1
ds 4
; d846
-wd846:: ds 1
-wd847:: ds 1
+wTimeOfDayPalFlags:: ds 1
+wTimeOfDayPalset:: ds 1
CurTimeOfDay:: ; d848
ds 1
@@ -2487,7 +2672,7 @@ PCItemsEnd::
wPokegearFlags:: ds 1
wRadioTuningKnob:: ds 1
-wd959:: ds 2
+wLastDexMode:: ds 2
WhichRegisteredItem:: ; d95b
ds 1
RegisteredItem:: ; d95c
@@ -2736,9 +2921,9 @@ wBlueCardBalance:: ds 1
wDailyRematchFlags:: ds 4
wDailyPhoneItemFlags:: ds 4
wDailyPhoneTimeOfDayFlags:: ds 4
-wdc58:: ds 2
-wdc5a:: ds 1
-wdc5b:: ds 1
+wKenjiBreakTimer:: ds 2 ; Kenji
+wYanmaMapGroup:: ds 1 ; dc5a
+wYanmaMapNumber:: ds 1
wdc5c:: ds 3
wdc5f:: ds 1
wdc60:: ds 19
@@ -2768,11 +2953,11 @@ wPlayerDataEnd::
wMapData::
VisitedSpawns:: ; dca5
- flag_array 27
+ flag_array NUM_SPAWNS
-wdca9:: ds 1
-wdcaa:: ds 1
-wdcab:: ds 1
+wDigWarp:: ds 1
+wDigMapGroup:: ds 1
+wDigMapNumber:: ds 1
; used on maps like second floor pokécenter, which are reused, so we know which
; map to return to
BackupWarpNumber:: ; dcac
@@ -2784,10 +2969,8 @@ BackupMapNumber:: ; dcae
ds 3
-wLastSpawnMapGroup::
-wdcb2:: ds 1
-wLastSpawnMapNumber::
-wdcb3:: ds 1
+wLastSpawnMapGroup:: ds 1
+wLastSpawnMapNumber:: ds 1
WarpNumber:: ; dcb4
ds 1
@@ -2799,10 +2982,7 @@ YCoord:: ; dcb7
ds 1 ; current y coordinate relative to top-left corner of current map
XCoord:: ; dcb8
ds 1 ; current x coordinate relative to top-left corner of current map
-
- ds 6
-wdcbf:: ds 1
- ds 23
+wScreenSave:: ds 6 * 5
wMapDataEnd::
@@ -2848,7 +3028,7 @@ UnownDex:: ; ded9
UnlockedUnowns:: ; def3
ds 1
-wdef4:: ds 1
+wFirstUnownSeen:: ds 1
wDaycareMan:: ; def5
@@ -2891,8 +3071,8 @@ wBugContestSecondPartySpecies:: ds 1
wdf9c::
wContestMon:: party_struct wContestMon ; df9c
-wdfcc:: ds 1
-wdfcd:: ds 1
+wDunsparceMapGroup:: ds 1
+wDunsparceMapNumber:: ds 1
wFishingSwarmFlag:: ds 1
roam_struct: MACRO
@@ -2908,10 +3088,10 @@ wRoamMon1:: roam_struct wRoamMon1 ; dfcf
wRoamMon2:: roam_struct wRoamMon2 ; dfd6
wRoamMon3:: roam_struct wRoamMon3 ; dfdd
-wdfe4:: ds 1
-wdfe5:: ds 1
-wdfe6:: ds 1
-wdfe7:: ds 1
+wRoamMons_CurrentMapNumber:: ds 1
+wRoamMons_CurrentMapGroup:: ds 1
+wRoamMons_LastMapNumber:: ds 1
+wRoamMons_LastMapGroup:: ds 1
wBestMagikarpLengthFeet:: ds 1
wBestMagikarpLengthInches:: ds 1
wMagikarpRecordHoldersName:: ds NAME_LENGTH
@@ -2935,20 +3115,17 @@ w2_d16e:: ds 1
wPokeAnimCoord:: ds 2
wPokeAnimFrontpicHeight:: ds 1
; PokeAnim Data
-w2_d172:: ds 1
+wPokeAnimExtraFlag:: ds 1
w2_d173:: ds 1
-w2_d174:: ds 1
-w2_d175:: ds 1
-w2_d176:: ds 1
-w2_d177:: ds 1
-w2_d178:: ds 1
-w2_d179:: ds 1
-w2_d17a:: ds 1
-w2_d17b:: ds 1
-w2_d17c:: ds 1
+wPokeAnimPointerBank:: ds 1
+wPokeAnimPointerAddr:: ds 2
+wPokeAnimFramesBank:: ds 1
+wPokeAnimFramesAddr:: ds 2
+wPokeAnimBitmaskBank:: ds 1
+wPokeAnimBitmaskAddr:: ds 2
w2_d17d:: ds 1
w2_d17e:: ds 1
-w2_d17f:: ds 1
+wPokeAnimRepeatTimer:: ds 1
w2_d180:: ds 1
wPokeAnimWaitCounter:: ds 1
w2_d182:: ds 1
@@ -2988,10 +3165,13 @@ w3_d742:: battle_tower_struct w3_d742
ds -$22
wBTChoiceOfLvlGroup::
-w3_d800:: ds $400
+w3_d800:: ds $69
+w3_d869:: ds $26
+w3_d88f:: ds 6
+w3_d895:: ds $36b
w3_dc00:: ds $168
-w3_dd68::
-
+w3_dd68:: ds $294
+w3_dffc:: ds 4
SECTION "GBC Video", WRAMX, BANK [5]
@@ -3011,24 +3191,34 @@ w5_d192:: ds 1
w5_d193:: ds 1
w5_d194:: ds 1
w5_d195:: ds 1
-
ds 106
LYOverridesBackup:: ; d200
ds SCREEN_HEIGHT_PX
LYOverridesBackupEnd::
- ds $100 - SCREEN_HEIGHT_PX
-
-SECTION "Battle Animations", WRAMX, BANK [5]
+SECTION "Battle Animations", WRAMX [$d300], BANK [5]
w5_d300:: ds 10
-ActiveAnimObjects:: ; d30a
- ds 4 * 40
+battle_anim_struct: MACRO
+; Placeholder until we can figure out what it all means
+ ds $18
+endm
- ds 80
+ActiveAnimObjects:: ; d30a
+AnimObject01:: battle_anim_struct AnimObject01
+AnimObject02:: battle_anim_struct AnimObject02
+AnimObject03:: battle_anim_struct AnimObject03
+AnimObject04:: battle_anim_struct AnimObject04
+AnimObject05:: battle_anim_struct AnimObject05
+AnimObject06:: battle_anim_struct AnimObject06
+AnimObject07:: battle_anim_struct AnimObject07
+AnimObject08:: battle_anim_struct AnimObject08
+AnimObject09:: battle_anim_struct AnimObject09
+AnimObject10:: battle_anim_struct AnimObject10
+ActiveAnimObjectsEnd:: ; d3aa
ActiveBGEffects:: ; d3fa
ds 4 * 5
@@ -3071,13 +3261,15 @@ w5_dc3e:: ds $c
SECTION "WRAM 6", WRAMX, BANK [6]
-w6_d000:: ds $400
-w6_d400:: ds $200
+wBackupTilemap:: ds $20 * SCREEN_HEIGHT
+ ds $1c0
+wBackupAttrMap:: ds $20 * SCREEN_HEIGHT
+ ds -$40
w6_d600:: ds $200
w6_d800::
INCLUDE "sram.asm"
SECTION "WRAM 7", WRAMX, BANK [7]
-w7_d000:: ds $1000 - 1
-w7_dfff:: ds 1
+wWindowStack:: ds $1000 - 1
+wWindowStackBottom:: ds 1