From 2fd654a1b453c08fbf1d6434e95eb1808a6130b6 Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 20 Jun 2026 06:52:48 -0400 Subject: [PATCH] Comment some more union sizes --- ram/wram.asm | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/ram/wram.asm b/ram/wram.asm index 44775192a..804022c67 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -186,6 +186,7 @@ ENDU SECTION "Overworld Map", WRAM0 +; This union spans 1300 bytes. UNION wOverworldMap:: ds 1300 wOverworldMapEnd:: @@ -277,6 +278,7 @@ wTextDest:: dw ; if non-zero, skip waiting for a button press after displaying text in DisplayTextID wDoNotWaitForButtonPressAfterDisplayingText:: db +; This union spans 12 bytes. UNION ; the received menu selection is stored twice wLinkMenuSelectionReceiveBuffer:: dw @@ -922,12 +924,13 @@ wStatusScreenCurrentPP:: db wNormalMaxPPList:: ds NUM_MOVES ENDU +; This union spans 360 bytes. UNION -; buffer for transferring the random number list generated by the other gameboy -wSerialOtherGameboyRandomNumberListBlock:: ds $11 -NEXTU ; second buffer for temporarily saving and restoring current screen's tiles (e.g. if menus are drawn on top) wTileMapBackup2:: ds SCREEN_AREA +NEXTU +; buffer for transferring the random number list generated by the other gameboy +wSerialOtherGameboyRandomNumberListBlock:: ds $11 ENDU ; This union spans 30 bytes. @@ -1045,7 +1048,6 @@ wDefaultPaletteCommand:: db UNION wPlayerHPBarColor:: db - NEXTU ; species of the mon whose palette is used for the whole screen wWholeScreenPaletteMonSpecies:: db @@ -1202,7 +1204,6 @@ wEnemyMonBaseExp:: db wBattleMonNick:: ds NAME_LENGTH wBattleMon:: battle_struct wBattleMon - wTrainerClass:: db ds 1 @@ -1213,7 +1214,6 @@ wTrainerPicPointer:: dw UNION wTempMoveNameBuffer:: ds MOVE_NAME_LENGTH - NEXTU ; The name of the mon that is learning a move. wLearnMoveMonName:: ds NAME_LENGTH @@ -1322,13 +1322,11 @@ wEnemyDisabledMove:: db UNION ; the amount of damage accumulated by the player while biding wPlayerBideAccumulatedDamage:: dw - -NEXTU -wUnknownSerialCounter2:: dw - NEXTU ; number of hits by player in attacks like Double Slap, etc. wPlayerNumHits:: db +NEXTU +wUnknownSerialCounter2:: dw ENDU ds 2 @@ -1339,7 +1337,6 @@ wEscapedFromBattle:: db UNION wAmountMoneyWon:: ds 3 ; BCD - NEXTU wObjectToHide:: db wObjectToShow:: db @@ -1387,6 +1384,7 @@ wSaveFileStatus:: db ; number of tiles in current battle animation frame block wNumFBTiles:: db +; This union spans 2 bytes. UNION wSpiralBallsBaseY:: db wSpiralBallsBaseX:: db @@ -1434,7 +1432,6 @@ wSubAnimAddrPtr:: dw UNION ; the address of the current subentry of the current subanimation wSubAnimSubEntryAddr:: dw - NEXTU ; If non-zero, the allow matches flag is always set. ; There is a 1/256 (~0.4%) chance that this value will be set to 60, which is @@ -1684,6 +1681,7 @@ wPrize3:: db ds 1 +; This union spans 17 bytes. UNION wSerialRandomNumberListBlock:: ds $11 @@ -2142,7 +2140,7 @@ wSecondLockTrashCanIndex:: db wEventFlags:: flag_array NUM_EVENTS - +; This union spans 293 bytes. UNION wGrassRate:: db wGrassMons:: ds WILDDATA_LENGTH - 1 @@ -2171,6 +2169,8 @@ FOR n, 1, PARTY_LENGTH + 1 wEnemyMon{d:n}:: party_struct wEnemyMon{d:n} ENDR +ENDU + wEnemyMonOT:: ; wEnemyMon1OT - wEnemyMon6OT FOR n, 1, PARTY_LENGTH + 1 @@ -2183,9 +2183,6 @@ FOR n, 1, PARTY_LENGTH + 1 wEnemyMon{d:n}Nick:: ds NAME_LENGTH ENDR -ENDU - - wTrainerHeaderPtr:: dw ds 6 @@ -2210,7 +2207,6 @@ wSafariZoneGameOver:: db wNumSafariBalls:: db - ; 0 if no pokemon is in the daycare ; 1 if pokemon is in the daycare wDayCareInUse:: db