pokered/wram.asm

3115 lines
59 KiB
NASM
Raw Normal View History

INCLUDE "constants.asm"
INCLUDE "macros/wram.asm"
SECTION "WRAM Bank 0", WRAM0
2020-06-28 03:03:39 +00:00
wUnusedC000::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSoundID::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMuteAudioAndPauseMusic::
2015-08-09 05:32:44 +00:00
; bit 7: whether sound has been muted
; all bits: whether the effective is active
; Store 1 to activate effect (any value in the range [1, 127] works).
; All audio is muted and music is paused. Sfx continues playing until it
; ends normally.
; Store 0 to resume music.
ds 1
2020-06-28 03:03:39 +00:00
wDisableChannelOutputWhenSfxEnds::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wStereoPanning::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSavedVolume::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wChannelCommandPointers::
2015-08-09 05:32:44 +00:00
ds 16
2020-06-28 03:03:39 +00:00
wChannelReturnAddresses::
2015-08-09 05:32:44 +00:00
ds 16
2020-06-28 03:03:39 +00:00
wChannelSoundIDs::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelFlags1::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelFlags2::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelDutyCycles::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelDutyCyclePatterns::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelVibratoDelayCounters::
2015-08-09 05:32:44 +00:00
; reloaded at the beginning of a note. counts down until the vibrato begins.
ds 8
2020-06-28 03:03:39 +00:00
wChannelVibratoExtents::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelVibratoRates::
2015-08-09 05:32:44 +00:00
; high nybble is rate (counter reload value) and low nybble is counter.
; time between applications of vibrato.
ds 8
2020-06-28 03:03:39 +00:00
wChannelFrequencyLowBytes::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelVibratoDelayCounterReloadValues::
2015-08-09 05:32:44 +00:00
; delay of the beginning of the vibrato from the start of the note
ds 8
2020-06-28 03:03:39 +00:00
wChannelPitchSlideLengthModifiers::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelPitchSlideFrequencySteps::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelPitchSlideFrequencyStepsFractionalPart::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelPitchSlideCurrentFrequencyFractionalPart::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelPitchSlideCurrentFrequencyHighBytes::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelPitchSlideCurrentFrequencyLowBytes::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelPitchSlideTargetFrequencyHighBytes::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelPitchSlideTargetFrequencyLowBytes::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelNoteDelayCounters::
2015-08-09 05:32:44 +00:00
; Note delays are stored as 16-bit fixed-point numbers where the integer part
; is 8 bits and the fractional part is 8 bits.
ds 8
2020-06-28 03:03:39 +00:00
wChannelLoopCounters::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelNoteSpeeds::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelNoteDelayCountersFractionalPart::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelOctaves::
2015-08-09 05:32:44 +00:00
ds 8
2020-06-28 03:03:39 +00:00
wChannelVolumes::
2015-08-09 05:32:44 +00:00
; also includes fade for hardware channels that support it
ds 8
wMusicWaveInstrument::
ds 1
wSfxWaveInstrument::
ds 1
2020-06-28 03:03:39 +00:00
wMusicTempo::
2015-08-09 05:32:44 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wSfxTempo::
2015-08-09 05:32:44 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wSfxHeaderPointer::
2015-08-09 05:32:44 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wNewSoundID::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wAudioROMBank::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wAudioSavedROMBank::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wFrequencyModifier::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wTempoModifier::
2015-08-09 05:32:44 +00:00
ds 1
ds 13
2018-11-18 23:29:24 +00:00
SECTION "Sprite State Data", WRAM0
wSpriteDataStart::
2020-06-28 03:03:39 +00:00
wSpriteStateData1::
; data for all sprites on the current map
; holds info for 16 sprites with $10 bytes each
; player sprite is always sprite 0
; C1x0: picture ID (fixed, loaded at map init)
; C1x1: movement status (0: uninitialized, 1: ready, 2: delayed, 3: moving)
; C1x2: sprite image index (changed on update, $ff if off screen, includes facing direction, progress in walking animation and a sprite-specific offset)
; C1x3: Y screen position delta (-1,0 or 1; added to c1x4 on each walking animation update)
; C1x4: Y screen position (in pixels, always 4 pixels above grid which makes sprites appear to be in the center of a tile)
; C1x5: X screen position delta (-1,0 or 1; added to c1x6 on each walking animation update)
; C1x6: X screen position (in pixels, snaps to grid if not currently walking)
; C1x7: intra-animation-frame counter (counting upwards to 4 until c1x8 is incremented)
; C1x8: animation frame counter (increased every 4 updates, hold four states (totalling to 16 walking frames)
; C1x9: facing direction (0: down, 4: up, 8: left, $c: right)
; C1xA
; C1xB
; C1xC
; C1xD
; C1xE
; C1xF
wSpritePlayerStateData1:: spritestatedata1 wSpritePlayerStateData1
wSprite01StateData1:: spritestatedata1 wSprite01StateData1
wSprite02StateData1:: spritestatedata1 wSprite02StateData1
wSprite03StateData1:: spritestatedata1 wSprite03StateData1
wSprite04StateData1:: spritestatedata1 wSprite04StateData1
wSprite05StateData1:: spritestatedata1 wSprite05StateData1
wSprite06StateData1:: spritestatedata1 wSprite06StateData1
wSprite07StateData1:: spritestatedata1 wSprite07StateData1
wSprite08StateData1:: spritestatedata1 wSprite08StateData1
wSprite09StateData1:: spritestatedata1 wSprite09StateData1
wSprite10StateData1:: spritestatedata1 wSprite10StateData1
wSprite11StateData1:: spritestatedata1 wSprite11StateData1
wSprite12StateData1:: spritestatedata1 wSprite12StateData1
wSprite13StateData1:: spritestatedata1 wSprite13StateData1
wSprite14StateData1:: spritestatedata1 wSprite14StateData1
wSprite15StateData1:: spritestatedata1 wSprite15StateData1
2020-06-28 03:03:39 +00:00
wSpriteStateData2::
; more data for all sprites on the current map
; holds info for 16 sprites with $10 bytes each
; player sprite is always sprite 0
; C2x0: walk animation counter (counting from $10 backwards when moving)
2014-06-09 20:58:02 +00:00
; C2x1:
; C2x2: Y displacement (initialized at 8, supposed to keep moving sprites from moving too far, but bugged)
; C2x3: X displacement (initialized at 8, supposed to keep moving sprites from moving too far, but bugged)
; C2x4: Y position (in 2x2 tile grid steps, topmost 2x2 tile has value 4)
; C2x5: X position (in 2x2 tile grid steps, leftmost 2x2 tile has value 4)
; C2x6: movement byte 1 (determines whether a sprite can move, $ff:not moving, $fe:random movements, others unknown)
; C2x7: (?) (set to $80 when in grass, else $0; may be used to draw grass above the sprite)
; C2x8: delay until next movement (counted downwards, status (c1x1) is set to ready if reached 0)
; C2x9
; C2xA
; C2xB
; C2xC
; C2xD
; C2xE: sprite image base offset (in video ram, player always has value 1, used to compute c1x2)
; C2xF
wSpritePlayerStateData2:: spritestatedata2 wSpritePlayerStateData2
wSprite01StateData2:: spritestatedata2 wSprite01StateData2
wSprite02StateData2:: spritestatedata2 wSprite02StateData2
wSprite03StateData2:: spritestatedata2 wSprite03StateData2
wSprite04StateData2:: spritestatedata2 wSprite04StateData2
wSprite05StateData2:: spritestatedata2 wSprite05StateData2
wSprite06StateData2:: spritestatedata2 wSprite06StateData2
wSprite07StateData2:: spritestatedata2 wSprite07StateData2
wSprite08StateData2:: spritestatedata2 wSprite08StateData2
wSprite09StateData2:: spritestatedata2 wSprite09StateData2
wSprite10StateData2:: spritestatedata2 wSprite10StateData2
wSprite11StateData2:: spritestatedata2 wSprite11StateData2
wSprite12StateData2:: spritestatedata2 wSprite12StateData2
wSprite13StateData2:: spritestatedata2 wSprite13StateData2
wSprite14StateData2:: spritestatedata2 wSprite14StateData2
wSprite15StateData2:: spritestatedata2 wSprite15StateData2
wSpriteDataEnd::
2018-11-18 23:29:24 +00:00
SECTION "OAM Buffer", WRAM0
2020-06-28 03:03:39 +00:00
wOAMBuffer::
; buffer for OAM data. Copied to OAM by DMA
ds 4 * 40
2020-06-28 03:03:39 +00:00
wTileMap::
; buffer for tiles that are visible on screen (20 columns by 18 rows)
ds 20 * 18
2020-06-28 03:03:39 +00:00
wSerialPartyMonsPatchList::
2015-02-07 10:43:08 +00:00
; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer
2020-06-28 03:03:39 +00:00
wTileMapBackup::
; buffer for temporarily saving and restoring current screen's tiles
; (e.g. if menus are drawn on top)
2015-02-07 10:43:08 +00:00
; ds 20 * 18
ds 200
2020-06-28 03:03:39 +00:00
wSerialEnemyMonsPatchList::
2015-02-07 10:43:08 +00:00
; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer
ds 200
ds 80
wTempPic::
2020-06-28 03:03:39 +00:00
wOverworldMap::
ds 1300
wOverworldMapEnd::
2020-06-28 03:03:39 +00:00
wRedrawRowOrColumnSrcTiles::
; the tiles of the row or column to be redrawn by RedrawRowOrColumn
2015-08-14 11:11:53 +00:00
ds SCREEN_WIDTH * 2
; coordinates of the position of the cursor for the top menu item (id 0)
2020-06-28 03:03:39 +00:00
wTopMenuItemY::
ds 1
2020-06-28 03:03:39 +00:00
wTopMenuItemX::
ds 1
2020-06-28 03:03:39 +00:00
wCurrentMenuItem::
; the id of the currently selected menu item
; the top item has id 0, the one below that has id 1, etc.
; note that the "top item" means the top item currently visible on the screen
; add this value to [wListScrollOffset] to get the item's position within the list
ds 1
2020-06-28 03:03:39 +00:00
wTileBehindCursor::
; the tile that was behind the menu cursor's current location
ds 1
2020-06-28 03:03:39 +00:00
wMaxMenuItem::
; id of the bottom menu item
ds 1
2020-06-28 03:03:39 +00:00
wMenuWatchedKeys::
; bit mask of keys that the menu will respond to
ds 1
2020-06-28 03:03:39 +00:00
wLastMenuItem::
; id of previously selected menu item
ds 1
2020-06-28 03:03:39 +00:00
wPartyAndBillsPCSavedMenuItem::
2015-07-16 03:04:58 +00:00
; It is mainly used by the party menu to remember the cursor position while the
; menu isn't active.
; It is also used to remember the cursor position of mon lists (for the
; withdraw/deposit/release actions) in Bill's PC so that it doesn't get lost
; when you choose a mon from the list and a sub-menu is shown. It's reset when
; you return to the main Bill's PC menu.
ds 1
2020-06-28 03:03:39 +00:00
wBagSavedMenuItem::
2015-07-16 03:04:58 +00:00
; It is used by the bag list to remember the cursor position while the menu
; isn't active.
ds 1
2020-06-28 03:03:39 +00:00
wBattleAndStartSavedMenuItem::
2015-07-16 03:04:58 +00:00
; It is used by the start menu to remember the cursor position while the menu
; isn't active.
; The battle menu uses it so that the cursor position doesn't get lost when
; a sub-menu is shown. It's reset at the start of each battle.
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMoveListIndex::
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMonNumber::
2015-07-16 03:04:58 +00:00
; index in party of currently battling mon
ds 1
2020-06-28 03:03:39 +00:00
wMenuCursorLocation::
; the address of the menu cursor's current location within wTileMap
ds 2
ds 2
2020-06-28 03:03:39 +00:00
wMenuJoypadPollCount::
; how many times should HandleMenuInput poll the joypad state before it returns?
ds 1
2020-06-28 03:03:39 +00:00
wMenuItemToSwap::
2014-08-09 05:39:13 +00:00
; id of menu item selected for swapping (counts from 1) (0 means that no menu item has been selected for swapping)
ds 1
2020-06-28 03:03:39 +00:00
wListScrollOffset::
; offset of the current top menu item from the beginning of the list
; keeps track of what section of the list is on screen
ds 1
2020-06-28 03:03:39 +00:00
wMenuWatchMovingOutOfBounds::
2015-07-13 07:32:03 +00:00
; If non-zero, then when wrapping is disabled and the player tries to go past
; the top or bottom of the menu, return from HandleMenuInput. This is useful for
; menus that have too many items to display at once on the screen because it
; allows the caller to scroll the entire menu up or down when this happens.
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wTradeCenterPointerTableIndex::
2015-02-07 10:43:08 +00:00
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wTextDest::
2016-09-11 09:01:37 +00:00
; destination pointer for text output
; this variable is written to, but is never read from
ds 2
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wDoNotWaitForButtonPressAfterDisplayingText::
2014-09-13 07:50:56 +00:00
; if non-zero, skip waiting for a button press after displaying text in DisplayTextID
ds 1
2020-06-28 03:03:39 +00:00
wSerialSyncAndExchangeNybbleReceiveData::
2015-02-07 10:43:08 +00:00
; the final received nybble is stored here by Serial_SyncAndExchangeNybble
2020-06-28 03:03:39 +00:00
wSerialExchangeNybbleTempReceiveData::
2015-02-07 10:43:08 +00:00
; temporary nybble used by Serial_ExchangeNybble
2020-06-28 03:03:39 +00:00
wLinkMenuSelectionReceiveBuffer::
2015-02-07 10:43:08 +00:00
; two byte buffer
; the received menu selection is stored twice
2015-07-26 02:26:54 +00:00
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wSerialExchangeNybbleReceiveData::
2015-02-07 10:43:08 +00:00
; the final received nybble is stored here by Serial_ExchangeNybble
ds 1
ds 3
2020-06-28 03:03:39 +00:00
wSerialExchangeNybbleSendData::
2015-02-07 10:43:08 +00:00
; this nybble is sent when using Serial_SyncAndExchangeNybble or Serial_ExchangeNybble
2020-06-28 03:03:39 +00:00
wLinkMenuSelectionSendBuffer::
2015-02-07 10:43:08 +00:00
; two byte buffer
; the menu selection byte is stored twice before sending
ds 5
2020-06-28 03:03:39 +00:00
wLinkTimeoutCounter::
2015-02-07 10:43:08 +00:00
; 1 byte
2020-06-28 03:03:39 +00:00
wUnknownSerialCounter::
2015-02-07 10:43:08 +00:00
; 2 bytes
2020-06-28 03:03:39 +00:00
wEnteringCableClub::
2015-07-26 02:26:54 +00:00
ds 1
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wWhichTradeMonSelectionMenu::
2015-02-07 10:43:08 +00:00
; $00 = player mons
; $01 = enemy mons
2020-06-28 03:03:39 +00:00
wMonDataLocation::
2015-07-16 03:04:58 +00:00
; 0 = player's party
; 1 = enemy party
; 2 = current box
; 3 = daycare
; 4 = in-battle mon
;
; AddPartyMon uses it slightly differently.
; If the lower nybble is 0, the mon is added to the player's party, else the enemy's.
; If the entire value is 0, then the player is allowed to name the mon.
ds 1
2020-06-28 03:03:39 +00:00
wMenuWrappingEnabled::
; set to 1 if you can go from the bottom to the top or top to bottom of a menu
; set to 0 if you can't go past the top or bottom of the menu
ds 1
2020-06-28 03:03:39 +00:00
wCheckFor180DegreeTurn::
2015-07-25 03:27:59 +00:00
; whether to check for 180-degree turn (0 = don't, 1 = do)
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wMissableObjectIndex::
2015-07-25 03:27:59 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPredefID::
ds 1
2020-06-28 03:03:39 +00:00
wPredefRegisters::
ds 6
2020-06-28 03:03:39 +00:00
wTrainerHeaderFlagBit::
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wNPCMovementScriptPointerTableNum::
; which NPC movement script pointer is being used
; 0 if an NPC movement script is not running
ds 1
2020-06-28 03:03:39 +00:00
wNPCMovementScriptBank::
; ROM bank of current NPC movement script
ds 1
ds 2
2020-06-28 03:03:39 +00:00
wUnusedCC5B::
2015-08-13 05:14:31 +00:00
2020-06-28 03:03:39 +00:00
wVermilionDockTileMapBuffer::
2015-08-13 05:14:31 +00:00
; 180 bytes
2020-06-28 03:03:39 +00:00
wOaksAideRewardItemName::
2015-08-13 05:14:31 +00:00
2020-06-28 03:03:39 +00:00
wDexRatingNumMonsSeen::
2015-08-13 05:14:31 +00:00
2020-06-28 03:03:39 +00:00
wFilteredBagItems::
2015-08-13 05:14:31 +00:00
; List of bag items that has been filtered to a certain type of items,
; such as drinks or fossils.
2020-06-28 03:03:39 +00:00
wElevatorWarpMaps::
2015-08-13 05:14:31 +00:00
2020-06-28 03:03:39 +00:00
wMonPartySpritesSavedOAM::
2015-08-13 05:14:31 +00:00
; Saved copy of OAM for the first frame of the animation to make it easy to
; flip back from the second frame.
; $60 bytes
2020-06-28 03:03:39 +00:00
wTrainerCardBlkPacket::
2015-08-12 09:16:56 +00:00
; $40 bytes
2020-06-28 03:03:39 +00:00
wSlotMachineSevenAndBarModeChance::
2015-07-13 20:35:35 +00:00
; If a random number greater than this value is generated, then the player is
; allowed to have three 7 symbols or bar symbols line up.
; So, this value is actually the chance of NOT entering that mode.
; If the slot is lucky, it equals 250, giving a 5/256 (~2%) chance.
; Otherwise, it equals 253, giving a 2/256 (~0.8%) chance.
2020-06-28 03:03:39 +00:00
wHallOfFame::
wBoostExpByExpAll::
wAnimationType::
2015-03-31 19:09:43 +00:00
; values between 0-6. Shake screen horizontally, shake screen vertically, blink Pokemon...
2020-06-28 03:03:39 +00:00
wNPCMovementDirections::
2015-08-13 05:14:31 +00:00
ds 1
2015-07-15 11:27:59 +00:00
2020-06-28 03:03:39 +00:00
wDexRatingNumMonsOwned::
2015-08-13 05:14:31 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wDexRatingText::
2015-08-13 05:14:31 +00:00
ds 1
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineSavedROMBank::
2015-07-13 20:35:35 +00:00
; ROM back to return to when the player is done with the slot machine
ds 1
2015-07-26 02:26:54 +00:00
ds 26
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wAnimPalette::
2015-07-24 21:39:45 +00:00
ds 1
ds 29
2020-06-28 03:03:39 +00:00
wNPCMovementDirections2::
2020-06-28 03:03:39 +00:00
wSwitchPartyMonTempBuffer::
; temporary buffer when swapping party mon data
ds 10
2020-06-28 03:03:39 +00:00
wNumStepsToTake::
2015-07-15 20:58:21 +00:00
; used in Pallet Town scripted movement
ds 49
2020-06-28 03:03:39 +00:00
wRLEByteCount::
ds 1
2020-06-28 03:03:39 +00:00
wAddedToParty::
2015-07-19 03:49:52 +00:00
; 0 = not added
; 1 = added
2020-06-28 03:03:39 +00:00
wSimulatedJoypadStatesEnd::
; this is the end of the joypad states
; the list starts above this address and extends downwards in memory until here
; overloaded with below labels
2020-06-28 03:03:39 +00:00
wParentMenuItem::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wCanEvolveFlags::
2015-07-19 03:49:52 +00:00
; 1 flag for each party member indicating whether it can evolve
; The purpose of these flags is to track which mons levelled up during the
; current battle at the end of the battle when evolution occurs.
; Other methods of evolution simply set it by calling TryEvolvingMon.
ds 1
2020-06-28 03:03:39 +00:00
wForceEvolution::
2015-07-26 02:26:54 +00:00
ds 1
2015-03-31 18:40:22 +00:00
2020-06-28 03:03:39 +00:00
; if [wAILayer2Encouragement] != 1, the second AI layer is not applied
wAILayer2Encouragement::
2015-03-31 18:40:22 +00:00
ds 1
ds 1
; current HP of player and enemy substitutes
2020-06-28 03:03:39 +00:00
wPlayerSubstituteHP::
ds 1
2020-06-28 03:03:39 +00:00
wEnemySubstituteHP::
ds 1
2020-06-28 03:03:39 +00:00
wTestBattlePlayerSelectedMove::
2015-08-14 02:13:47 +00:00
; The player's selected move during a test battle.
; InitBattleVariables sets it to the move Pound.
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wMoveMenuType::
; 0=regular, 1=mimic, 2=above message box (relearn, heal pp..)
ds 1
2020-06-28 03:03:39 +00:00
wPlayerSelectedMove::
ds 1
2020-06-28 03:03:39 +00:00
wEnemySelectedMove::
ds 1
2020-06-28 03:03:39 +00:00
wLinkBattleRandomNumberListIndex::
ds 1
2020-06-28 03:03:39 +00:00
wAICount::
; number of times remaining that AI action can occur
ds 1
ds 2
2020-06-28 03:03:39 +00:00
wEnemyMoveListIndex::
ds 1
2020-06-28 03:03:39 +00:00
wLastSwitchInEnemyMonHP::
2015-07-24 03:48:35 +00:00
; The enemy mon's HP when it was switched in or when the current player mon
; was switched in, which was more recent.
; It's used to determine the message to print when switching out the player mon.
ds 2
2014-08-09 05:39:13 +00:00
2020-06-28 03:03:39 +00:00
wTotalPayDayMoney::
2014-08-09 05:39:13 +00:00
; total amount of money made using Pay Day during the current battle
ds 3
2020-06-28 03:03:39 +00:00
wSafariEscapeFactor::
2014-08-09 05:39:13 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSafariBaitFactor::
2014-08-09 05:39:13 +00:00
ds 1;
ds 1
2020-06-28 03:03:39 +00:00
wTransformedEnemyMonOriginalDVs::
2015-08-14 07:36:06 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wMonIsDisobedient:: ds 1
2020-06-28 03:03:39 +00:00
wPlayerDisabledMoveNumber:: ds 1
wEnemyDisabledMoveNumber:: ds 1
2020-06-28 03:03:39 +00:00
wInHandlePlayerMonFainted::
2015-08-14 07:36:06 +00:00
; When running in the scope of HandlePlayerMonFainted, it equals 1.
; When running in the scope of HandleEnemyMonFainted, it equals 0.
ds 1
2020-06-28 03:03:39 +00:00
wPlayerUsedMove:: ds 1
wEnemyUsedMove:: ds 1
2020-06-28 03:03:39 +00:00
wEnemyMonMinimized:: ds 1
2014-08-09 05:39:13 +00:00
2020-06-28 03:03:39 +00:00
wMoveDidntMiss:: ds 1
2020-06-28 03:03:39 +00:00
wPartyFoughtCurrentEnemyFlags::
2014-08-09 05:39:13 +00:00
; flags that indicate which party members have fought the current enemy mon
flag_array 6
2020-06-28 03:03:39 +00:00
wLowHealthAlarmDisabled::
2015-08-14 07:36:06 +00:00
; Whether the low health alarm has been disabled due to the player winning the
; battle.
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMonMinimized::
2015-08-14 07:36:06 +00:00
ds 1
2015-07-12 22:51:04 +00:00
ds 13
2014-08-09 05:39:13 +00:00
2020-06-28 03:03:39 +00:00
wLuckySlotHiddenObjectIndex::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wEnemyNumHits::
2015-02-07 10:43:08 +00:00
; number of hits by enemy in attacks like Double Slap, etc.
2020-06-28 03:03:39 +00:00
wEnemyBideAccumulatedDamage::
2015-02-07 10:43:08 +00:00
; the amount of damage accumulated by the enemy while biding (2 bytes)
ds 10
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wInGameTradeGiveMonSpecies::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wPlayerMonUnmodifiedLevel::
2014-08-09 05:39:13 +00:00
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wInGameTradeTextPointerTablePointer::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wPlayerMonUnmodifiedMaxHP::
2015-02-07 10:43:08 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wInGameTradeTextPointerTableIndex::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wPlayerMonUnmodifiedAttack::
2014-08-09 05:39:13 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wInGameTradeGiveMonName::
2014-08-09 05:39:13 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMonUnmodifiedDefense::
2014-08-09 05:39:13 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wPlayerMonUnmodifiedSpeed::
2014-08-09 05:39:13 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wPlayerMonUnmodifiedSpecial::
2014-08-09 05:39:13 +00:00
ds 2
; stat modifiers for the player's current pokemon
; value can range from 1 - 13 ($1 to $D)
; 7 is normal
wPlayerMonStatMods::
2020-06-28 03:03:39 +00:00
wPlayerMonAttackMod::
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMonDefenseMod::
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMonSpeedMod::
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMonSpecialMod::
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wInGameTradeReceiveMonName::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wPlayerMonAccuracyMod::
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMonEvasionMod::
ds 1
ds 3
2020-06-28 03:03:39 +00:00
wEnemyMonUnmodifiedLevel::
2014-08-09 05:39:13 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMonUnmodifiedMaxHP::
2014-08-09 05:39:13 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wEnemyMonUnmodifiedAttack::
2014-08-09 05:39:13 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wEnemyMonUnmodifiedDefense::
2014-08-09 05:39:13 +00:00
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wInGameTradeMonNick::
2014-08-09 05:39:13 +00:00
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wEnemyMonUnmodifiedSpeed::
2014-08-09 05:39:13 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wEnemyMonUnmodifiedSpecial::
2014-08-09 05:39:13 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEngagedTrainerClass::
ds 1
2020-06-28 03:03:39 +00:00
wEngagedTrainerSet::
; ds 1
; stat modifiers for the enemy's current pokemon
; value can range from 1 - 13 ($1 to $D)
; 7 is normal
wEnemyMonStatMods::
2020-06-28 03:03:39 +00:00
wEnemyMonAttackMod::
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMonDefenseMod::
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMonSpeedMod::
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMonSpecialMod::
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMonAccuracyMod::
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMonEvasionMod::
ds 1
2015-02-07 10:43:08 +00:00
wInGameTradeReceiveMonSpecies::
ds 1
ds 2
2020-06-28 03:03:39 +00:00
wNPCMovementDirections2Index::
2020-06-28 03:03:39 +00:00
wUnusedCD37::
2015-08-13 05:14:31 +00:00
2020-06-28 03:03:39 +00:00
wFilteredBagItemsCount::
2015-08-13 05:14:31 +00:00
; number of items in wFilteredBagItems list
ds 1
2020-06-28 03:03:39 +00:00
wSimulatedJoypadStatesIndex::
; the next simulated joypad state is at wSimulatedJoypadStatesEnd plus this value minus 1
; 0 if the joypad state is not being simulated
ds 1
2020-06-28 03:03:39 +00:00
wWastedByteCD39::
; written to but nothing ever reads it
ds 1
2020-06-28 03:03:39 +00:00
wWastedByteCD3A::
; written to but nothing ever reads it
ds 1
2020-06-28 03:03:39 +00:00
wOverrideSimulatedJoypadStatesMask::
; mask indicating which real button presses can override simulated ones
; XXX is it ever not 0?
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wFallingObjectsMovementData::
2015-07-24 21:39:45 +00:00
; up to 20 bytes (one byte for each falling object)
2020-06-28 03:03:39 +00:00
wSavedY::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wTempSCX::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wBattleTransitionCircleScreenQuadrantY::
2015-07-23 13:07:12 +00:00
; 0 = upper half (Y < 9)
; 1 = lower half (Y >= 9)
2020-06-28 03:03:39 +00:00
wBattleTransitionCopyTilesOffset::
2015-07-23 13:07:12 +00:00
; 2 bytes
; after 1 row/column has been copied, the offset to the next one to copy from
2020-06-28 03:03:39 +00:00
wInwardSpiralUpdateScreenCounter::
2015-07-23 13:07:12 +00:00
; counts down from 7 so that every time 7 more tiles of the spiral have been
; placed, the tile map buffer is copied to VRAM so that progress is visible
2020-06-28 03:03:39 +00:00
wHoFTeamIndex::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wSSAnneSmokeDriftAmount::
2015-07-19 03:49:52 +00:00
; multiplied by 16 to get the number of times to go right by 2 pixels
2020-06-28 03:03:39 +00:00
wRivalStarterTemp::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wBoxMonCounts::
2015-07-19 03:49:52 +00:00
; 12 bytes
; array of the number of mons in each box
2020-06-28 03:03:39 +00:00
wDexMaxSeenMon::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wPPRestoreItem::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wWereAnyMonsAsleep::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wCanPlaySlots::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wNumShakes::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wDayCareStartLevel::
2015-07-19 03:49:52 +00:00
; the level of the mon at the time it entered day care
2020-06-28 03:03:39 +00:00
wWhichBadge::
2015-07-18 15:17:29 +00:00
2020-06-28 03:03:39 +00:00
wPriceTemp::
2015-07-18 15:17:29 +00:00
; 3-byte BCD number
2020-06-28 03:03:39 +00:00
wTitleMonSpecies::
2015-07-17 07:16:27 +00:00
2020-06-28 03:03:39 +00:00
wPlayerCharacterOAMTile::
2015-07-17 07:16:27 +00:00
2020-06-28 03:03:39 +00:00
wMoveDownSmallStarsOAMCount::
2015-07-17 05:08:34 +00:00
; the number of small stars OAM entries to move down
2020-06-28 03:03:39 +00:00
wChargeMoveNum::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wCoordIndex::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wOptionsTextSpeedCursorX::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wBoxNumString::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wTrainerInfoTextBoxWidthPlus1::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wSwappedMenuItem::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wHoFMonSpecies::
2015-07-15 02:46:52 +00:00
2020-06-28 03:03:39 +00:00
wFieldMoves::
2015-07-14 22:48:34 +00:00
; 4 bytes
; the current mon's field moves
2020-06-28 03:03:39 +00:00
wBadgeNumberTile::
; tile ID of the badge number being drawn
2020-06-28 03:03:39 +00:00
wRodResponse::
; 0 = no bite
; 1 = bite
; 2 = no fish on map
2020-06-28 03:03:39 +00:00
wWhichTownMapLocation::
2015-07-14 02:24:07 +00:00
2020-06-28 03:03:39 +00:00
wStoppingWhichSlotMachineWheel::
2015-07-13 20:35:35 +00:00
; which wheel the player is trying to stop
; 0 = none, 1 = wheel 1, 2 = wheel 2, 3 or greater = wheel 3
2020-06-28 03:03:39 +00:00
wTradedPlayerMonSpecies::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wTradingWhichPlayerMon::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wChangeBoxSavedMapTextPointer::
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wFlyAnimUsingCoordList::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wPlayerSpinInPlaceAnimFrameDelay::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wPlayerSpinWhileMovingUpOrDownAnimDeltaY::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wHiddenObjectFunctionArgument::
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wWhichTrade::
; which entry from TradeMons to select
2020-06-28 03:03:39 +00:00
wTrainerSpriteOffset::
2015-07-19 21:01:08 +00:00
2020-06-28 03:03:39 +00:00
wUnusedCD3D::
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wHUDPokeballGfxOffsetX::
2015-07-23 13:07:12 +00:00
; difference in X between the next ball and the current one
2020-06-28 03:03:39 +00:00
wBattleTransitionCircleScreenQuadrantX::
2015-07-23 13:07:12 +00:00
; 0 = left half (X < 10)
; 1 = right half (X >= 10)
2020-06-28 03:03:39 +00:00
wSSAnneSmokeX::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wRivalStarterBallSpriteIndex::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wDayCareNumLevelsGrown::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wOptionsBattleAnimCursorX::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wTrainerInfoTextBoxWidth::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wHoFPartyMonIndex::
2015-07-15 02:46:52 +00:00
2020-06-28 03:03:39 +00:00
wNumCreditsMonsDisplayed::
2015-07-15 02:46:52 +00:00
; the number of credits mons that have been displayed so far
2020-06-28 03:03:39 +00:00
wBadgeNameTile::
; first tile ID of the name being drawn
2020-06-28 03:03:39 +00:00
wFlyLocationsList::
2015-07-14 02:24:07 +00:00
; 11 bytes plus $ff sentinel values at each end
2020-06-28 03:03:39 +00:00
wSlotMachineWheel1Offset::
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wTradedEnemyMonSpecies::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wTradingWhichEnemyMon::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wFlyAnimCounter::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wPlayerSpinInPlaceAnimFrameDelayDelta::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wPlayerSpinWhileMovingUpOrDownAnimMaxY::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wHiddenObjectFunctionRomBank::
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wTrainerEngageDistance::
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wHUDGraphicsTiles::
2015-07-23 13:07:12 +00:00
; 3 bytes
2020-06-28 03:03:39 +00:00
wDayCareTotalCost::
2015-07-23 13:07:12 +00:00
; 2-byte BCD number
2020-06-28 03:03:39 +00:00
wJigglypuffFacingDirections::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wOptionsBattleStyleCursorX::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wTrainerInfoTextBoxNextRowOffset::
2015-07-16 03:04:58 +00:00
2020-06-28 03:03:39 +00:00
wHoFMonLevel::
2015-07-15 02:46:52 +00:00
2020-06-28 03:03:39 +00:00
wBadgeOrFaceTiles::
; 8 bytes
; a list of the first tile IDs of each badge or face (depending on whether the
; badge is owned) to be drawn on the trainer screen
2020-06-28 03:03:39 +00:00
wSlotMachineWheel2Offset::
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wNameOfPlayerMonToBeTraded::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wFlyAnimBirdSpriteImageIndex::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wPlayerSpinInPlaceAnimFrameDelayEndValue::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wPlayerSpinWhileMovingUpOrDownAnimFrameDelay::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wHiddenObjectIndex::
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wTrainerFacingDirection::
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wHoFMonOrPlayer::
2015-07-15 02:46:52 +00:00
; show mon or show player?
; 0 = mon
; 1 = player
2020-06-28 03:03:39 +00:00
wSlotMachineWheel3Offset::
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wPlayerSpinInPlaceAnimSoundID::
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wHiddenObjectY::
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wTrainerScreenY::
2015-07-23 13:07:12 +00:00
2020-06-28 03:03:39 +00:00
wOptionsCancelCursorX::
ds 1
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wDayCarePerLevelCost::
; 2-byte BCD number (always set to $100)
2015-07-23 13:07:12 +00:00
2020-06-28 03:03:39 +00:00
wHoFTeamIndex2::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wHiddenItemOrCoinsIndex::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wTradedPlayerMonOT::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wHiddenObjectX::
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineWinningSymbol::
2015-07-13 20:35:35 +00:00
; the OAM tile number of the upper left corner of the winning symbol minus 2
2020-06-28 03:03:39 +00:00
wNumFieldMoves::
2015-07-14 22:48:34 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineWheel1BottomTile::
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wTrainerScreenX::
ds 1
2015-05-30 21:09:53 +00:00
; a lot of the uses for these values use more than the said address
2020-06-28 03:03:39 +00:00
wHoFTeamNo::
2015-07-15 02:46:52 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineWheel1MiddleTile::
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wFieldMovesLeftmostXCoord::
2015-07-23 13:07:12 +00:00
ds 1
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wLastFieldMoveID::
2015-07-14 22:48:34 +00:00
; unused
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineWheel1TopTile::
2015-07-14 22:48:34 +00:00
ds 1
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineWheel2BottomTile::
2015-07-13 20:35:35 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSlotMachineWheel2MiddleTile::
2015-07-13 20:35:35 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wTempCoins1::
2015-07-13 20:35:35 +00:00
; 2 bytes
; temporary variable used to add payout amount to the player's coins
2020-06-28 03:03:39 +00:00
wSlotMachineWheel2TopTile::
2015-07-13 20:35:35 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wBattleTransitionSpiralDirection::
; 0 = outward, 1 = inward
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineWheel3BottomTile::
ds 1
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineWheel3MiddleTile::
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wFacingDirectionList::
; 4 bytes (also, the byte before the start of the list (wSlotMachineWheel3BottomTile)
; is used a temp variable when the list is rotated)
; used when spinning the player's sprite
ds 1
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineWheel3TopTile::
2015-07-13 20:35:35 +00:00
wTempObtainedBadgesBooleans::
; 8 bytes
; temporary list created when displaying the badges on the trainer screen
; one byte for each badge; 0 = not obtained, 1 = obtained
ds 1
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wTempCoins2::
2015-07-13 20:35:35 +00:00
; 2 bytes
; temporary variable used to subtract the bet amount from the player's coins
2020-06-28 03:03:39 +00:00
wPayoutCoins::
2015-07-13 20:35:35 +00:00
; 2 bytes
ds 2
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wTradedPlayerMonOTID::
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineFlags::
2015-07-13 20:35:35 +00:00
; These flags are set randomly and control when the wheels stop.
; bit 6: allow the player to win in general
; bit 7: allow the player to win with 7 or bar (plus the effect of bit 6)
ds 1
2020-06-28 03:03:39 +00:00
wSlotMachineWheel1SlipCounter::
2015-07-13 20:35:35 +00:00
; wheel 1 can "slip" while this is non-zero
2020-06-28 03:03:39 +00:00
wCutTile::
2015-07-15 02:46:52 +00:00
; $3d = tree tile
; $52 = grass tile
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineWheel2SlipCounter::
2015-07-13 20:35:35 +00:00
; wheel 2 can "slip" while this is non-zero
2020-06-28 03:03:39 +00:00
wTradedEnemyMonOT::
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wSavedPlayerScreenY::
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineRerollCounter::
2015-07-13 20:35:35 +00:00
; The remaining number of times wheel 3 will roll down a symbol until a match is
; found, when winning is enabled. It's initialized to 4 each bet.
2020-06-28 03:03:39 +00:00
wEmotionBubbleSpriteIndex::
; the index of the sprite the emotion bubble is to be displayed above
ds 1
2020-06-28 03:03:39 +00:00
wWhichEmotionBubble::
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineBet::
2015-07-13 20:35:35 +00:00
; how many coins the player bet on the slot machine (1 to 3)
2020-06-28 03:03:39 +00:00
wSavedPlayerFacingDirection::
2020-06-28 03:03:39 +00:00
wWhichAnimationOffsets::
; 0 = cut animation, 1 = boulder dust animation
ds 9
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wTradedEnemyMonOTID::
2015-02-07 10:43:08 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wStandingOnWarpPadOrHole::
2015-07-25 03:27:59 +00:00
; 0 = neither
; 1 = warp pad
; 2 = hole
2020-06-28 03:03:39 +00:00
wOAMBaseTile::
2015-07-14 02:24:07 +00:00
2020-06-28 03:03:39 +00:00
wGymTrashCanIndex::
2015-07-25 03:27:59 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSymmetricSpriteOAMAttributes::
2015-07-25 03:27:59 +00:00
ds 1
2015-03-14 22:25:21 +00:00
2020-06-28 03:03:39 +00:00
wMonPartySpriteSpecies::
2015-03-14 22:25:21 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wLeftGBMonSpecies::
2015-03-14 22:25:21 +00:00
; in the trade animation, the mon that leaves the left gameboy
ds 1
2020-06-28 03:03:39 +00:00
wRightGBMonSpecies::
2015-03-14 22:25:21 +00:00
; in the trade animation, the mon that leaves the right gameboy
ds 1
2020-06-28 03:03:39 +00:00
wFlags_0xcd60::
; bit 0: is player engaged by trainer (to avoid being engaged by multiple trainers simultaneously)
; bit 1: boulder dust animation (from using Strength) pending
2015-07-16 03:04:58 +00:00
; bit 3: using generic PC
2015-02-07 10:43:08 +00:00
; bit 5: don't play sound when A or B is pressed in menu
; bit 6: tried pushing against boulder once (you need to push twice before it will move)
ds 1
ds 9
2020-06-28 03:03:39 +00:00
wActionResultOrTookBattleTurn::
2015-07-15 06:16:06 +00:00
; This has overlapping related uses.
; When the player tries to use an item or use certain field moves, 0 is stored
; when the attempt fails and 1 is stored when the attempt succeeds.
; In addition, some items store 2 for certain types of failures, but this
; cannot happen in battle.
; In battle, a non-zero value indicates the player has taken their turn using
; something other than a move (e.g. using an item or switching pokemon).
; So, when an item is successfully used in battle, this value becomes non-zero
; and the player is not allowed to make a move and the two uses are compatible.
ds 1
2020-06-28 03:03:39 +00:00
wJoyIgnore::
2014-05-25 17:51:53 +00:00
; Set buttons are ignored.
ds 1
2020-06-28 03:03:39 +00:00
wDownscaledMonSize::
2015-07-15 06:16:06 +00:00
; size of downscaled mon pic used in pokeball entering/exiting animation
; $00 = 5×5
; $01 = 3×3
2020-06-28 03:03:39 +00:00
wNumMovesMinusOne::
2015-07-15 06:16:06 +00:00
; FormatMovesString stores the number of moves minus one here
ds 1
2018-03-21 22:55:09 +00:00
UNION
2015-07-15 06:16:06 +00:00
wcd6d:: ds 4 ; buffer for various data
2020-06-28 03:03:39 +00:00
wStatusScreenCurrentPP::
2015-07-15 06:16:06 +00:00
; temp variable used to print a move's current PP on the status screen
ds 1
ds 6
2020-06-28 03:03:39 +00:00
wNormalMaxPPList::
2015-07-15 06:16:06 +00:00
; list of normal max PP (without PP up) values
ds 9
2018-03-21 22:55:09 +00:00
NEXTU
2018-03-23 03:09:49 +00:00
wEvosMoves:: ds MAX_EVOLUTIONS * EVOLUTION_SIZE + 1
2018-03-21 22:55:09 +00:00
.end::
ENDU
2020-06-28 03:03:39 +00:00
wSerialOtherGameboyRandomNumberListBlock::
2015-02-07 10:43:08 +00:00
; buffer for transferring the random number list generated by the other gameboy
2020-06-28 03:03:39 +00:00
wTileMapBackup2::
; second buffer for temporarily saving and restoring current screen's tiles (e.g. if menus are drawn on top)
ds 20 * 18
2020-06-28 03:03:39 +00:00
wNamingScreenNameLength::
2015-07-25 03:27:59 +00:00
2020-06-28 03:03:39 +00:00
wEvoOldSpecies::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wBuffer::
2014-05-23 22:34:35 +00:00
; Temporary storage area of 30 bytes.
2015-07-14 02:24:07 +00:00
2020-06-28 03:03:39 +00:00
wTownMapCoords::
2015-07-14 02:24:07 +00:00
; lower nybble is x, upper nybble is y
2020-06-28 03:03:39 +00:00
wLearningMovesFromDayCare::
2015-07-19 03:49:52 +00:00
; whether WriteMonMoves is being used to make a mon learn moves from day care
; non-zero if so
2020-06-28 03:03:39 +00:00
wChangeMonPicEnemyTurnSpecies::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wHPBarMaxHP::
2015-07-19 03:49:52 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wNamingScreenSubmitName::
2015-07-25 03:27:59 +00:00
; non-zero when the player has chosen to submit the name
2020-06-28 03:03:39 +00:00
wChangeMonPicPlayerTurnSpecies::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wEvoNewSpecies::
2015-07-19 03:49:52 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wAlphabetCase::
2015-07-25 03:27:59 +00:00
; 0 = upper case
; 1 = lower case
2020-06-28 03:03:39 +00:00
wEvoMonTileOffset::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wHPBarOldHP::
2015-07-19 03:49:52 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEvoCancelled::
2015-07-19 03:49:52 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wNamingScreenLetter::
2015-07-25 03:27:59 +00:00
2020-06-28 03:03:39 +00:00
wHPBarNewHP::
ds 2
2020-06-28 03:03:39 +00:00
wHPBarDelta::
ds 1
2020-06-28 03:03:39 +00:00
wHPBarTempHP::
2015-07-25 03:27:59 +00:00
ds 2
ds 11
2020-06-28 03:03:39 +00:00
wHPBarHPDifference::
ds 1
ds 7
2020-06-28 03:03:39 +00:00
wAIItem::
2015-07-15 06:16:06 +00:00
; the item that the AI used
ds 1
2020-06-28 03:03:39 +00:00
wUsedItemOnWhichPokemon::
2015-07-15 06:16:06 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wAnimSoundID::
; sound ID during battle animations
ds 1
2020-06-28 03:03:39 +00:00
wBankswitchHomeSavedROMBank::
2015-07-15 06:16:06 +00:00
; used as a storage value for the bank to return to after a BankswitchHome (bankswitch in homebank)
ds 1
2020-06-28 03:03:39 +00:00
wBankswitchHomeTemp::
2015-07-15 06:16:06 +00:00
; used as a temp storage value for the bank to switch to
ds 1
2015-07-13 06:00:48 +00:00
2020-06-28 03:03:39 +00:00
wBoughtOrSoldItemInMart::
2015-07-13 06:00:48 +00:00
; 0 = nothing bought or sold in pokemart
; 1 = bought or sold something in pokemart
; this value is not used for anything
ds 1
2020-06-28 03:03:39 +00:00
wBattleResult::
2014-08-09 05:39:13 +00:00
; $00 - win
; $01 - lose
; $02 - draw
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wAutoTextBoxDrawingControl::
2014-09-13 07:50:56 +00:00
; bit 0: if set, DisplayTextID automatically draws a text box
ds 1
2015-05-30 21:09:53 +00:00
wcf0d:: ds 1 ; used with some overworld scripts (not exactly sure what it's used for)
2015-07-15 06:16:06 +00:00
2020-06-28 03:03:39 +00:00
wTilePlayerStandingOn::
2015-07-15 06:16:06 +00:00
; used in CheckForTilePairCollisions2 to store the tile the player is on
ds 1
2020-06-28 03:03:39 +00:00
wNPCNumScriptedSteps:: ds 1
2020-06-28 03:03:39 +00:00
wNPCMovementScriptFunctionNum::
; which script function within the pointer table indicated by
; wNPCMovementScriptPointerTableNum
ds 1
2020-06-28 03:03:39 +00:00
wTextPredefFlag::
2015-07-15 06:16:06 +00:00
; bit 0: set when printing a text predef so that DisplayTextID doesn't switch
; to the current map's bank
ds 1
2020-06-28 03:03:39 +00:00
wPredefParentBank::
ds 1
2014-09-13 07:50:56 +00:00
wSpriteIndex:: ds 1
2020-06-28 03:03:39 +00:00
wCurSpriteMovement2::
; movement byte 2 of current sprite
ds 1
ds 2
2020-06-28 03:03:39 +00:00
wNPCMovementScriptSpriteOffset::
; sprite offset of sprite being controlled by NPC movement script
ds 1
2020-06-28 03:03:39 +00:00
wScriptedNPCWalkCounter::
2015-07-15 20:58:21 +00:00
ds 1
ds 1
2014-05-23 22:34:35 +00:00
2020-06-28 03:03:39 +00:00
wGBC::
2014-05-23 22:34:35 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wOnSGB::
2014-09-13 07:50:56 +00:00
; if running on SGB, it's 1, else it's 0
ds 1
2020-06-28 03:03:39 +00:00
wDefaultPaletteCommand::
2015-08-12 09:16:56 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerHPBarColor::
2015-08-12 09:16:56 +00:00
2020-06-28 03:03:39 +00:00
wWholeScreenPaletteMonSpecies::
2015-08-12 09:16:56 +00:00
; species of the mon whose palette is used for the whole screen
ds 1
2020-06-28 03:03:39 +00:00
wEnemyHPBarColor::
2015-08-12 09:16:56 +00:00
ds 1
; 0: green
; 1: yellow
; 2: red
2020-06-28 03:03:39 +00:00
wPartyMenuHPBarColors::
2015-08-12 09:16:56 +00:00
ds 6
2020-06-28 03:03:39 +00:00
wStatusScreenHPBarColor::
2015-08-12 09:16:56 +00:00
ds 1
ds 7
2020-06-28 03:03:39 +00:00
wCopyingSGBTileData::
2015-08-12 09:16:56 +00:00
2020-06-28 03:03:39 +00:00
wWhichPartyMenuHPBar::
2015-08-12 09:16:56 +00:00
2020-06-28 03:03:39 +00:00
wPalPacket::
2015-08-12 09:16:56 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPartyMenuBlkPacket::
2015-08-12 09:16:56 +00:00
; $30 bytes
ds 29
2020-06-28 03:03:39 +00:00
wExpAmountGained::
2015-08-13 05:14:31 +00:00
; 2-byte big-endian number
; the total amount of exp a mon gained
wcf4b:: ds 2 ; storage buffer for various strings
2020-06-28 03:03:39 +00:00
wGainBoostedExp::
ds 1
2015-08-13 05:14:31 +00:00
2015-03-31 18:28:42 +00:00
ds 17
2020-06-28 03:03:39 +00:00
wGymCityName::
2015-07-15 06:16:06 +00:00
ds 17
2020-06-28 03:03:39 +00:00
wGymLeaderName::
ds NAME_LENGTH
2015-07-15 06:16:06 +00:00
2020-06-28 03:03:39 +00:00
wItemList::
2015-07-15 06:16:06 +00:00
ds 16
2020-06-28 03:03:39 +00:00
wListPointer::
2015-02-08 02:37:40 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wUnusedCF8D::
2015-08-07 19:39:29 +00:00
; 2 bytes
; used to store pointers, but never read
ds 2
2015-02-08 02:37:40 +00:00
2020-06-28 03:03:39 +00:00
wItemPrices::
2015-02-08 02:37:40 +00:00
ds 2
2015-05-30 21:09:53 +00:00
wcf91:: ds 1 ; used with a lot of things (too much to list here)
2020-06-28 03:03:39 +00:00
wWhichPokemon::
; which pokemon you selected
ds 1
2020-06-28 03:03:39 +00:00
wPrintItemPrices::
2015-07-13 06:00:48 +00:00
; if non-zero, then print item prices when displaying lists
ds 1
2020-06-28 03:03:39 +00:00
wHPBarType::
2015-02-08 06:18:42 +00:00
; type of HP bar
; $00 = enemy HUD in battle
; $01 = player HUD in battle / status screen
; $02 = party menu
2020-06-28 03:03:39 +00:00
wListMenuID::
; ID used by DisplayListMenuID
ds 1
2020-06-28 03:03:39 +00:00
wRemoveMonFromBox::
; if non-zero, RemovePokemon will remove the mon from the current box,
; else it will remove the mon from the party
2020-06-28 03:03:39 +00:00
wMoveMonType::
; 0 = move from box to party
; 1 = move from party to box
; 2 = move from daycare to party
; 3 = move from party to daycare
ds 1
2015-07-13 06:00:48 +00:00
2020-06-28 03:03:39 +00:00
wItemQuantity::
2015-07-13 06:00:48 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMaxItemQuantity::
2015-07-13 06:00:48 +00:00
ds 1
2015-02-08 02:37:40 +00:00
; LoadMonData copies mon data here
2020-06-28 03:03:39 +00:00
wLoadedMon:: party_struct wLoadedMon
2015-02-08 02:37:40 +00:00
2020-06-28 03:03:39 +00:00
wFontLoaded::
2015-02-09 02:40:08 +00:00
; bit 0: The space in VRAM that is used to store walk animation tile patterns
; for the player and NPCs is in use for font tile patterns.
; This means that NPC movement must be disabled.
; The other bits are unused.
2015-02-08 02:37:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wWalkCounter::
2013-12-08 09:49:40 +00:00
; walk animation counter
ds 1
2020-06-28 03:03:39 +00:00
wTileInFrontOfPlayer::
2014-09-13 07:50:56 +00:00
; background tile number in front of the player (either 1 or 2 steps ahead)
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wAudioFadeOutControl::
2015-08-09 05:32:44 +00:00
; The desired fade counter reload value is stored here prior to calling
; PlaySound in order to cause the current music to fade out before the new
; music begins playing. Storing 0 causes no fade out to occur and the new music
; to begin immediately.
; This variable has another use related to fade-out, as well. PlaySound stores
; the sound ID of the music that should be played after the fade-out is finished
; in this variable. FadeOutAudio checks if it's non-zero every V-Blank and
; fades out the current audio if it is. Once it has finished fading out the
; audio, it zeroes this variable and starts playing the sound ID stored in it.
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wAudioFadeOutCounterReloadValue::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wAudioFadeOutCounter::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wLastMusicSoundID::
2015-08-09 05:32:44 +00:00
; This is used to determine whether the default music is already playing when
; attempting to play the default music (in order to avoid restarting the same
; music) and whether the music has already been stopped when attempting to
; fade out the current music (so that the new music can be begin immediately
; instead of waiting).
; It sometimes contains the sound ID of the last music played, but it may also
; contain $ff (if the music has been stopped) or 0 (because some routines zero
; it in order to prevent assumptions from being made about the current state of
; the music).
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wUpdateSpritesEnabled::
2015-07-15 11:27:59 +00:00
; $00 = causes sprites to be hidden and the value to change to $ff
; $01 = enabled
; $ff = disabled
; other values aren't used
2014-09-13 07:50:56 +00:00
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wEnemyMoveNum::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMoveEffect::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMovePower::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMoveType::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMoveAccuracy::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMoveMaxPP::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMoveNum::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMoveEffect::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMovePower::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMoveType::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMoveAccuracy::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerMoveMaxPP::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMonSpecies2::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wBattleMonSpecies2::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyMonNick:: ds NAME_LENGTH
2020-06-28 03:03:39 +00:00
wEnemyMon:: battle_struct wEnemyMon
2013-12-08 09:49:40 +00:00
2014-08-09 05:39:13 +00:00
wEnemyMonBaseStats:: ds 5
2018-03-24 18:41:54 +00:00
wEnemyMonActualCatchRate:: ds 1
2014-08-09 05:39:13 +00:00
wEnemyMonBaseExp:: ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wBattleMonNick:: ds NAME_LENGTH
wBattleMon:: battle_struct wBattleMon
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wTrainerClass::
2013-12-08 09:49:40 +00:00
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wTrainerPicPointer::
2015-04-09 11:05:57 +00:00
ds 2
ds 1
2015-08-14 07:36:06 +00:00
2020-06-28 03:03:39 +00:00
wTempMoveNameBuffer::
2015-08-14 07:36:06 +00:00
2020-06-28 03:03:39 +00:00
wLearnMoveMonName::
2015-08-14 07:36:06 +00:00
; The name of the mon that is learning a move.
ds 16
2015-07-25 03:27:59 +00:00
2020-06-28 03:03:39 +00:00
wTrainerBaseMoney::
2015-07-25 03:27:59 +00:00
; 2-byte BCD number
; money received after battle = base money × level of highest-level enemy mon
ds 2
2020-06-28 03:03:39 +00:00
wMissableObjectCounter::
2015-07-25 03:27:59 +00:00
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wTrainerName::
; 13 bytes for the letters of the opposing trainer
; the name is terminated with $50 with possible
; unused trailing letters
ds 13
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wIsInBattle::
2015-07-25 03:27:59 +00:00
; lost battle, this is -1
2013-12-08 09:49:40 +00:00
; no battle, this is 0
; wild battle, this is 1
; trainer battle, this is 2
ds 1
2020-06-28 03:03:39 +00:00
wPartyGainExpFlags::
2014-08-09 05:39:13 +00:00
; flags that indicate which party members should be be given exp when GainExperience is called
flag_array 6
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wCurOpponent::
2013-12-08 09:49:40 +00:00
; in a wild battle, this is the species of pokemon
; in a trainer battle, this is the trainer class + OPP_ID_OFFSET
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wBattleType::
2013-12-08 09:49:40 +00:00
; in normal battle, this is 0
; in old man battle, this is 1
; in safari battle, this is 2
ds 1
2020-06-28 03:03:39 +00:00
wDamageMultipliers::
2015-03-31 18:28:42 +00:00
; bits 0-6: Effectiveness
; $0 = immune
; $5 = not very effective
; $a = neutral
; $14 = super-effective
; bit 7: STAB
2015-05-30 21:09:53 +00:00
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wLoneAttackNo::
2013-12-08 09:49:40 +00:00
; which entry in LoneAttacks to use
2020-06-28 03:03:39 +00:00
wGymLeaderNo::
2013-12-08 09:49:40 +00:00
; it's actually the same thing as ^
ds 1
2020-06-28 03:03:39 +00:00
wTrainerNo::
2013-12-08 09:49:40 +00:00
; which instance of [youngster, lass, etc] is this?
ds 1
2020-06-28 03:03:39 +00:00
wCriticalHitOrOHKO::
2014-08-09 05:39:13 +00:00
; $00 = normal attack
; $01 = critical hit
; $02 = successful OHKO
; $ff = failed OHKO
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wMoveMissed::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerStatsToDouble::
2015-02-08 09:44:41 +00:00
; always 0
ds 1
2020-06-28 03:03:39 +00:00
wPlayerStatsToHalve::
2015-02-08 09:44:41 +00:00
; always 0
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wPlayerBattleStatus1::
; bit 0 - bide
; bit 1 - thrash / petal dance
; bit 2 - attacking multiple times (e.g. double kick)
; bit 3 - flinch
; bit 4 - charging up for attack
; bit 5 - using multi-turn move (e.g. wrap)
; bit 6 - invulnerable to normal attack (using fly/dig)
; bit 7 - confusion
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerBattleStatus2::
; bit 0 - X Accuracy effect
; bit 1 - protected by "mist"
; bit 2 - focus energy effect
; bit 4 - has a substitute
; bit 5 - need to recharge
; bit 6 - rage
; bit 7 - leech seeded
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerBattleStatus3::
; bit 0 - toxic
; bit 1 - light screen
; bit 2 - reflect
2017-06-24 20:01:43 +00:00
; bit 3 - transformed
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyStatsToDouble::
2015-02-08 09:44:41 +00:00
; always 0
ds 1
2020-06-28 03:03:39 +00:00
wEnemyStatsToHalve::
2015-02-08 09:44:41 +00:00
; always 0
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wEnemyBattleStatus1::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyBattleStatus2::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyBattleStatus3::
2013-12-08 09:49:40 +00:00
ds 1
2014-08-09 05:39:13 +00:00
wPlayerNumAttacksLeft::
; when the player is attacking multiple times, the number of attacks left
ds 1
2020-06-28 03:03:39 +00:00
wPlayerConfusedCounter::
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wPlayerToxicCounter::
2013-12-08 09:49:40 +00:00
ds 1
2015-08-31 02:38:41 +00:00
2020-06-28 03:03:39 +00:00
wPlayerDisabledMove::
; high nibble: which move is disabled (1-4)
; low nibble: disable turns left
2013-12-08 09:49:40 +00:00
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wEnemyNumAttacksLeft::
; when the enemy is attacking multiple times, the number of attacks left
2014-08-09 05:39:13 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEnemyConfusedCounter::
ds 1
2020-06-28 03:03:39 +00:00
wEnemyToxicCounter::
2013-12-08 09:49:40 +00:00
ds 1
2015-08-31 02:38:41 +00:00
2020-06-28 03:03:39 +00:00
wEnemyDisabledMove::
; high nibble: which move is disabled (1-4)
; low nibble: disable turns left
2013-12-08 09:49:40 +00:00
ds 1
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerNumHits::
2015-02-07 10:43:08 +00:00
; number of hits by player in attacks like Double Slap, etc.
2020-06-28 03:03:39 +00:00
wPlayerBideAccumulatedDamage::
2015-02-07 10:43:08 +00:00
; the amount of damage accumulated by the player while biding (2 bytes)
2020-06-28 03:03:39 +00:00
wUnknownSerialCounter2::
2015-02-07 10:43:08 +00:00
; 2 bytes
2015-04-09 11:05:57 +00:00
ds 4
2014-08-09 05:39:13 +00:00
wEscapedFromBattle::
; non-zero when an item or move that allows escape from battle was used
ds 1
2020-06-28 03:03:39 +00:00
wAmountMoneyWon::
2015-07-25 03:27:59 +00:00
; 3-byte BCD number
2020-06-28 03:03:39 +00:00
wObjectToHide::
2015-07-25 03:27:59 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wObjectToShow::
2015-07-25 03:27:59 +00:00
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wDefaultMap::
2015-08-30 00:15:05 +00:00
; the map you will start at when the debug bit is set
2020-06-28 03:03:39 +00:00
wMenuItemOffset::
2015-08-30 00:15:05 +00:00
2020-06-28 03:03:39 +00:00
wAnimationID::
2013-12-08 09:49:40 +00:00
; ID number of the current battle animation
ds 1
2020-06-28 03:03:39 +00:00
wNamingScreenType::
2020-06-28 03:03:39 +00:00
wPartyMenuTypeOrMessageID::
2020-06-28 03:03:39 +00:00
wTempTilesetNumTiles::
; temporary storage for the number of tiles in a tileset
ds 1
2015-07-13 06:00:48 +00:00
2020-06-28 03:03:39 +00:00
wSavedListScrollOffset::
2015-07-13 06:00:48 +00:00
; used by the pokemart code to save the existing value of wListScrollOffset
; so that it can be restored when the player is done with the pokemart NPC
ds 1
ds 2
; base coordinates of frame block
2020-06-28 03:03:39 +00:00
wBaseCoordX::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wBaseCoordY::
2013-12-08 09:49:40 +00:00
ds 1
; low health alarm counter/enable
; high bit = enable, others = timer to cycle frequencies
2020-06-28 03:03:39 +00:00
wLowHealthAlarm:: ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wFBTileCounter::
2013-12-08 09:49:40 +00:00
; counts how many tiles of the current frame block have been drawn
ds 1
2020-06-28 03:03:39 +00:00
wMovingBGTilesCounter2::
2015-07-25 03:27:59 +00:00
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wSubAnimFrameDelay::
2013-12-08 09:49:40 +00:00
; duration of each frame of the current subanimation in terms of screen refreshes
ds 1
2020-06-28 03:03:39 +00:00
wSubAnimCounter::
2013-12-08 09:49:40 +00:00
; counts the number of subentries left in the current subanimation
ds 1
2020-06-28 03:03:39 +00:00
wSaveFileStatus::
2015-07-19 03:49:52 +00:00
; 1 = no save file or save file is corrupted
; 2 = save file exists and no corruption has been detected
ds 1
2020-06-28 03:03:39 +00:00
wNumFBTiles::
2013-12-08 09:49:40 +00:00
; number of tiles in current battle animation frame block
ds 1
2020-06-28 03:03:39 +00:00
wFlashScreenLongCounter::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wSpiralBallsBaseY::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wFallingObjectMovementByte::
2015-07-24 21:39:45 +00:00
; bits 0-6: index into FallingObjects_DeltaXs array (0 - 8)
; bit 7: direction; 0 = right, 1 = left
2020-06-28 03:03:39 +00:00
wNumShootingBalls::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wTradedMonMovingRight::
2015-03-14 22:25:21 +00:00
; $01 if mon is moving from left gameboy to right gameboy; $00 if vice versa
2020-06-28 03:03:39 +00:00
wOptionsInitialized::
2015-07-19 03:49:52 +00:00
2020-06-28 03:03:39 +00:00
wNewSlotMachineBallTile::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wCoordAdjustmentAmount::
2015-07-24 21:39:45 +00:00
; how much to add to the X/Y coord
2020-06-28 03:03:39 +00:00
wUnusedD08A::
2015-07-24 21:39:45 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSpiralBallsBaseX::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wNumFallingObjects::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wSlideMonDelay::
2020-06-28 03:03:39 +00:00
wAnimCounter::
2015-07-13 20:35:35 +00:00
; generic counter variable for various animations
2015-03-13 12:33:16 +00:00
2020-06-28 03:03:39 +00:00
wSubAnimTransform::
2013-12-08 09:49:40 +00:00
; controls what transformations are applied to the subanimation
; 01: flip horizontally and vertically
; 02: flip horizontally and translate downwards 40 pixels
; 03: translate base coordinates of frame blocks, but don't change their internal coordinates or flip their tiles
; 04: reverse the subanimation
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEndBattleWinTextPointer::
2014-09-14 18:29:18 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wEndBattleLoseTextPointer::
2014-09-14 18:29:18 +00:00
ds 2
2013-12-08 09:49:40 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wEndBattleTextRomBank::
2013-12-08 09:49:40 +00:00
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wSubAnimAddrPtr::
2013-12-08 09:49:40 +00:00
; the address _of the address_ of the current subanimation entry
ds 2
2015-07-13 20:35:35 +00:00
2020-06-28 03:03:39 +00:00
wSlotMachineAllowMatchesCounter::
2015-07-13 20:35:35 +00:00
; 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
; the only way it can increase. Winning certain payout amounts will decrement it
; or zero it.
2020-06-28 03:03:39 +00:00
wSubAnimSubEntryAddr::
2013-12-08 09:49:40 +00:00
; the address of the current subentry of the current subanimation
ds 2
ds 2
2020-06-28 03:03:39 +00:00
wOutwardSpiralTileMapPointer::
2015-07-24 21:39:45 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPartyMenuAnimMonEnabled::
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wTownMapSpriteBlinkingEnabled::
2014-09-14 18:29:18 +00:00
; non-zero when enabled. causes nest locations to blink on and off.
; the town selection cursor will blink regardless of what this value is
2020-06-28 03:03:39 +00:00
wUnusedD09B::
2015-07-24 21:39:45 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wFBDestAddr::
2013-12-08 09:49:40 +00:00
; current destination address in OAM for frame blocks (big endian)
ds 2
2020-06-28 03:03:39 +00:00
wFBMode::
2013-12-08 09:49:40 +00:00
; controls how the frame blocks are put together to form frames
; specifically, after finishing drawing the frame block, the frame block's mode determines what happens
; 00: clean OAM buffer and delay
; 02: move onto the next frame block with no delay and no cleaning OAM buffer
; 03: delay, but don't clean OAM buffer
2015-08-31 02:38:41 +00:00
; 04: delay, without cleaning OAM buffer, and do not advance [wFBDestAddr], so that the next frame block will overwrite this one
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wLinkCableAnimBulgeToggle::
2015-07-24 21:39:45 +00:00
; 0 = small
; 1 = big
2020-06-28 03:03:39 +00:00
wIntroNidorinoBaseTile::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wOutwardSpiralCurrentDirection::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wDropletTile::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wNewTileBlockID::
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wWhichBattleAnimTileset::
2015-07-24 21:39:45 +00:00
2020-06-28 03:03:39 +00:00
wSquishMonCurrentDirection::
2015-07-24 21:39:45 +00:00
; 0 = left
; 1 = right
2020-06-28 03:03:39 +00:00
wSlideMonUpBottomRowLeftTile::
2015-07-24 21:39:45 +00:00
; the tile ID of the leftmost tile in the bottom row in AnimationSlideMonUp_
ds 1
2015-07-12 23:24:03 +00:00
wDisableVBlankWYUpdate:: ds 1 ; if non-zero, don't update WY during V-blank
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wSpriteCurPosX::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSpriteCurPosY::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSpriteWidth::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSpriteHeight::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSpriteInputCurByte::
2013-12-08 09:49:40 +00:00
; current input byte
ds 1
2020-06-28 03:03:39 +00:00
wSpriteInputBitCounter::
2013-12-08 09:49:40 +00:00
; bit offset of last read input bit
ds 1
2020-06-28 03:03:39 +00:00
wSpriteOutputBitOffset:: ; determines where in the output byte the two bits are placed. Each byte contains four columns (2bpp data)
; 3 -> XX000000 1st column
; 2 -> 00XX0000 2nd column
; 1 -> 0000XX00 3rd column
; 0 -> 000000XX 4th column
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSpriteLoadFlags::
; bit 0 determines used buffer (0 -> sSpriteBuffer1, 1 -> sSpriteBuffer2)
; bit 1 loading last sprite chunk? (there are at most 2 chunks per load operation)
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSpriteUnpackMode::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSpriteFlipped::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSpriteInputPtr::
2013-12-08 09:49:40 +00:00
; pointer to next input byte
ds 2
2020-06-28 03:03:39 +00:00
wSpriteOutputPtr::
2013-12-08 09:49:40 +00:00
; pointer to current output byte
ds 2
2020-06-28 03:03:39 +00:00
wSpriteOutputPtrCached::
2013-12-08 09:49:40 +00:00
; used to revert pointer for different bit offsets
ds 2
2020-06-28 03:03:39 +00:00
wSpriteDecodeTable0Ptr::
2013-12-08 09:49:40 +00:00
; pointer to differential decoding table (assuming initial value 0)
ds 2
2020-06-28 03:03:39 +00:00
wSpriteDecodeTable1Ptr::
2013-12-08 09:49:40 +00:00
; pointer to differential decoding table (assuming initial value 1)
ds 2
2015-05-30 21:09:53 +00:00
wd0b5:: ds 1 ; used as a temp storage area for Pokemon Species, and other Pokemon/Battle related things
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wNameListType::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPredefBank::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHeader::
2015-08-07 19:39:29 +00:00
2020-06-28 03:03:39 +00:00
wMonHIndex::
2017-06-24 20:01:43 +00:00
; In the ROM base stats data structure, this is the dex number, but it is
2015-08-07 19:39:29 +00:00
; overwritten with the internal index number after the header is copied to WRAM.
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHBaseStats::
wMonHBaseHP::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHBaseAttack::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHBaseDefense::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHBaseSpeed::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHBaseSpecial::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHTypes::
wMonHType1::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHType2::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHCatchRate::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHBaseEXP::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHSpriteDim::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHFrontSprite::
2013-12-08 09:49:40 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wMonHBackSprite::
2013-12-08 09:49:40 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wMonHMoves::
2015-08-31 02:38:41 +00:00
ds NUM_MOVES
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wMonHGrowthRate::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMonHLearnset::
2013-12-08 09:49:40 +00:00
; bit field
flag_array 50 + 5
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wSavedTilesetType::
2015-07-20 00:52:26 +00:00
; saved at the start of a battle and then written back at the end of the battle
ds 1
ds 2
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wDamage::
2015-02-07 21:40:14 +00:00
ds 2
2013-12-08 09:49:40 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wRepelRemainingSteps::
ds 1
2015-02-08 08:17:03 +00:00
2020-06-28 03:03:39 +00:00
wMoves::
2015-02-08 08:17:03 +00:00
; list of moves for FormatMovesString
ds 4
2020-06-28 03:03:39 +00:00
wMoveNum::
2015-02-08 08:17:03 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMovesString::
2015-02-08 08:17:03 +00:00
ds 56
2020-06-28 03:03:39 +00:00
wUnusedD119::
2015-07-25 03:27:59 +00:00
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wWalkBikeSurfStateCopy::
2014-09-13 07:50:56 +00:00
; wWalkBikeSurfState is sometimes copied here, but it doesn't seem to be used for anything
ds 1
2020-06-28 03:03:39 +00:00
wInitListType::
2015-07-13 06:00:48 +00:00
; the type of list for InitList to init
ds 1
2020-06-28 03:03:39 +00:00
wCapturedMonSpecies::
2015-07-25 03:27:59 +00:00
; 0 if no mon was captured
ds 1
2020-06-28 03:03:39 +00:00
wFirstMonsNotOutYet::
2015-07-25 03:27:59 +00:00
; Non-zero when the first player mon and enemy mon haven't been sent out yet.
; It prevents the game from asking if the player wants to choose another mon
; when the enemy sends out their first mon and suppresses the "no will to fight"
; message when the game searches for the first non-fainted mon in the party,
; which will be the first mon sent out.
ds 1
2020-06-28 03:03:39 +00:00
wPokeBallCaptureCalcTemp::
2015-08-30 06:21:54 +00:00
2015-08-07 12:20:37 +00:00
; lower nybble: number of shakes
; upper nybble: number of animations to play
2020-06-28 03:03:39 +00:00
wPokeBallAnimData::
2015-08-07 12:20:37 +00:00
2020-06-28 03:03:39 +00:00
wUsingPPUp::
2015-08-07 12:20:37 +00:00
2020-06-28 03:03:39 +00:00
wMaxPP::
2015-08-07 12:20:37 +00:00
; 0 for player, non-zero for enemy
2020-06-28 03:03:39 +00:00
wCalculateWhoseStats::
2015-08-07 12:20:37 +00:00
2020-06-28 03:03:39 +00:00
wTypeEffectiveness::
2015-08-07 12:20:37 +00:00
2020-06-28 03:03:39 +00:00
wMoveType::
2015-08-07 12:20:37 +00:00
2020-06-28 03:03:39 +00:00
wNumSetBits::
2015-08-07 11:24:06 +00:00
2015-05-30 21:09:53 +00:00
wd11e:: ds 1 ; used as a Pokemon and Item storage value. Also used as an output value for CountSetBits
2015-07-25 03:27:59 +00:00
2020-06-28 03:03:39 +00:00
wForcePlayerToChooseMon::
2015-07-25 03:27:59 +00:00
; When this value is non-zero, the player isn't allowed to exit the party menu
; by pressing B and not choosing a mon.
ds 1
2014-08-09 05:39:13 +00:00
wNumRunAttempts::
; number of times the player has tried to run from battle
ds 1
2020-06-28 03:03:39 +00:00
wEvolutionOccurred::
2015-07-25 03:27:59 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wVBlankSavedROMBank::
2015-07-25 03:27:59 +00:00
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wIsKeyItem::
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wTextBoxID::
2015-02-07 10:43:08 +00:00
ds 1
2016-01-03 19:17:10 +00:00
wCurrentMapScriptFlags:: ds 1 ; not exactly sure what this is used for, but it seems to be used as a multipurpose temp flag value
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wCurEnemyLVL::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wItemListPointer::
2015-07-13 06:00:48 +00:00
; pointer to list of items terminated by $FF
ds 2
2015-07-13 07:32:03 +00:00
wListCount::
; number of entries in a list
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wLinkState::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wTwoOptionMenuID::
2015-07-13 06:00:48 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wChosenMenuItem::
2015-07-13 06:00:48 +00:00
; the id of the menu item the player ultimately chose
2020-06-28 03:03:39 +00:00
wOutOfBattleBlackout::
2015-07-13 06:00:48 +00:00
; non-zero when the whole party has fainted due to out-of-battle poison damage
ds 1
2020-06-28 03:03:39 +00:00
wMenuExitMethod::
2015-07-13 06:00:48 +00:00
; the way the user exited a menu
; for list menus and the buy/sell/quit menu:
; $01 = the user pressed A to choose a menu item
; $02 = the user pressed B to cancel
; for two-option menus:
; $01 = the user pressed A with the first menu item selected
; $02 = the user pressed B or pressed A with the second menu item selected
ds 1
2020-06-28 03:03:39 +00:00
wDungeonWarpDataEntrySize::
2015-07-26 02:26:54 +00:00
; the size is always 6, so they didn't need a variable in RAM for this
2020-06-28 03:03:39 +00:00
wWhichPewterGuy::
2015-07-26 02:26:54 +00:00
; 0 = museum guy
; 1 = gym guy
2020-06-28 03:03:39 +00:00
wWhichPrizeWindow::
2015-07-26 02:26:54 +00:00
; there are 3 windows, from 0 to 2
2020-06-28 03:03:39 +00:00
wGymGateTileBlock::
2015-07-26 02:26:54 +00:00
; a horizontal or vertical gate block
ds 1
2020-06-28 03:03:39 +00:00
wSavedSpriteScreenY::
2015-07-26 02:26:54 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSavedSpriteScreenX::
2015-07-26 02:26:54 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSavedSpriteMapY::
2015-07-26 02:26:54 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSavedSpriteMapX::
2015-07-26 02:26:54 +00:00
ds 1
ds 5
2020-06-28 03:03:39 +00:00
wWhichPrize::
2015-07-26 02:26:54 +00:00
ds 1
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wIgnoreInputCounter::
2014-09-14 18:29:18 +00:00
; counts downward each frame
; when it hits 0, bit 5 (ignore input bit) of wd730 is reset
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wStepCounter::
2014-09-13 07:50:56 +00:00
; counts down once every step
ds 1
2020-06-28 03:03:39 +00:00
wNumberOfNoRandomBattleStepsLeft::
2014-09-13 07:50:56 +00:00
; after a battle, you have at least 3 steps before a random battle can occur
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wPrize1::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPrize2::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPrize3::
2013-12-08 09:49:40 +00:00
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wSerialRandomNumberListBlock::
2015-02-07 10:43:08 +00:00
; the first 7 bytes are the preamble
2020-06-28 03:03:39 +00:00
wPrize1Price::
2015-07-26 02:26:54 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wPrize2Price::
2015-07-26 02:26:54 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wPrize3Price::
2015-07-26 02:26:54 +00:00
ds 2
ds 1
2015-02-07 10:43:08 +00:00
2020-06-28 03:03:39 +00:00
wLinkBattleRandomNumberList::
2015-02-07 10:43:08 +00:00
; shared list of 9 random numbers, indexed by wLinkBattleRandomNumberListIndex
ds 10
2020-06-28 03:03:39 +00:00
wSerialPlayerDataBlock::
2015-02-07 10:43:08 +00:00
; the first 6 bytes are the preamble
2020-06-28 03:03:39 +00:00
wPseudoItemID::
2015-07-26 02:26:54 +00:00
; When a real item is being used, this is 0.
; When a move is acting as an item, this is the ID of the item it's acting as.
; For example, out-of-battle Dig is executed using a fake Escape Rope item. In
; that case, this would be ESCAPE_ROPE.
ds 1
2020-06-28 03:03:39 +00:00
wUnusedD153::
2015-07-26 02:26:54 +00:00
ds 1
ds 2
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wEvoStoneItemID::
2015-07-26 02:26:54 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSavedNPCMovementDirections2Index::
2015-07-26 02:26:54 +00:00
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wPlayerName::
ds NAME_LENGTH
2013-12-08 09:49:40 +00:00
wPartyDataStart::
2020-06-28 03:03:39 +00:00
wPartyCount:: ds 1
wPartySpecies:: ds PARTY_LENGTH
wPartyEnd:: ds 1
2013-12-08 09:49:40 +00:00
wPartyMons::
2020-06-28 03:03:39 +00:00
wPartyMon1:: party_struct wPartyMon1
wPartyMon2:: party_struct wPartyMon2
wPartyMon3:: party_struct wPartyMon3
wPartyMon4:: party_struct wPartyMon4
wPartyMon5:: party_struct wPartyMon5
wPartyMon6:: party_struct wPartyMon6
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH
wPartyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH
wPartyMonNicksEnd::
wPartyDataEnd::
wMainDataStart::
2020-06-28 03:03:39 +00:00
wPokedexOwned::
flag_array NUM_POKEMON
wPokedexOwnedEnd::
2020-06-28 03:03:39 +00:00
wPokedexSeen::
flag_array NUM_POKEMON
wPokedexSeenEnd::
2020-06-28 03:03:39 +00:00
wNumBagItems::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wBagItems::
2013-12-08 09:49:40 +00:00
; item, quantity
2015-08-30 00:27:57 +00:00
ds BAG_ITEM_CAPACITY * 2
2013-12-08 09:49:40 +00:00
ds 1 ; end
2020-06-28 03:03:39 +00:00
wPlayerMoney::
ds 3 ; BCD
2020-06-28 03:03:39 +00:00
wRivalName::
ds NAME_LENGTH
2020-06-28 03:03:39 +00:00
wOptions::
; bit 7 = battle animation
; 0: On
; 1: Off
; bit 6 = battle style
; 0: Shift
; 1: Set
; bits 0-3 = text speed (number of frames to delay after printing a letter)
; 1: Fast
; 3: Medium
; 5: Slow
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wObtainedBadges::
2016-01-03 19:17:10 +00:00
flag_array 8
ds 1
2020-06-28 03:03:39 +00:00
wLetterPrintingDelayFlags::
2015-07-15 02:46:52 +00:00
; bit 0: If 0, limit the delay to 1 frame. Note that this has no effect if
; the delay has been disabled entirely through bit 1 of this variable
; or bit 6 of wd730.
; bit 1: If 0, no delay.
ds 1
2020-06-28 03:03:39 +00:00
wPlayerID::
2013-12-08 09:49:40 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wMapMusicSoundID::
2015-08-09 05:32:44 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMapMusicROMBank::
2015-08-09 05:32:44 +00:00
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wMapPalOffset::
2014-09-13 07:50:56 +00:00
; offset subtracted from FadePal4 to get the background and object palettes for the current map
; normally, it is 0. it is 6 when Flash is needed, causing FadePal2 to be used instead of FadePal4
ds 1
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wCurMap::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wCurrentTileBlockMapViewPointer::
2014-09-13 07:50:56 +00:00
; pointer to the upper left corner of the current view in the tile block map
ds 2
2020-06-28 03:03:39 +00:00
wYCoord::
2013-12-08 19:25:19 +00:00
; players position on the current map
ds 1
2020-06-28 03:03:39 +00:00
wXCoord::
2013-12-08 19:25:19 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wYBlockCoord::
2013-12-08 19:25:19 +00:00
; player's y position (by block)
ds 1
2020-06-28 03:03:39 +00:00
wXBlockCoord::
ds 1
2020-06-28 03:03:39 +00:00
wLastMap::
ds 1
2020-06-28 03:03:39 +00:00
wUnusedD366::
2015-07-26 02:26:54 +00:00
ds 1
2013-12-08 19:25:19 +00:00
2020-06-28 03:03:39 +00:00
wCurMapTileset::
2013-12-08 19:25:19 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wCurMapHeight::
2013-12-08 19:25:19 +00:00
; blocks
ds 1
2020-06-28 03:03:39 +00:00
wCurMapWidth::
2013-12-08 19:25:19 +00:00
; blocks
ds 1
2020-06-28 03:03:39 +00:00
wMapDataPtr::
2013-12-08 19:25:19 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wMapTextPtr::
2013-12-08 19:25:19 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wMapScriptPtr::
2013-12-08 19:25:19 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wMapConnections::
2013-12-08 19:25:19 +00:00
; connection byte
ds 1
2020-06-28 03:03:39 +00:00
wMapConn1Ptr::
ds 1
2020-06-28 03:03:39 +00:00
wNorthConnectionStripSrc::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wNorthConnectionStripDest::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wNorthConnectionStripWidth::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wNorthConnectedMapWidth::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wNorthConnectedMapYAlignment::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wNorthConnectedMapXAlignment::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wNorthConnectedMapViewPointer::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wMapConn2Ptr::
ds 1
2020-06-28 03:03:39 +00:00
wSouthConnectionStripSrc::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wSouthConnectionStripDest::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wSouthConnectionStripWidth::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSouthConnectedMapWidth::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSouthConnectedMapYAlignment::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSouthConnectedMapXAlignment::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSouthConnectedMapViewPointer::
2015-07-18 15:17:29 +00:00
ds 2
2013-12-08 19:25:19 +00:00
2020-06-28 03:03:39 +00:00
wMapConn3Ptr::
ds 1
2020-06-28 03:03:39 +00:00
wWestConnectionStripSrc::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wWestConnectionStripDest::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wWestConnectionStripHeight::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wWestConnectedMapWidth::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wWestConnectedMapYAlignment::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wWestConnectedMapXAlignment::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wWestConnectedMapViewPointer::
2015-07-18 15:17:29 +00:00
ds 2
2013-12-08 19:25:19 +00:00
2020-06-28 03:03:39 +00:00
wMapConn4Ptr::
ds 1
2020-06-28 03:03:39 +00:00
wEastConnectionStripSrc::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wEastConnectionStripDest::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wEastConnectionStripHeight::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEastConnectedMapWidth::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEastConnectedMapYAlignment::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEastConnectedMapXAlignment::
2015-07-18 15:17:29 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wEastConnectedMapViewPointer::
2015-07-18 15:17:29 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wSpriteSet::
2013-12-08 19:25:19 +00:00
; sprite set for the current map (11 sprite picture ID's)
ds 11
2020-06-28 03:03:39 +00:00
wSpriteSetID::
2013-12-08 19:25:19 +00:00
; sprite set ID for the current map
ds 1
2020-06-28 03:03:39 +00:00
wObjectDataPointerTemp::
2015-07-20 00:52:26 +00:00
ds 2
ds 2
2020-06-28 03:03:39 +00:00
wMapBackgroundTile::
2015-07-20 00:52:26 +00:00
; the tile shown outside the boundaries of the map
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wNumberOfWarps::
2014-09-13 07:50:56 +00:00
; number of warps in current map
ds 1
2020-06-28 03:03:39 +00:00
wWarpEntries::
2014-09-13 07:50:56 +00:00
; current map warp entries
ds 128
2020-06-28 03:03:39 +00:00
wDestinationWarpID::
2014-09-13 07:50:56 +00:00
; if $ff, the player's coordinates are not updated when entering the map
ds 1
ds 128
2020-06-28 03:03:39 +00:00
wNumSigns::
2015-07-20 00:52:26 +00:00
; number of signs in the current map (up to 16)
ds 1
2020-06-28 03:03:39 +00:00
wSignCoords::
2015-07-20 00:52:26 +00:00
; 2 bytes each
; Y, X
ds 32
2020-06-28 03:03:39 +00:00
wSignTextIDs::
2015-07-20 00:52:26 +00:00
ds 16
2020-06-28 03:03:39 +00:00
wNumSprites::
2013-12-08 19:25:19 +00:00
; number of sprites on the current map
ds 1
2014-09-13 07:50:56 +00:00
; these two variables track the X and Y offset in blocks from the last special warp used
; they don't seem to be used for anything
2020-06-28 03:03:39 +00:00
wYOffsetSinceLastSpecialWarp::
2014-09-13 07:50:56 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wXOffsetSinceLastSpecialWarp::
2014-09-13 07:50:56 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wMapSpriteData::
2014-09-13 07:50:56 +00:00
; two bytes per sprite (movement byte 2, text ID)
2013-12-08 19:25:19 +00:00
ds 32
2020-06-28 03:03:39 +00:00
wMapSpriteExtraData::
2014-09-13 07:50:56 +00:00
; two bytes per sprite (trainer class/item ID, trainer set ID)
ds 32
2020-06-28 03:03:39 +00:00
wCurrentMapHeight2::
2015-07-20 00:52:26 +00:00
; map height in 2x2 meta-tiles
ds 1
2020-06-28 03:03:39 +00:00
wCurrentMapWidth2::
2015-07-20 00:52:26 +00:00
; map width in 2x2 meta-tiles
ds 1
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wMapViewVRAMPointer::
2014-09-14 18:29:18 +00:00
; the address of the upper left corner of the visible portion of the BG tile map in VRAM
ds 2
2015-07-20 00:52:26 +00:00
; In the comments for the player direction variables below, "moving" refers to
; both walking and changing facing direction without taking a step.
2020-06-28 03:03:39 +00:00
wPlayerMovingDirection::
2015-07-20 00:52:26 +00:00
; if the player is moving, the current direction
; if the player is not moving, zero
; map scripts write to this in order to change the player's facing direction
ds 1
2020-06-28 03:03:39 +00:00
wPlayerLastStopDirection::
2015-07-20 00:52:26 +00:00
; the direction in which the player was moving before the player last stopped
ds 1
2020-06-28 03:03:39 +00:00
wPlayerDirection::
2015-07-20 00:52:26 +00:00
; if the player is moving, the current direction
; if the player is not moving, the last the direction in which the player moved
ds 1
2013-12-08 19:25:19 +00:00
2020-06-28 03:03:39 +00:00
wTilesetBank::
2013-12-08 19:25:19 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wTilesetBlocksPtr::
2013-12-08 19:25:19 +00:00
; maps blocks (4x4 tiles) to tiles
ds 2
2020-06-28 03:03:39 +00:00
wTilesetGfxPtr::
2013-12-08 19:25:19 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wTilesetCollisionPtr::
2013-12-08 19:25:19 +00:00
; list of all walkable tiles
ds 2
2020-06-28 03:03:39 +00:00
wTilesetTalkingOverTiles::
2013-12-08 19:25:19 +00:00
ds 3
2020-06-28 03:03:39 +00:00
wGrassTile::
2013-12-08 19:25:19 +00:00
ds 1
ds 4
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wNumBoxItems::
2013-12-08 09:49:40 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wBoxItems::
2013-12-08 09:49:40 +00:00
; item, quantity
2015-08-30 00:27:57 +00:00
ds PC_ITEM_CAPACITY * 2
2013-12-08 09:49:40 +00:00
ds 1 ; end
2020-06-28 03:03:39 +00:00
wCurrentBoxNum::
2015-07-19 03:49:52 +00:00
; bits 0-6: box number
; bit 7: whether the player has changed boxes before
2015-07-16 03:04:58 +00:00
ds 2
2015-07-15 02:46:52 +00:00
2020-06-28 03:03:39 +00:00
wNumHoFTeams::
2015-07-15 02:46:52 +00:00
; number of HOF teams
ds 1
2020-06-28 03:03:39 +00:00
wUnusedD5A3::
2015-07-26 02:26:54 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayerCoins::
ds 2 ; BCD
2013-12-08 09:49:40 +00:00
2020-06-28 03:03:39 +00:00
wMissableObjectFlags::
2013-12-08 09:49:40 +00:00
; bit array of missable objects. set = removed
2015-08-10 04:56:20 +00:00
ds 32
wMissableObjectFlagsEnd::
ds 7
2015-05-30 21:09:53 +00:00
wd5cd:: ds 1 ; temp copy of c1x2 (sprite facing/anim)
2020-06-28 03:03:39 +00:00
wMissableObjectList::
; each entry consists of 2 bytes
; * the sprite ID (depending on the current map)
2015-08-31 02:38:41 +00:00
; * the missable object index (global, used for wMissableObjectFlags)
; terminated with $FF
2013-12-08 09:49:40 +00:00
ds 17 * 2
2020-06-28 03:03:39 +00:00
wGameProgressFlags::
; $c8 bytes
2020-06-28 03:03:39 +00:00
wOaksLabCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPalletTownCurScript::
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wBluesHouseCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wViridianCityCurScript::
ds 1
ds 2
2020-06-28 03:03:39 +00:00
wPewterCityCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute3CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute4CurScript::
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wViridianGymCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPewterGymCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wCeruleanGymCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wVermilionGymCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wCeladonGymCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute6CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute8CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute24CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute25CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute9CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute10CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wMtMoon1FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wMtMoonB2FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSSAnne1FRoomsCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSSAnne2FRoomsCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute22CurScript::
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wRedsHouse2FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wViridianMartCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute22GateCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wCeruleanCityCurScript::
ds 1
ds 7
2020-06-28 03:03:39 +00:00
wSSAnneBowCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wViridianForestCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wMuseum1FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute13CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute14CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute17CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute19CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute21CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSafariZoneGateCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRockTunnelB1FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRockTunnel1FCurScript::
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wRoute11CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute12CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute15CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute16CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute18CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute20CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSSAnneB1FRoomsCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wVermilionCityCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPokemonTower2FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPokemonTower3FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPokemonTower4FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPokemonTower5FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPokemonTower6FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPokemonTower7FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRocketHideoutB1FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRocketHideoutB2FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRocketHideoutB3FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRocketHideoutB4FCurScript::
ds 2
2020-06-28 03:03:39 +00:00
wRoute6GateCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute8GateCurScript::
ds 2
2020-06-28 03:03:39 +00:00
wCinnabarIslandCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPokemonMansion1FCurScript::
ds 2
2020-06-28 03:03:39 +00:00
wPokemonMansion2FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPokemonMansion3FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPokemonMansionB1FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wVictoryRoad2FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wVictoryRoad3FCurScript::
ds 2
2020-06-28 03:03:39 +00:00
wFightingDojoCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSilphCo2FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSilphCo3FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSilphCo4FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSilphCo5FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSilphCo6FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSilphCo7FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSilphCo8FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSilphCo9FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wHallOfFameCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wChampionsRoomCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wLoreleisRoomCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wBrunosRoomCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wAgathasRoomCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wCeruleanCaveB1FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wVictoryRoad1FCurScript::
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wLancesRoomCurScript::
ds 1
ds 4
2020-06-28 03:03:39 +00:00
wSilphCo10FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSilphCo11FCurScript::
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wFuchsiaGymCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSaffronGymCurScript::
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wCinnabarGymCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wGameCornerCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute16Gate1FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wBillsHouseCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute5GateCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wPowerPlantCurScript::
wRoute7GateCurScript::
; overload
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wSSAnne2FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSeafoamIslandsB3FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute23CurScript::
ds 1
2020-06-28 03:03:39 +00:00
wSeafoamIslandsB4FCurScript::
ds 1
2020-06-28 03:03:39 +00:00
wRoute18Gate1FCurScript::
ds 1
2015-08-10 04:56:20 +00:00
ds 78
wGameProgressFlagsEnd::
ds 56
2015-07-19 03:49:52 +00:00
wObtainedHiddenItemsFlags::
ds 14
wObtainedHiddenCoinsFlags::
ds 2
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wWalkBikeSurfState::
2014-09-13 07:50:56 +00:00
; $00 = walking
; $01 = biking
; $02 = surfing
ds 1
ds 10
2020-06-28 03:03:39 +00:00
wTownVisitedFlag::
flag_array 13
2020-06-28 03:03:39 +00:00
wSafariSteps::
; starts at 502
ds 2
2020-06-28 03:03:39 +00:00
wFossilItem::
; item given to cinnabar lab
ds 1
2020-06-28 03:03:39 +00:00
wFossilMon::
; mon that will result from the item
ds 1
ds 2
2020-06-28 03:03:39 +00:00
wEnemyMonOrTrainerClass::
; trainer classes start at OPP_ID_OFFSET
ds 1
2020-06-28 03:03:39 +00:00
wPlayerJumpingYScreenCoordsIndex::
2014-09-13 07:50:56 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wRivalStarter::
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wPlayerStarter::
ds 1
2020-06-28 03:03:39 +00:00
wBoulderSpriteIndex::
2014-09-13 07:50:56 +00:00
; sprite index of the boulder the player is trying to push
ds 1
2020-06-28 03:03:39 +00:00
wLastBlackoutMap::
ds 1
2020-06-28 03:03:39 +00:00
wDestinationMap::
2014-09-13 07:50:56 +00:00
; destination map (for certain types of special warps, not ordinary walking)
ds 1
2020-06-28 03:03:39 +00:00
wUnusedD71B::
2015-07-26 02:26:54 +00:00
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wTileInFrontOfBoulderAndBoulderCollisionResult::
2014-09-13 07:50:56 +00:00
; used to store the tile in front of the boulder when trying to push a boulder
; also used to store the result of the collision check ($ff for a collision and $00 for no collision)
ds 1
2020-06-28 03:03:39 +00:00
wDungeonWarpDestinationMap::
2014-09-13 07:50:56 +00:00
; destination map for dungeon warps
ds 1
2020-06-28 03:03:39 +00:00
wWhichDungeonWarp::
2014-09-13 07:50:56 +00:00
; which dungeon warp within the source map was used
ds 1
2020-06-28 03:03:39 +00:00
wUnusedD71F::
2015-07-26 02:26:54 +00:00
ds 1
ds 8
2020-06-28 03:03:39 +00:00
wd728::
; bit 0: using Strength outside of battle
2015-08-30 00:15:05 +00:00
; bit 1: set by IsSurfingAllowed when surfing's allowed, but the caller resets it after checking the result
; bit 3: received Old Rod
; bit 4: received Good Rod
; bit 5: received Super Rod
; bit 6: gave one of the Saffron guards a drink
; bit 7: set by ItemUseCardKey, which is leftover code from a previous implementation of the Card Key
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wBeatGymFlags::
2015-08-31 02:38:41 +00:00
; redundant because it matches wObtainedBadges
2015-07-26 02:26:54 +00:00
; used to determine whether to show name on statue and in two NPC text scripts
ds 1
ds 1
2014-09-13 07:50:56 +00:00
2020-06-28 03:03:39 +00:00
wd72c::
2014-09-13 07:50:56 +00:00
; bit 0: if not set, the 3 minimum steps between random battles have passed
2015-08-30 00:15:05 +00:00
; bit 1: prevent audio fade out
ds 1
2020-06-28 03:03:39 +00:00
wd72d::
2015-08-30 00:15:05 +00:00
; This variable is used for temporary flags and as the destination map when
; warping to the Trade Center or Colosseum.
; bit 0: sprite facing directions have been initialised in the Trade Center
; bit 3: do scripted warp (used to warp back to Lavender Town from the top of the pokemon tower)
; bit 4: on a dungeon warp
; bit 5: don't make NPCs face the player when spoken to
; Bits 6 and 7 are set by scripts when starting major battles in the storyline,
; but they do not appear to affect anything. Bit 6 is reset after all battles
; and bit 7 is reset after trainer battles (but it's only set before trainer
; battles anyway).
ds 1
2020-06-28 03:03:39 +00:00
wd72e::
2015-08-30 00:15:05 +00:00
; bit 0: the player has received Lapras in the Silph Co. building
; bit 1: set in various places, but doesn't appear to have an effect
; bit 2: the player has healed pokemon at a pokemon center at least once
; bit 3: the player has a received a pokemon from Prof. Oak
; bit 4: disable battles
; bit 5: set when a battle ends and when the player blacks out in the overworld due to poison
; bit 6: using the link feature
; bit 7: set if scripted NPC movement has been initialised
2014-09-13 07:50:56 +00:00
ds 1
2015-08-30 00:15:05 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wd730::
2014-09-14 18:29:18 +00:00
; bit 0: NPC sprite being moved by script
; bit 5: ignore joypad input
; bit 6: print text with no delay between each letter
2015-07-15 11:27:59 +00:00
; bit 7: set if joypad states are being simulated in the overworld or an NPC's movement is being scripted
ds 1
ds 1
2020-06-28 03:03:39 +00:00
wd732::
2014-09-13 07:50:56 +00:00
; bit 0: play time being counted
; bit 1: remnant of debug mode? not set by the game code.
; if it is set
; 1. skips most of Prof. Oak's speech, and uses NINTEN as the player's name and SONY as the rival's name
2017-06-24 20:01:43 +00:00
; 2. does not have the player start in floor two of the player's house (instead sending them to [wLastMap])
2014-09-13 07:50:56 +00:00
; 3. allows wild battles to be avoided by holding down B
; bit 2: the target warp is a fly warp (bit 3 set or blacked out) or a dungeon warp (bit 4 set)
; bit 3: used warp pad, escape rope, dig, teleport, or fly, so the target warp is a "fly warp"
; bit 4: jumped into hole (Pokemon Mansion, Seafoam Islands, Victory Road) or went down waterfall (Seafoam Islands), so the target warp is a "dungeon warp"
; bit 5: currently being forced to ride bike (cycling road)
; bit 6: map destination is [wLastBlackoutMap] (usually the last used pokemon center, but could be the player's house)
ds 1
2020-06-28 03:03:39 +00:00
wFlags_D733::
2015-08-14 02:13:47 +00:00
; bit 0: running a test battle
2015-08-30 00:15:05 +00:00
; bit 1: prevent music from changing when entering new map
; bit 2: skip the joypad check in CheckWarpsNoCollision (used for the forced warp down the waterfall in the Seafoam Islands)
; bit 3: trainer wants to battle
2015-08-31 02:38:41 +00:00
; bit 4: use variable [wCurMapScript] instead of the provided index for next frame's map script (used to start battle when talking to trainers)
2014-09-13 07:50:56 +00:00
; bit 7: used fly out of battle
ds 1
2020-06-28 03:03:39 +00:00
wBeatLorelei::
2015-07-21 21:21:14 +00:00
; bit 1: set when you beat Lorelei and reset in Indigo Plateau lobby
; the game uses this to tell when Elite 4 events need to be reset
ds 2
2020-06-28 03:03:39 +00:00
wd736::
; bit 0: check if the player is standing on a door and make him walk down a step if so
2014-09-14 18:29:18 +00:00
; bit 1: the player is currently stepping down from a door
2014-09-13 07:50:56 +00:00
; bit 2: standing on a warp
; bit 6: jumping down a ledge / fishing animation
2017-06-24 20:01:43 +00:00
; bit 7: player sprite spinning due to spin tiles (Rocket hideout / Viridian Gym)
ds 1
2020-06-28 03:03:39 +00:00
wCompletedInGameTradeFlags::
2015-02-07 10:43:08 +00:00
ds 2
ds 2
2020-06-28 03:03:39 +00:00
wWarpedFromWhichWarp::
2015-07-26 02:26:54 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wWarpedFromWhichMap::
2015-07-26 02:26:54 +00:00
ds 1
ds 2
2014-09-14 18:29:18 +00:00
2020-06-28 03:03:39 +00:00
wCardKeyDoorY::
2014-09-14 18:29:18 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wCardKeyDoorX::
2014-09-14 18:29:18 +00:00
ds 1
ds 2
2020-06-28 03:03:39 +00:00
wFirstLockTrashCanIndex::
2015-07-25 03:27:59 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wSecondLockTrashCanIndex::
2015-07-25 03:27:59 +00:00
ds 1
2015-07-21 01:32:02 +00:00
2015-07-25 03:27:59 +00:00
ds 2
2020-06-28 03:03:39 +00:00
wEventFlags::
2015-07-21 01:32:02 +00:00
ds 320
2020-06-28 03:03:39 +00:00
wLinkEnemyTrainerName::
2015-02-07 10:43:08 +00:00
; linked game's trainer name
2020-06-28 03:03:39 +00:00
wGrassRate::
ds 1
2020-06-28 03:03:39 +00:00
wGrassMons::
;ds 20
ds 11
; Overload wGrassMons
2020-06-28 03:03:39 +00:00
wSerialEnemyDataBlock::
ds 9
2020-06-28 03:03:39 +00:00
wEnemyPartyCount:: ds 1
wEnemyPartyMons:: ds PARTY_LENGTH + 1
; Overload enemy party data
UNION
2020-06-28 03:03:39 +00:00
wWaterRate:: db
wWaterMons:: db
NEXTU
2020-06-28 03:03:39 +00:00
wEnemyMons::
wEnemyMon1:: party_struct wEnemyMon1
wEnemyMon2:: party_struct wEnemyMon2
wEnemyMon3:: party_struct wEnemyMon3
wEnemyMon4:: party_struct wEnemyMon4
wEnemyMon5:: party_struct wEnemyMon5
wEnemyMon6:: party_struct wEnemyMon6
2020-06-28 03:03:39 +00:00
wEnemyMonOT:: ds NAME_LENGTH * PARTY_LENGTH
wEnemyMonNicks:: ds NAME_LENGTH * PARTY_LENGTH
ENDU
2020-06-28 03:03:39 +00:00
wTrainerHeaderPtr::
ds 2
ds 6
2020-06-28 03:03:39 +00:00
wOpponentAfterWrongAnswer::
2015-07-26 02:26:54 +00:00
; the trainer the player must face after getting a wrong answer in the Cinnabar
; gym quiz
2020-06-28 03:03:39 +00:00
wUnusedDA38::
2015-07-26 02:26:54 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wCurMapScript::
; index of current map script, mostly used as index for function pointer array
2017-06-24 20:01:43 +00:00
; mostly copied from map-specific map script pointer and written back later
ds 1
2016-01-03 19:17:10 +00:00
ds 7
2020-06-28 03:03:39 +00:00
wPlayTimeHours::
2016-01-03 19:17:10 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayTimeMaxed::
2016-01-03 19:17:10 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayTimeMinutes::
2016-01-03 19:17:10 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wPlayTimeSeconds::
ds 1
2020-06-28 03:03:39 +00:00
wPlayTimeFrames::
ds 1
2020-06-28 03:03:39 +00:00
wSafariZoneGameOver::
2014-09-14 18:29:18 +00:00
ds 1
2020-06-28 03:03:39 +00:00
wNumSafariBalls::
ds 1
2020-06-28 03:03:39 +00:00
wDayCareInUse::
2014-01-06 00:24:01 +00:00
; 0 if no pokemon is in the daycare
; 1 if pokemon is in the daycare
ds 1
2020-06-28 03:03:39 +00:00
wDayCareMonName:: ds NAME_LENGTH
wDayCareMonOT:: ds NAME_LENGTH
2020-06-28 03:03:39 +00:00
wDayCareMon:: box_struct wDayCareMon
wMainDataEnd::
wBoxDataStart::
2020-06-28 03:03:39 +00:00
wNumInBox:: ds 1
wBoxSpecies:: ds MONS_PER_BOX + 1
wBoxMons::
2020-06-28 03:03:39 +00:00
wBoxMon1:: box_struct wBoxMon1
wBoxMon2:: ds BOX_STRUCT_LENGTH * (MONS_PER_BOX - 1)
2014-01-06 00:24:01 +00:00
2020-06-28 03:03:39 +00:00
wBoxMonOT:: ds NAME_LENGTH * MONS_PER_BOX
wBoxMonNicks:: ds NAME_LENGTH * MONS_PER_BOX
wBoxMonNicksEnd::
wBoxDataEnd::
2014-05-23 22:34:35 +00:00
2018-11-18 23:29:24 +00:00
SECTION "Stack", WRAM0
2020-06-28 03:03:39 +00:00
wStack::
2015-04-26 16:05:25 +00:00
INCLUDE "sram.asm"