2014-06-14 04:12:40 -07:00
INCLUDE "constants.asm"
2014-01-27 17:09:09 -05:00
2014-05-26 14:04:56 -07:00
flag_array: MACRO
ds (( \ 1 ) + 7 ) / 8
ENDM
2014-06-14 04:12:40 -07:00
box_struct_length EQU 25 + NUM_MOVES * 2
box_struct: MACRO
\ 1 Species: : db
\ 1 HP: : dw
\ 1 BoxLevel: : db
\ 1 Status: : db
\ 1 Type: :
\ 1 Type1: : db
\ 1 Type2: : db
\ 1 CatchRate: : db
\ 1 Moves: : ds NUM_MOVES
\ 1 OTID: : dw
\ 1 Exp: : ds 3
\ 1 HPExp: : dw
\ 1 AttackExp: : dw
\ 1 DefenseExp: : dw
\ 1 SpeedExp: : dw
\ 1 SpecialExp: : dw
\ 1 DVs: : ds 2
\ 1 PP: : ds NUM_MOVES
ENDM
party_struct: MACRO
box_struct \ 1
\ 1 Level: : db
\ 1 Stats: :
\ 1 MaxHP: : dw
\ 1 Attack: : dw
\ 1 Defense: : dw
\ 1 Speed: : dw
\ 1 Special: : dw
ENDM
battle_struct: MACRO
\ 1 Species: : db
\ 1 HP: : dw
2018-03-24 13:41:54 -05:00
\ 1 PartyPos: :
2014-06-14 04:12:40 -07:00
\ 1 BoxLevel: : db
\ 1 Status: : db
\ 1 Type: :
\ 1 Type1: : db
\ 1 Type2: : db
\ 1 CatchRate: : db
\ 1 Moves: : ds NUM_MOVES
\ 1 DVs: : ds 2
\ 1 Level: : db
2015-08-30 00:44:13 -07:00
\ 1 Stats: :
2014-06-14 04:12:40 -07:00
\ 1 MaxHP: : dw
\ 1 Attack: : dw
\ 1 Defense: : dw
\ 1 Speed: : dw
\ 1 Special: : dw
\ 1 PP: : ds NUM_MOVES
ENDM
2013-12-05 01:18:14 -05:00
2017-03-21 00:44:10 +00:00
SECTION "WRAM Bank 0" , WRAM0
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wUnusedC000: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSoundID: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wMuteAudioAndPauseMusic: :
2015-08-08 22:32:44 -07: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-27 23:03:39 -04:00
wDisableChannelOutputWhenSfxEnds: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wStereoPanning: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSavedVolume: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wChannelCommandPointers: :
2015-08-08 22:32:44 -07:00
ds 16
2020-06-27 23:03:39 -04:00
wChannelReturnAddresses: :
2015-08-08 22:32:44 -07:00
ds 16
2020-06-27 23:03:39 -04:00
wChannelSoundIDs: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelFlags1: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelFlags2: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelDutyCycles: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelDutyCyclePatterns: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelVibratoDelayCounters: :
2015-08-08 22:32:44 -07:00
; reloaded at the beginning of a note. counts down until the vibrato begins.
ds 8
2020-06-27 23:03:39 -04:00
wChannelVibratoExtents: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelVibratoRates: :
2015-08-08 22:32:44 -07:00
; high nybble is rate (counter reload value) and low nybble is counter.
; time between applications of vibrato.
ds 8
2020-06-27 23:03:39 -04:00
wChannelFrequencyLowBytes: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelVibratoDelayCounterReloadValues: :
2015-08-08 22:32:44 -07:00
; delay of the beginning of the vibrato from the start of the note
ds 8
2020-06-27 23:03:39 -04:00
wChannelPitchSlideLengthModifiers: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelPitchSlideFrequencySteps: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelPitchSlideFrequencyStepsFractionalPart: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelPitchSlideCurrentFrequencyFractionalPart: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelPitchSlideCurrentFrequencyHighBytes: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelPitchSlideCurrentFrequencyLowBytes: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelPitchSlideTargetFrequencyHighBytes: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelPitchSlideTargetFrequencyLowBytes: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelNoteDelayCounters: :
2015-08-08 22:32:44 -07: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-27 23:03:39 -04:00
wChannelLoopCounters: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelNoteSpeeds: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelNoteDelayCountersFractionalPart: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelOctaves: :
2015-08-08 22:32:44 -07:00
ds 8
2020-06-27 23:03:39 -04:00
wChannelVolumes: :
2015-08-08 22:32:44 -07:00
; also includes fade for hardware channels that support it
ds 8
wMusicWaveInstrument: :
ds 1
wSfxWaveInstrument: :
ds 1
2020-06-27 23:03:39 -04:00
wMusicTempo: :
2015-08-08 22:32:44 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wSfxTempo: :
2015-08-08 22:32:44 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wSfxHeaderPointer: :
2015-08-08 22:32:44 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wNewSoundID: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wAudioROMBank: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wAudioSavedROMBank: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wFrequencyModifier: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wTempoModifier: :
2015-08-08 22:32:44 -07:00
ds 1
ds 13
2014-05-26 10:05:58 -07:00
2013-12-05 01:18:14 -05:00
2018-11-18 18:29:24 -05:00
SECTION "Sprite State Data" , WRAM0
2013-12-05 01:18:14 -05:00
2015-08-10 23:03:31 -05:00
wSpriteDataStart: :
2020-06-27 23:03:39 -04:00
wSpriteStateData1: :
2013-12-05 01:18:14 -05:00
; 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
2016-01-29 11:20:47 -05:00
spritestatedata1: MACRO
\ 1 PictureID: : db
\ 1 MovementStatus: : db
2018-11-18 17:54:46 -05:00
\ 1 ImageIndex: : db
2016-01-29 11:20:47 -05:00
\ 1 YStepVector: : db
\ 1 YPixels: : db
\ 1 XStepVector: : db
\ 1 XPixels: : db
\ 1 IntraAnimFrameCounter: : db
\ 1 AnimFrameCounter: : db
\ 1 FacingDirection: : db
ds 6
2018-11-18 17:54:46 -05:00
\ 1 End: :
2016-01-29 11:20:47 -05:00
endm
2018-11-18 17:54:46 -05:00
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
2014-05-26 10:05:58 -07:00
2020-06-27 23:03:39 -04:00
wSpriteStateData2: :
2013-12-05 01:18:14 -05:00
; 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 16:58:02 -04:00
; C2x1:
2013-12-05 01:18:14 -05:00
; 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
2016-01-29 11:20:47 -05:00
spritestatedata2: MACRO
\ 1 WalkAnimationCounter: : db
ds 1
\ 1 YDisplacement: : db
\ 1 XDisplacement: : db
\ 1 MapY: : db
\ 1 MapX: : db
\ 1 MovementByte1: : db
\ 1 GrassPriority: : db
\ 1 MovementDelay: : db
ds 5
2018-11-18 19:23:56 -05:00
\ 1 ImageBaseOffset: : db
2016-01-29 11:20:47 -05:00
ds 1
2018-11-18 17:54:46 -05:00
\ 1 End: :
2016-01-29 11:20:47 -05:00
endm
2018-11-18 17:54:46 -05:00
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
2013-12-05 01:18:14 -05:00
2015-08-10 23:03:31 -05:00
wSpriteDataEnd: :
2013-12-05 01:18:14 -05:00
2018-11-18 18:29:24 -05:00
SECTION "OAM Buffer" , WRAM0
2014-05-26 10:05:58 -07:00
2020-06-27 23:03:39 -04:00
wOAMBuffer: :
2013-12-05 01:18:14 -05:00
; buffer for OAM data. Copied to OAM by DMA
ds 4 * 40
2020-06-27 23:03:39 -04:00
wTileMap: :
2013-12-05 01:18:14 -05:00
; buffer for tiles that are visible on screen (20 columns by 18 rows)
ds 20 * 18
2020-06-27 23:03:39 -04:00
wSerialPartyMonsPatchList: :
2015-02-07 02:43:08 -08:00
; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer
2020-06-27 23:03:39 -04:00
wTileMapBackup: :
2013-12-05 01:18:14 -05:00
; buffer for temporarily saving and restoring current screen's tiles
; (e.g. if menus are drawn on top)
2015-02-07 02:43:08 -08:00
; ds 20 * 18
ds 200
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wSerialEnemyMonsPatchList: :
2015-02-07 02:43:08 -08:00
; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer
ds 200
ds 80
2013-12-05 01:18:14 -05:00
2014-05-26 14:04:56 -07:00
wTempPic: :
2020-06-27 23:03:39 -04:00
wOverworldMap: :
2014-05-26 14:04:56 -07:00
ds 1300
2019-07-07 00:44:21 -04:00
wOverworldMapEnd: :
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wRedrawRowOrColumnSrcTiles: :
2015-08-14 02:46:12 -07:00
; the tiles of the row or column to be redrawn by RedrawRowOrColumn
2015-08-14 04:11:53 -07:00
ds SCREEN_WIDTH * 2
2013-12-05 01:18:14 -05:00
; coordinates of the position of the cursor for the top menu item (id 0)
2020-06-27 23:03:39 -04:00
wTopMenuItemY: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wTopMenuItemX: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wCurrentMenuItem: :
2013-12-05 01:18:14 -05:00
; 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-27 23:03:39 -04:00
wTileBehindCursor: :
2013-12-05 01:18:14 -05:00
; the tile that was behind the menu cursor's current location
ds 1
2020-06-27 23:03:39 -04:00
wMaxMenuItem: :
2013-12-05 01:18:14 -05:00
; id of the bottom menu item
ds 1
2020-06-27 23:03:39 -04:00
wMenuWatchedKeys: :
2013-12-05 01:18:14 -05:00
; bit mask of keys that the menu will respond to
ds 1
2020-06-27 23:03:39 -04:00
wLastMenuItem: :
2013-12-05 01:18:14 -05:00
; id of previously selected menu item
ds 1
2020-06-27 23:03:39 -04:00
wPartyAndBillsPCSavedMenuItem: :
2015-07-15 20:04:58 -07: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-27 23:03:39 -04:00
wBagSavedMenuItem: :
2015-07-15 20:04:58 -07:00
; It is used by the bag list to remember the cursor position while the menu
; isn't active.
ds 1
2020-06-27 23:03:39 -04:00
wBattleAndStartSavedMenuItem: :
2015-07-15 20:04:58 -07: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
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPlayerMoveListIndex: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMonNumber: :
2015-07-15 20:04:58 -07:00
; index in party of currently battling mon
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMenuCursorLocation: :
2013-12-05 01:18:14 -05:00
; the address of the menu cursor's current location within wTileMap
ds 2
ds 2
2020-06-27 23:03:39 -04:00
wMenuJoypadPollCount: :
2013-12-05 01:18:14 -05:00
; how many times should HandleMenuInput poll the joypad state before it returns?
ds 1
2020-06-27 23:03:39 -04:00
wMenuItemToSwap: :
2014-08-08 22:39:13 -07:00
; id of menu item selected for swapping (counts from 1) (0 means that no menu item has been selected for swapping)
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wListScrollOffset: :
2013-12-05 01:18:14 -05:00
; 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-27 23:03:39 -04:00
wMenuWatchMovingOutOfBounds: :
2015-07-13 00:32:03 -07: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 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wTradeCenterPointerTableIndex: :
2015-02-07 02:43:08 -08:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wTextDest: :
2016-09-11 02:01:37 -07:00
; destination pointer for text output
; this variable is written to, but is never read from
ds 2
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wDoNotWaitForButtonPressAfterDisplayingText: :
2014-09-13 00:50:56 -07:00
; if non-zero, skip waiting for a button press after displaying text in DisplayTextID
ds 1
2020-06-27 23:03:39 -04:00
wSerialSyncAndExchangeNybbleReceiveData: :
2015-02-07 02:43:08 -08:00
; the final received nybble is stored here by Serial_SyncAndExchangeNybble
2020-06-27 23:03:39 -04:00
wSerialExchangeNybbleTempReceiveData: :
2015-02-07 02:43:08 -08:00
; temporary nybble used by Serial_ExchangeNybble
2020-06-27 23:03:39 -04:00
wLinkMenuSelectionReceiveBuffer: :
2015-02-07 02:43:08 -08:00
; two byte buffer
; the received menu selection is stored twice
2015-07-25 19:26:54 -07:00
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wSerialExchangeNybbleReceiveData: :
2015-02-07 02:43:08 -08:00
; the final received nybble is stored here by Serial_ExchangeNybble
ds 1
ds 3
2020-06-27 23:03:39 -04:00
wSerialExchangeNybbleSendData: :
2015-02-07 02:43:08 -08:00
; this nybble is sent when using Serial_SyncAndExchangeNybble or Serial_ExchangeNybble
2020-06-27 23:03:39 -04:00
wLinkMenuSelectionSendBuffer: :
2015-02-07 02:43:08 -08:00
; two byte buffer
; the menu selection byte is stored twice before sending
ds 5
2020-06-27 23:03:39 -04:00
wLinkTimeoutCounter: :
2015-02-07 02:43:08 -08:00
; 1 byte
2020-06-27 23:03:39 -04:00
wUnknownSerialCounter: :
2015-02-07 02:43:08 -08:00
; 2 bytes
2020-06-27 23:03:39 -04:00
wEnteringCableClub: :
2015-07-25 19:26:54 -07:00
ds 1
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wWhichTradeMonSelectionMenu: :
2015-02-07 02:43:08 -08:00
; $00 = player mons
; $01 = enemy mons
2020-06-27 23:03:39 -04:00
wMonDataLocation: :
2015-07-15 20:04:58 -07: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
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wMenuWrappingEnabled: :
2013-12-05 01:18:14 -05:00
; 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-27 23:03:39 -04:00
wCheckFor180DegreeTurn: :
2015-07-24 20:27:59 -07:00
; whether to check for 180-degree turn (0 = don't, 1 = do)
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wMissableObjectIndex: :
2015-07-24 20:27:59 -07:00
ds 1
2014-05-23 15:11:09 -07:00
2020-06-27 23:03:39 -04:00
wPredefID: :
2014-05-23 15:11:09 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wPredefRegisters: :
2014-05-23 15:11:09 -07:00
ds 6
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wTrainerHeaderFlagBit: :
2013-12-05 01:18:14 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wNPCMovementScriptPointerTableNum: :
2014-09-09 20:55:19 -07:00
; which NPC movement script pointer is being used
; 0 if an NPC movement script is not running
ds 1
2020-06-27 23:03:39 -04:00
wNPCMovementScriptBank: :
2014-09-09 20:55:19 -07:00
; ROM bank of current NPC movement script
ds 1
ds 2
2014-06-14 14:24:35 -07:00
2020-06-27 23:03:39 -04:00
wUnusedCC5B: :
2015-08-12 22:14:31 -07:00
2020-06-27 23:03:39 -04:00
wVermilionDockTileMapBuffer: :
2015-08-12 22:14:31 -07:00
; 180 bytes
2020-06-27 23:03:39 -04:00
wOaksAideRewardItemName: :
2015-08-12 22:14:31 -07:00
2020-06-27 23:03:39 -04:00
wDexRatingNumMonsSeen: :
2015-08-12 22:14:31 -07:00
2020-06-27 23:03:39 -04:00
wFilteredBagItems: :
2015-08-12 22:14:31 -07:00
; List of bag items that has been filtered to a certain type of items,
; such as drinks or fossils.
2020-06-27 23:03:39 -04:00
wElevatorWarpMaps: :
2015-08-12 22:14:31 -07:00
2020-06-27 23:03:39 -04:00
wMonPartySpritesSavedOAM: :
2015-08-12 22:14:31 -07: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-27 23:03:39 -04:00
wTrainerCardBlkPacket: :
2015-08-12 02:16:56 -07:00
; $40 bytes
2020-06-27 23:03:39 -04:00
wSlotMachineSevenAndBarModeChance: :
2015-07-13 13:35:35 -07: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-27 23:03:39 -04:00
wHallOfFame: :
wBoostExpByExpAll: :
wAnimationType: :
2015-03-31 21:09:43 +02:00
; values between 0-6. Shake screen horizontally, shake screen vertically, blink Pokemon...
2020-06-27 23:03:39 -04:00
wNPCMovementDirections: :
2015-08-12 22:14:31 -07:00
ds 1
2015-07-15 04:27:59 -07:00
2020-06-27 23:03:39 -04:00
wDexRatingNumMonsOwned: :
2015-08-12 22:14:31 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wDexRatingText: :
2015-08-12 22:14:31 -07:00
ds 1
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineSavedROMBank: :
2015-07-13 13:35:35 -07:00
; ROM back to return to when the player is done with the slot machine
ds 1
2015-07-25 19:26:54 -07:00
ds 26
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wAnimPalette: :
2015-07-24 14:39:45 -07:00
ds 1
ds 29
2014-09-09 20:55:19 -07:00
2020-06-27 23:03:39 -04:00
wNPCMovementDirections2: :
2014-09-09 20:55:19 -07:00
2020-06-27 23:03:39 -04:00
wSwitchPartyMonTempBuffer: :
2014-09-09 20:55:19 -07:00
; temporary buffer when swapping party mon data
ds 10
2020-06-27 23:03:39 -04:00
wNumStepsToTake: :
2015-07-15 13:58:21 -07:00
; used in Pallet Town scripted movement
ds 49
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wRLEByteCount: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wAddedToParty: :
2015-07-18 20:49:52 -07:00
; 0 = not added
; 1 = added
2020-06-27 23:03:39 -04:00
wSimulatedJoypadStatesEnd: :
2014-09-09 20:55:19 -07:00
; 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-27 23:03:39 -04:00
wParentMenuItem: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wCanEvolveFlags: :
2015-07-18 20:49:52 -07: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-27 23:03:39 -04:00
wForceEvolution: :
2015-07-25 19:26:54 -07:00
ds 1
2015-03-31 20:40:22 +02:00
2020-06-27 23:03:39 -04:00
; if [wAILayer2Encouragement] != 1, the second AI layer is not applied
wAILayer2Encouragement: :
2015-03-31 20:40:22 +02:00
ds 1
ds 1
2013-12-05 01:18:14 -05:00
; current HP of player and enemy substitutes
2020-06-27 23:03:39 -04:00
wPlayerSubstituteHP: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemySubstituteHP: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wTestBattlePlayerSelectedMove: :
2015-08-13 19:13:47 -07:00
; The player's selected move during a test battle.
; InitBattleVariables sets it to the move Pound.
ds 1
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wMoveMenuType: :
2013-12-05 01:18:14 -05:00
; 0=regular, 1=mimic, 2=above message box (relearn, heal pp..)
ds 1
2020-06-27 23:03:39 -04:00
wPlayerSelectedMove: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemySelectedMove: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wLinkBattleRandomNumberListIndex: :
2015-02-03 20:51:53 +01:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wAICount: :
2013-12-05 01:18:14 -05:00
; number of times remaining that AI action can occur
ds 1
ds 2
2020-06-27 23:03:39 -04:00
wEnemyMoveListIndex: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wLastSwitchInEnemyMonHP: :
2015-07-23 20:48:35 -07: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-08 22:39:13 -07:00
2020-06-27 23:03:39 -04:00
wTotalPayDayMoney: :
2014-08-08 22:39:13 -07:00
; total amount of money made using Pay Day during the current battle
ds 3
2020-06-27 23:03:39 -04:00
wSafariEscapeFactor: :
2014-08-08 22:39:13 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSafariBaitFactor: :
2014-08-08 22:39:13 -07:00
ds 1 ;
ds 1
2020-06-27 23:03:39 -04:00
wTransformedEnemyMonOriginalDVs: :
2015-08-14 00:36:06 -07:00
ds 2
2015-04-09 01:17:56 +02:00
2020-06-27 23:03:39 -04:00
wMonIsDisobedient: : ds 1
2015-04-09 01:17:56 +02:00
2020-06-27 23:03:39 -04:00
wPlayerDisabledMoveNumber: : ds 1
wEnemyDisabledMoveNumber: : ds 1
2015-04-09 01:17:56 +02:00
2020-06-27 23:03:39 -04:00
wInHandlePlayerMonFainted: :
2015-08-14 00:36:06 -07:00
; When running in the scope of HandlePlayerMonFainted, it equals 1.
; When running in the scope of HandleEnemyMonFainted, it equals 0.
ds 1
2015-04-09 01:17:56 +02:00
2020-06-27 23:03:39 -04:00
wPlayerUsedMove: : ds 1
wEnemyUsedMove: : ds 1
2015-04-09 01:17:56 +02:00
2020-06-27 23:03:39 -04:00
wEnemyMonMinimized: : ds 1
2014-08-08 22:39:13 -07:00
2020-06-27 23:03:39 -04:00
wMoveDidntMiss: : ds 1
2015-04-09 01:17:56 +02:00
2020-06-27 23:03:39 -04:00
wPartyFoughtCurrentEnemyFlags: :
2014-08-08 22:39:13 -07:00
; flags that indicate which party members have fought the current enemy mon
flag_array 6
2020-06-27 23:03:39 -04:00
wLowHealthAlarmDisabled: :
2015-08-14 00:36:06 -07:00
; Whether the low health alarm has been disabled due to the player winning the
; battle.
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMonMinimized: :
2015-08-14 00:36:06 -07:00
ds 1
2015-07-12 15:51:04 -07:00
2015-07-17 02:52:25 -05:00
ds 13
2014-08-08 22:39:13 -07:00
2020-06-27 23:03:39 -04:00
wLuckySlotHiddenObjectIndex: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wEnemyNumHits: :
2015-02-07 02:43:08 -08:00
; number of hits by enemy in attacks like Double Slap, etc.
2020-06-27 23:03:39 -04:00
wEnemyBideAccumulatedDamage: :
2015-02-07 02:43:08 -08:00
; the amount of damage accumulated by the enemy while biding (2 bytes)
2015-07-17 02:52:25 -05:00
ds 10
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wInGameTradeGiveMonSpecies: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wPlayerMonUnmodifiedLevel: :
2014-08-08 22:39:13 -07:00
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wInGameTradeTextPointerTablePointer: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wPlayerMonUnmodifiedMaxHP: :
2015-02-07 02:43:08 -08:00
ds 2
2020-06-27 23:03:39 -04:00
wInGameTradeTextPointerTableIndex: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wPlayerMonUnmodifiedAttack: :
2014-08-08 22:39:13 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wInGameTradeGiveMonName: :
2014-08-08 22:39:13 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMonUnmodifiedDefense: :
2014-08-08 22:39:13 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wPlayerMonUnmodifiedSpeed: :
2014-08-08 22:39:13 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wPlayerMonUnmodifiedSpecial: :
2014-08-08 22:39:13 -07:00
ds 2
2013-12-05 01:18:14 -05:00
; stat modifiers for the player's current pokemon
; value can range from 1 - 13 ($1 to $D)
; 7 is normal
2014-01-27 17:09:09 -05:00
wPlayerMonStatMods: :
2020-06-27 23:03:39 -04:00
wPlayerMonAttackMod: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMonDefenseMod: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMonSpeedMod: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMonSpecialMod: :
2013-12-05 01:18:14 -05:00
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wInGameTradeReceiveMonName: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wPlayerMonAccuracyMod: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMonEvasionMod: :
2013-12-05 01:18:14 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 3
2020-06-27 23:03:39 -04:00
wEnemyMonUnmodifiedLevel: :
2014-08-08 22:39:13 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMonUnmodifiedMaxHP: :
2014-08-08 22:39:13 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wEnemyMonUnmodifiedAttack: :
2014-08-08 22:39:13 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wEnemyMonUnmodifiedDefense: :
2014-08-08 22:39:13 -07:00
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wInGameTradeMonNick: :
2014-08-08 22:39:13 -07:00
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wEnemyMonUnmodifiedSpeed: :
2014-08-08 22:39:13 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wEnemyMonUnmodifiedSpecial: :
2014-08-08 22:39:13 -07:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wEngagedTrainerClass: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEngagedTrainerSet: :
2013-12-05 01:18:14 -05:00
; ds 1
; stat modifiers for the enemy's current pokemon
; value can range from 1 - 13 ($1 to $D)
; 7 is normal
2014-01-27 17:09:09 -05:00
wEnemyMonStatMods: :
2020-06-27 23:03:39 -04:00
wEnemyMonAttackMod: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMonDefenseMod: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMonSpeedMod: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMonSpecialMod: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMonAccuracyMod: :
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMonEvasionMod: :
2013-12-05 01:18:14 -05:00
ds 1
2015-02-07 02:43:08 -08:00
wInGameTradeReceiveMonSpecies: :
ds 1
ds 2
2014-09-09 20:55:19 -07:00
2020-06-27 23:03:39 -04:00
wNPCMovementDirections2Index: :
2014-09-09 20:55:19 -07:00
2020-06-27 23:03:39 -04:00
wUnusedCD37: :
2015-08-12 22:14:31 -07:00
2020-06-27 23:03:39 -04:00
wFilteredBagItemsCount: :
2015-08-12 22:14:31 -07:00
; number of items in wFilteredBagItems list
ds 1
2014-09-09 20:55:19 -07:00
2020-06-27 23:03:39 -04:00
wSimulatedJoypadStatesIndex: :
2014-09-09 20:55:19 -07:00
; 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-27 23:03:39 -04:00
wWastedByteCD39: :
2014-09-09 20:55:19 -07:00
; written to but nothing ever reads it
ds 1
2020-06-27 23:03:39 -04:00
wWastedByteCD3A: :
2014-09-09 20:55:19 -07:00
; written to but nothing ever reads it
ds 1
2020-06-27 23:03:39 -04:00
wOverrideSimulatedJoypadStatesMask: :
2014-09-09 20:55:19 -07:00
; mask indicating which real button presses can override simulated ones
; XXX is it ever not 0?
ds 1
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wFallingObjectsMovementData: :
2015-07-24 14:39:45 -07:00
; up to 20 bytes (one byte for each falling object)
2020-06-27 23:03:39 -04:00
wSavedY: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wTempSCX: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wBattleTransitionCircleScreenQuadrantY: :
2015-07-23 06:07:12 -07:00
; 0 = upper half (Y < 9)
; 1 = lower half (Y >= 9)
2020-06-27 23:03:39 -04:00
wBattleTransitionCopyTilesOffset: :
2015-07-23 06:07:12 -07:00
; 2 bytes
; after 1 row/column has been copied, the offset to the next one to copy from
2020-06-27 23:03:39 -04:00
wInwardSpiralUpdateScreenCounter: :
2015-07-23 06:07:12 -07: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-27 23:03:39 -04:00
wHoFTeamIndex: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wSSAnneSmokeDriftAmount: :
2015-07-18 20:49:52 -07:00
; multiplied by 16 to get the number of times to go right by 2 pixels
2020-06-27 23:03:39 -04:00
wRivalStarterTemp: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wBoxMonCounts: :
2015-07-18 20:49:52 -07:00
; 12 bytes
; array of the number of mons in each box
2020-06-27 23:03:39 -04:00
wDexMaxSeenMon: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wPPRestoreItem: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wWereAnyMonsAsleep: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wCanPlaySlots: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wNumShakes: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wDayCareStartLevel: :
2015-07-18 20:49:52 -07:00
; the level of the mon at the time it entered day care
2020-06-27 23:03:39 -04:00
wWhichBadge: :
2015-07-18 08:17:29 -07:00
2020-06-27 23:03:39 -04:00
wPriceTemp: :
2015-07-18 08:17:29 -07:00
; 3-byte BCD number
2020-06-27 23:03:39 -04:00
wTitleMonSpecies: :
2015-07-17 00:16:27 -07:00
2020-06-27 23:03:39 -04:00
wPlayerCharacterOAMTile: :
2015-07-17 00:16:27 -07:00
2020-06-27 23:03:39 -04:00
wMoveDownSmallStarsOAMCount: :
2015-07-16 22:08:34 -07:00
; the number of small stars OAM entries to move down
2020-06-27 23:03:39 -04:00
wChargeMoveNum: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wCoordIndex: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wOptionsTextSpeedCursorX: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wBoxNumString: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wTrainerInfoTextBoxWidthPlus1: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wSwappedMenuItem: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wHoFMonSpecies: :
2015-07-14 19:46:52 -07:00
2020-06-27 23:03:39 -04:00
wFieldMoves: :
2015-07-14 15:48:34 -07:00
; 4 bytes
; the current mon's field moves
2020-06-27 23:03:39 -04:00
wBadgeNumberTile: :
2015-07-14 14:32:49 -07:00
; tile ID of the badge number being drawn
2020-06-27 23:03:39 -04:00
wRodResponse: :
2015-07-14 14:32:49 -07:00
; 0 = no bite
; 1 = bite
; 2 = no fish on map
2020-06-27 23:03:39 -04:00
wWhichTownMapLocation: :
2015-07-13 19:24:07 -07:00
2020-06-27 23:03:39 -04:00
wStoppingWhichSlotMachineWheel: :
2015-07-13 13:35:35 -07:00
; which wheel the player is trying to stop
; 0 = none, 1 = wheel 1, 2 = wheel 2, 3 or greater = wheel 3
2020-06-27 23:03:39 -04:00
wTradedPlayerMonSpecies: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wTradingWhichPlayerMon: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wChangeBoxSavedMapTextPointer: :
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wFlyAnimUsingCoordList: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wPlayerSpinInPlaceAnimFrameDelay: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wPlayerSpinWhileMovingUpOrDownAnimDeltaY: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wHiddenObjectFunctionArgument: :
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wWhichTrade: :
2013-12-05 01:18:14 -05:00
; which entry from TradeMons to select
2020-06-27 23:03:39 -04:00
wTrainerSpriteOffset: :
2015-07-19 14:01:08 -07:00
2020-06-27 23:03:39 -04:00
wUnusedCD3D: :
2013-12-05 01:18:14 -05:00
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wHUDPokeballGfxOffsetX: :
2015-07-23 06:07:12 -07:00
; difference in X between the next ball and the current one
2020-06-27 23:03:39 -04:00
wBattleTransitionCircleScreenQuadrantX: :
2015-07-23 06:07:12 -07:00
; 0 = left half (X < 10)
; 1 = right half (X >= 10)
2020-06-27 23:03:39 -04:00
wSSAnneSmokeX: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wRivalStarterBallSpriteIndex: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wDayCareNumLevelsGrown: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wOptionsBattleAnimCursorX: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wTrainerInfoTextBoxWidth: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wHoFPartyMonIndex: :
2015-07-14 19:46:52 -07:00
2020-06-27 23:03:39 -04:00
wNumCreditsMonsDisplayed: :
2015-07-14 19:46:52 -07:00
; the number of credits mons that have been displayed so far
2020-06-27 23:03:39 -04:00
wBadgeNameTile: :
2015-07-14 14:32:49 -07:00
; first tile ID of the name being drawn
2020-06-27 23:03:39 -04:00
wFlyLocationsList: :
2015-07-13 19:24:07 -07:00
; 11 bytes plus $ff sentinel values at each end
2020-06-27 23:03:39 -04:00
wSlotMachineWheel1Offset: :
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wTradedEnemyMonSpecies: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wTradingWhichEnemyMon: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wFlyAnimCounter: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wPlayerSpinInPlaceAnimFrameDelayDelta: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wPlayerSpinWhileMovingUpOrDownAnimMaxY: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wHiddenObjectFunctionRomBank: :
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wTrainerEngageDistance: :
2013-12-05 01:18:14 -05:00
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wHUDGraphicsTiles: :
2015-07-23 06:07:12 -07:00
; 3 bytes
2020-06-27 23:03:39 -04:00
wDayCareTotalCost: :
2015-07-23 06:07:12 -07:00
; 2-byte BCD number
2020-06-27 23:03:39 -04:00
wJigglypuffFacingDirections: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wOptionsBattleStyleCursorX: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wTrainerInfoTextBoxNextRowOffset: :
2015-07-15 20:04:58 -07:00
2020-06-27 23:03:39 -04:00
wHoFMonLevel: :
2015-07-14 19:46:52 -07:00
2020-06-27 23:03:39 -04:00
wBadgeOrFaceTiles: :
2015-07-14 14:32:49 -07:00
; 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-27 23:03:39 -04:00
wSlotMachineWheel2Offset: :
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wNameOfPlayerMonToBeTraded: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wFlyAnimBirdSpriteImageIndex: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wPlayerSpinInPlaceAnimFrameDelayEndValue: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wPlayerSpinWhileMovingUpOrDownAnimFrameDelay: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wHiddenObjectIndex: :
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wTrainerFacingDirection: :
2013-12-05 01:18:14 -05:00
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wHoFMonOrPlayer: :
2015-07-14 19:46:52 -07:00
; show mon or show player?
; 0 = mon
; 1 = player
2020-06-27 23:03:39 -04:00
wSlotMachineWheel3Offset: :
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wPlayerSpinInPlaceAnimSoundID: :
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wHiddenObjectY: :
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wTrainerScreenY: :
2015-07-23 06:07:12 -07:00
2020-06-27 23:03:39 -04:00
wOptionsCancelCursorX: :
2013-12-05 01:18:14 -05:00
ds 1
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wDayCarePerLevelCost: :
2015-07-23 06:07:12 -07:00
; 2-byte BCD number (always set to $0100)
2020-06-27 23:03:39 -04:00
wHoFTeamIndex2: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wHiddenItemOrCoinsIndex: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wTradedPlayerMonOT: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wHiddenObjectX: :
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineWinningSymbol: :
2015-07-13 13:35:35 -07:00
; the OAM tile number of the upper left corner of the winning symbol minus 2
2020-06-27 23:03:39 -04:00
wNumFieldMoves: :
2015-07-14 15:48:34 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineWheel1BottomTile: :
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wTrainerScreenX: :
2013-12-05 01:18:14 -05:00
ds 1
2015-05-30 16:09:53 -05:00
; a lot of the uses for these values use more than the said address
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wHoFTeamNo: :
2015-07-14 19:46:52 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineWheel1MiddleTile: :
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wFieldMovesLeftmostXCoord: :
2015-07-23 06:07:12 -07:00
ds 1
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wLastFieldMoveID: :
2015-07-14 15:48:34 -07:00
; unused
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineWheel1TopTile: :
2015-07-14 15:48:34 -07:00
ds 1
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineWheel2BottomTile: :
2015-07-13 13:35:35 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSlotMachineWheel2MiddleTile: :
2015-07-13 13:35:35 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wTempCoins1: :
2015-07-13 13:35:35 -07:00
; 2 bytes
; temporary variable used to add payout amount to the player's coins
2020-06-27 23:03:39 -04:00
wSlotMachineWheel2TopTile: :
2015-07-13 13:35:35 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wBattleTransitionSpiralDirection: :
2015-07-14 14:32:49 -07:00
; 0 = outward, 1 = inward
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineWheel3BottomTile: :
2015-07-14 14:32:49 -07:00
ds 1
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineWheel3MiddleTile: :
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wFacingDirectionList: :
; 4 bytes (also, the byte before the start of the list (wSlotMachineWheel3BottomTile)
; is used a temp variable when the list is rotated)
2015-07-14 14:32:49 -07:00
; used when spinning the player's sprite
ds 1
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineWheel3TopTile: :
2015-07-13 13:35:35 -07:00
2015-07-14 14:32:49 -07: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 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wTempCoins2: :
2015-07-13 13:35:35 -07:00
; 2 bytes
; temporary variable used to subtract the bet amount from the player's coins
2020-06-27 23:03:39 -04:00
wPayoutCoins: :
2015-07-13 13:35:35 -07:00
; 2 bytes
2015-07-14 14:32:49 -07:00
ds 2
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wTradedPlayerMonOTID: :
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wSlotMachineFlags: :
2015-07-13 13:35:35 -07: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-27 23:03:39 -04:00
wSlotMachineWheel1SlipCounter: :
2015-07-13 13:35:35 -07:00
; wheel 1 can "slip" while this is non-zero
2020-06-27 23:03:39 -04:00
wCutTile: :
2015-07-14 19:46:52 -07:00
; $3d = tree tile
; $52 = grass tile
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wSlotMachineWheel2SlipCounter: :
2015-07-13 13:35:35 -07:00
; wheel 2 can "slip" while this is non-zero
2020-06-27 23:03:39 -04:00
wTradedEnemyMonOT: :
2015-07-14 14:32:49 -07:00
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wSavedPlayerScreenY: :
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineRerollCounter: :
2015-07-13 13:35:35 -07: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-27 23:03:39 -04:00
wEmotionBubbleSpriteIndex: :
2015-07-14 14:32:49 -07:00
; the index of the sprite the emotion bubble is to be displayed above
ds 1
2020-06-27 23:03:39 -04:00
wWhichEmotionBubble: :
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineBet: :
2015-07-13 13:35:35 -07:00
; how many coins the player bet on the slot machine (1 to 3)
2020-06-27 23:03:39 -04:00
wSavedPlayerFacingDirection: :
2015-07-14 14:32:49 -07:00
2020-06-27 23:03:39 -04:00
wWhichAnimationOffsets: :
2015-07-14 14:32:49 -07:00
; 0 = cut animation, 1 = boulder dust animation
ds 9
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wTradedEnemyMonOTID: :
2015-02-07 02:43:08 -08:00
ds 2
2020-06-27 23:03:39 -04:00
wStandingOnWarpPadOrHole: :
2015-07-24 20:27:59 -07:00
; 0 = neither
; 1 = warp pad
; 2 = hole
2020-06-27 23:03:39 -04:00
wOAMBaseTile: :
2015-07-13 19:24:07 -07:00
2020-06-27 23:03:39 -04:00
wGymTrashCanIndex: :
2015-07-24 20:27:59 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSymmetricSpriteOAMAttributes: :
2015-07-24 20:27:59 -07:00
ds 1
2015-03-14 15:25:21 -07:00
2020-06-27 23:03:39 -04:00
wMonPartySpriteSpecies: :
2015-03-14 15:25:21 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wLeftGBMonSpecies: :
2015-03-14 15:25:21 -07:00
; in the trade animation, the mon that leaves the left gameboy
ds 1
2020-06-27 23:03:39 -04:00
wRightGBMonSpecies: :
2015-03-14 15:25:21 -07:00
; in the trade animation, the mon that leaves the right gameboy
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wFlags_0xcd60: :
2014-05-26 14:04:56 -07:00
; bit 0: is player engaged by trainer (to avoid being engaged by multiple trainers simultaneously)
2014-09-09 20:55:19 -07:00
; bit 1: boulder dust animation (from using Strength) pending
2015-07-15 20:04:58 -07:00
; bit 3: using generic PC
2015-02-07 02:43:08 -08:00
; bit 5: don't play sound when A or B is pressed in menu
2014-09-09 20:55:19 -07:00
; bit 6: tried pushing against boulder once (you need to push twice before it will move)
2013-12-05 01:18:14 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 9
2020-06-27 23:03:39 -04:00
wActionResultOrTookBattleTurn: :
2015-07-14 23:16:06 -07: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
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wJoyIgnore: :
2014-05-25 10:51:53 -07:00
; Set buttons are ignored.
2013-12-05 01:18:14 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wDownscaledMonSize: :
2015-07-14 23:16:06 -07:00
; size of downscaled mon pic used in pokeball entering/exiting animation
; $00 = 5× 5
; $01 = 3× 3
2020-06-27 23:03:39 -04:00
wNumMovesMinusOne: :
2015-07-14 23:16:06 -07:00
; FormatMovesString stores the number of moves minus one here
ds 1
2018-03-21 18:55:09 -04:00
UNION
2015-07-14 23:16:06 -07:00
wcd6d: : ds 4 ; buffer for various data
2020-06-27 23:03:39 -04:00
wStatusScreenCurrentPP: :
2015-07-14 23:16:06 -07:00
; temp variable used to print a move's current PP on the status screen
ds 1
ds 6
2020-06-27 23:03:39 -04:00
wNormalMaxPPList: :
2015-07-14 23:16:06 -07:00
; list of normal max PP (without PP up) values
ds 9
2013-12-05 01:18:14 -05:00
2018-03-21 18:55:09 -04:00
NEXTU
2018-03-22 23:09:49 -04:00
wEvosMoves: : ds MAX_EVOLUTIONS * EVOLUTION_SIZE + 1
2018-03-21 18:55:09 -04:00
.end: :
ENDU
2020-06-27 23:03:39 -04:00
wSerialOtherGameboyRandomNumberListBlock: :
2015-02-07 02:43:08 -08:00
; buffer for transferring the random number list generated by the other gameboy
2020-06-27 23:03:39 -04:00
wTileMapBackup2: :
2013-12-05 01:18:14 -05:00
; second buffer for temporarily saving and restoring current screen's tiles (e.g. if menus are drawn on top)
ds 20 * 18
2020-06-27 23:03:39 -04:00
wNamingScreenNameLength: :
2015-07-24 20:27:59 -07:00
2020-06-27 23:03:39 -04:00
wEvoOldSpecies: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wBuffer: :
2014-05-23 15:34:35 -07:00
; Temporary storage area of 30 bytes.
2015-07-13 19:24:07 -07:00
2020-06-27 23:03:39 -04:00
wTownMapCoords: :
2015-07-13 19:24:07 -07:00
; lower nybble is x, upper nybble is y
2020-06-27 23:03:39 -04:00
wLearningMovesFromDayCare: :
2015-07-18 20:49:52 -07:00
; whether WriteMonMoves is being used to make a mon learn moves from day care
; non-zero if so
2020-06-27 23:03:39 -04:00
wChangeMonPicEnemyTurnSpecies: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wHPBarMaxHP: :
2015-07-18 20:49:52 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wNamingScreenSubmitName: :
2015-07-24 20:27:59 -07:00
; non-zero when the player has chosen to submit the name
2020-06-27 23:03:39 -04:00
wChangeMonPicPlayerTurnSpecies: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wEvoNewSpecies: :
2015-07-18 20:49:52 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wAlphabetCase: :
2015-07-24 20:27:59 -07:00
; 0 = upper case
; 1 = lower case
2020-06-27 23:03:39 -04:00
wEvoMonTileOffset: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wHPBarOldHP: :
2015-07-18 20:49:52 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wEvoCancelled: :
2015-07-18 20:49:52 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wNamingScreenLetter: :
2015-07-24 20:27:59 -07:00
2020-06-27 23:03:39 -04:00
wHPBarNewHP: :
2013-12-05 01:18:14 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wHPBarDelta: :
2013-12-05 01:18:14 -05:00
ds 1
2014-05-26 14:04:56 -07:00
2020-06-27 23:03:39 -04:00
wHPBarTempHP: :
2015-07-24 20:27:59 -07:00
ds 2
ds 11
2014-05-26 14:04:56 -07:00
2020-06-27 23:03:39 -04:00
wHPBarHPDifference: :
2013-12-05 01:18:14 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 7
2020-06-27 23:03:39 -04:00
wAIItem: :
2015-07-14 23:16:06 -07:00
; the item that the AI used
ds 1
2020-06-27 23:03:39 -04:00
wUsedItemOnWhichPokemon: :
2015-07-14 23:16:06 -07:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wAnimSoundID: :
2013-12-05 01:18:14 -05:00
; sound ID during battle animations
ds 1
2020-06-27 23:03:39 -04:00
wBankswitchHomeSavedROMBank: :
2015-07-14 23:16:06 -07:00
; used as a storage value for the bank to return to after a BankswitchHome (bankswitch in homebank)
ds 1
2020-06-27 23:03:39 -04:00
wBankswitchHomeTemp: :
2015-07-14 23:16:06 -07:00
; used as a temp storage value for the bank to switch to
ds 1
2015-07-12 23:00:48 -07:00
2020-06-27 23:03:39 -04:00
wBoughtOrSoldItemInMart: :
2015-07-12 23:00:48 -07: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-27 23:03:39 -04:00
wBattleResult: :
2014-08-08 22:39:13 -07:00
; $00 - win
; $01 - lose
; $02 - draw
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wAutoTextBoxDrawingControl: :
2014-09-13 00:50:56 -07:00
; bit 0: if set, DisplayTextID automatically draws a text box
ds 1
2015-05-30 16:09:53 -05:00
wcf0d: : ds 1 ; used with some overworld scripts (not exactly sure what it's used for)
2015-07-14 23:16:06 -07:00
2020-06-27 23:03:39 -04:00
wTilePlayerStandingOn: :
2015-07-14 23:16:06 -07:00
; used in CheckForTilePairCollisions2 to store the tile the player is on
ds 1
2020-06-27 23:03:39 -04:00
wNPCNumScriptedSteps: : ds 1
2014-09-09 20:55:19 -07:00
2020-06-27 23:03:39 -04:00
wNPCMovementScriptFunctionNum: :
2014-09-09 20:55:19 -07:00
; which script function within the pointer table indicated by
; wNPCMovementScriptPointerTableNum
ds 1
2020-06-27 23:03:39 -04:00
wTextPredefFlag: :
2015-07-14 23:16:06 -07:00
; bit 0: set when printing a text predef so that DisplayTextID doesn't switch
; to the current map's bank
ds 1
2014-05-23 15:11:09 -07:00
2020-06-27 23:03:39 -04:00
wPredefParentBank: :
2014-05-23 15:11:09 -07:00
ds 1
2014-09-13 00:50:56 -07:00
wSpriteIndex: : ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wCurSpriteMovement2: :
2013-12-05 01:18:14 -05:00
; movement byte 2 of current sprite
ds 1
2014-05-26 14:04:56 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wNPCMovementScriptSpriteOffset: :
2014-09-09 20:55:19 -07:00
; sprite offset of sprite being controlled by NPC movement script
ds 1
2020-06-27 23:03:39 -04:00
wScriptedNPCWalkCounter: :
2015-07-15 13:58:21 -07:00
ds 1
ds 1
2014-05-23 15:34:35 -07:00
2020-06-27 23:03:39 -04:00
wGBC: :
2014-05-23 15:34:35 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wOnSGB: :
2014-09-13 00:50:56 -07:00
; if running on SGB, it's 1, else it's 0
ds 1
2020-06-27 23:03:39 -04:00
wDefaultPaletteCommand: :
2015-08-12 02:16:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerHPBarColor: :
2015-08-12 02:16:56 -07:00
2020-06-27 23:03:39 -04:00
wWholeScreenPaletteMonSpecies: :
2015-08-12 02:16:56 -07:00
; species of the mon whose palette is used for the whole screen
ds 1
2020-06-27 23:03:39 -04:00
wEnemyHPBarColor: :
2015-08-12 02:16:56 -07:00
ds 1
; 0: green
; 1: yellow
; 2: red
2020-06-27 23:03:39 -04:00
wPartyMenuHPBarColors: :
2015-08-12 02:16:56 -07:00
ds 6
2020-06-27 23:03:39 -04:00
wStatusScreenHPBarColor: :
2015-08-12 02:16:56 -07:00
ds 1
ds 7
2020-06-27 23:03:39 -04:00
wCopyingSGBTileData: :
2015-08-12 02:16:56 -07:00
2020-06-27 23:03:39 -04:00
wWhichPartyMenuHPBar: :
2015-08-12 02:16:56 -07:00
2020-06-27 23:03:39 -04:00
wPalPacket: :
2015-08-12 02:16:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wPartyMenuBlkPacket: :
2015-08-12 02:16:56 -07:00
; $30 bytes
ds 29
2020-06-27 23:03:39 -04:00
wExpAmountGained: :
2015-08-12 22:14:31 -07:00
; 2-byte big-endian number
; the total amount of exp a mon gained
wcf4b: : ds 2 ; storage buffer for various strings
2020-06-27 23:03:39 -04:00
wGainBoostedExp: :
2015-07-17 02:52:25 -05:00
ds 1
2015-08-12 22:14:31 -07:00
2015-03-31 20:28:42 +02:00
ds 17
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wGymCityName: :
2015-07-14 23:16:06 -07:00
ds 17
2020-06-27 23:03:39 -04:00
wGymLeaderName: :
2015-08-10 23:51:20 -05:00
ds NAME_LENGTH
2015-07-14 23:16:06 -07:00
2020-06-27 23:03:39 -04:00
wItemList: :
2015-07-14 23:16:06 -07:00
ds 16
2014-05-26 14:04:56 -07:00
2020-06-27 23:03:39 -04:00
wListPointer: :
2015-02-07 18:37:40 -08:00
ds 2
2020-06-27 23:03:39 -04:00
wUnusedCF8D: :
2015-08-07 12:39:29 -07:00
; 2 bytes
; used to store pointers, but never read
ds 2
2015-02-07 18:37:40 -08:00
2020-06-27 23:03:39 -04:00
wItemPrices: :
2015-02-07 18:37:40 -08:00
ds 2
2015-05-30 16:09:53 -05:00
wcf91: : ds 1 ; used with a lot of things (too much to list here)
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wWhichPokemon: :
2013-12-05 01:18:14 -05:00
; which pokemon you selected
ds 1
2020-06-27 23:03:39 -04:00
wPrintItemPrices: :
2015-07-12 23:00:48 -07:00
; if non-zero, then print item prices when displaying lists
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wHPBarType: :
2015-02-07 22:18:42 -08:00
; type of HP bar
; $00 = enemy HUD in battle
; $01 = player HUD in battle / status screen
; $02 = party menu
2020-06-27 23:03:39 -04:00
wListMenuID: :
2013-12-05 01:18:14 -05:00
; ID used by DisplayListMenuID
ds 1
2020-06-27 23:03:39 -04:00
wRemoveMonFromBox: :
2015-07-12 23:36:56 -07:00
; if non-zero, RemovePokemon will remove the mon from the current box,
; else it will remove the mon from the party
2020-06-27 23:03:39 -04:00
wMoveMonType: :
2015-07-12 23:36:56 -07:00
; 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-12 23:00:48 -07:00
2020-06-27 23:03:39 -04:00
wItemQuantity: :
2015-07-12 23:00:48 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wMaxItemQuantity: :
2015-07-12 23:00:48 -07:00
ds 1
2015-02-07 18:37:40 -08:00
; LoadMonData copies mon data here
2020-06-27 23:03:39 -04:00
wLoadedMon: : party_struct wLoadedMon
2015-02-07 18:37:40 -08:00
2020-06-27 23:03:39 -04:00
wFontLoaded: :
2015-02-08 18:40:08 -08: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-07 18:37:40 -08:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wWalkCounter: :
2013-12-08 04:49:40 -05:00
; walk animation counter
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wTileInFrontOfPlayer: :
2014-09-13 00:50:56 -07:00
; background tile number in front of the player (either 1 or 2 steps ahead)
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wAudioFadeOutControl: :
2015-08-08 22:32:44 -07: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 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wAudioFadeOutCounterReloadValue: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wAudioFadeOutCounter: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wLastMusicSoundID: :
2015-08-08 22:32:44 -07: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 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wUpdateSpritesEnabled: :
2015-07-15 04:27:59 -07: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 00:50:56 -07:00
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wEnemyMoveNum: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMoveEffect: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMovePower: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMoveType: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMoveAccuracy: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMoveMaxPP: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMoveNum: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMoveEffect: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMovePower: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMoveType: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMoveAccuracy: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerMoveMaxPP: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMonSpecies2: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wBattleMonSpecies2: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyMonNick: : ds NAME_LENGTH
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wEnemyMon: : battle_struct wEnemyMon
2013-12-08 04:49:40 -05:00
2014-08-08 22:39:13 -07:00
wEnemyMonBaseStats: : ds 5
2018-03-24 13:41:54 -05:00
wEnemyMonActualCatchRate: : ds 1
2014-08-08 22:39:13 -07:00
wEnemyMonBaseExp: : ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wBattleMonNick: : ds NAME_LENGTH
wBattleMon: : battle_struct wBattleMon
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wTrainerClass: :
2013-12-08 04:49:40 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wTrainerPicPointer: :
2015-04-09 13:05:57 +02:00
ds 2
ds 1
2015-08-14 00:36:06 -07:00
2020-06-27 23:03:39 -04:00
wTempMoveNameBuffer: :
2015-08-14 00:36:06 -07:00
2020-06-27 23:03:39 -04:00
wLearnMoveMonName: :
2015-08-14 00:36:06 -07:00
; The name of the mon that is learning a move.
ds 16
2015-07-24 20:27:59 -07:00
2020-06-27 23:03:39 -04:00
wTrainerBaseMoney: :
2015-07-24 20:27:59 -07:00
; 2-byte BCD number
; money received after battle = base money × level of highest-level enemy mon
ds 2
2020-06-27 23:03:39 -04:00
wMissableObjectCounter: :
2015-07-24 20:27:59 -07:00
ds 1
ds 1
2013-12-22 19:05:44 -06:00
2020-06-27 23:03:39 -04:00
wTrainerName: :
2013-12-22 19:05:44 -06:00
; 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 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wIsInBattle: :
2015-07-24 20:27:59 -07:00
; lost battle, this is -1
2013-12-08 04:49:40 -05:00
; no battle, this is 0
; wild battle, this is 1
; trainer battle, this is 2
ds 1
2020-06-27 23:03:39 -04:00
wPartyGainExpFlags: :
2014-08-08 22:39:13 -07:00
; flags that indicate which party members should be be given exp when GainExperience is called
2014-06-14 04:12:40 -07:00
flag_array 6
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wCurOpponent: :
2013-12-08 04:49:40 -05:00
; in a wild battle, this is the species of pokemon
2019-07-07 00:44:21 -04:00
; in a trainer battle, this is the trainer class + OPP_ID_OFFSET
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wBattleType: :
2013-12-08 04:49:40 -05:00
; in normal battle, this is 0
; in old man battle, this is 1
; in safari battle, this is 2
ds 1
2020-06-27 23:03:39 -04:00
wDamageMultipliers: :
2015-03-31 20:28:42 +02:00
; bits 0-6: Effectiveness
; $0 = immune
; $5 = not very effective
; $a = neutral
; $14 = super-effective
; bit 7: STAB
2015-05-30 16:09:53 -05:00
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wLoneAttackNo: :
2013-12-08 04:49:40 -05:00
; which entry in LoneAttacks to use
2020-06-27 23:03:39 -04:00
wGymLeaderNo: :
2013-12-08 04:49:40 -05:00
; it's actually the same thing as ^
ds 1
2020-06-27 23:03:39 -04:00
wTrainerNo: :
2013-12-08 04:49:40 -05:00
; which instance of [youngster, lass, etc] is this?
ds 1
2020-06-27 23:03:39 -04:00
wCriticalHitOrOHKO: :
2014-08-08 22:39:13 -07:00
; $00 = normal attack
; $01 = critical hit
; $02 = successful OHKO
; $ff = failed OHKO
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wMoveMissed: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerStatsToDouble: :
2015-02-08 01:44:41 -08:00
; always 0
ds 1
2020-06-27 23:03:39 -04:00
wPlayerStatsToHalve: :
2015-02-08 01:44:41 -08:00
; always 0
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wPlayerBattleStatus1: :
2013-12-05 01:18:14 -05:00
; 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 04:49:40 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPlayerBattleStatus2: :
2013-12-05 01:18:14 -05:00
; 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 04:49:40 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPlayerBattleStatus3: :
2013-12-05 01:18:14 -05:00
; bit 0 - toxic
; bit 1 - light screen
; bit 2 - reflect
2017-06-24 15:01:43 -05:00
; bit 3 - transformed
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyStatsToDouble: :
2015-02-08 01:44:41 -08:00
; always 0
ds 1
2020-06-27 23:03:39 -04:00
wEnemyStatsToHalve: :
2015-02-08 01:44:41 -08:00
; always 0
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wEnemyBattleStatus1: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyBattleStatus2: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyBattleStatus3: :
2013-12-08 04:49:40 -05:00
ds 1
2014-08-08 22:39:13 -07:00
wPlayerNumAttacksLeft: :
; when the player is attacking multiple times, the number of attacks left
ds 1
2020-06-27 23:03:39 -04:00
wPlayerConfusedCounter: :
2015-01-31 18:26:05 +01:00
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wPlayerToxicCounter: :
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
2020-06-27 23:03:39 -04:00
wPlayerDisabledMove: :
2015-04-09 01:17:56 +02:00
; high nibble: which move is disabled (1-4)
; low nibble: disable turns left
2013-12-08 04:49:40 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2014-05-26 14:04:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyNumAttacksLeft: :
2015-01-31 18:26:05 +01:00
; when the enemy is attacking multiple times, the number of attacks left
2014-08-08 22:39:13 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wEnemyConfusedCounter: :
2015-01-31 18:26:05 +01:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wEnemyToxicCounter: :
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
2020-06-27 23:03:39 -04:00
wEnemyDisabledMove: :
2015-04-09 01:17:56 +02:00
; high nibble: which move is disabled (1-4)
; low nibble: disable turns left
2013-12-08 04:49:40 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2013-12-08 04:49:40 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPlayerNumHits: :
2015-02-07 02:43:08 -08:00
; number of hits by player in attacks like Double Slap, etc.
2020-06-27 23:03:39 -04:00
wPlayerBideAccumulatedDamage: :
2015-02-07 02:43:08 -08:00
; the amount of damage accumulated by the player while biding (2 bytes)
2020-06-27 23:03:39 -04:00
wUnknownSerialCounter2: :
2015-02-07 02:43:08 -08:00
; 2 bytes
2013-12-05 01:18:14 -05:00
2015-04-09 13:05:57 +02:00
ds 4
2014-08-08 22:39:13 -07:00
wEscapedFromBattle: :
; non-zero when an item or move that allows escape from battle was used
ds 1
2020-06-27 23:03:39 -04:00
wAmountMoneyWon: :
2015-07-24 20:27:59 -07:00
; 3-byte BCD number
2020-06-27 23:03:39 -04:00
wObjectToHide: :
2015-07-24 20:27:59 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wObjectToShow: :
2015-07-24 20:27:59 -07:00
ds 1
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wDefaultMap: :
2015-08-29 17:15:05 -07:00
; the map you will start at when the debug bit is set
2020-06-27 23:03:39 -04:00
wMenuItemOffset: :
2015-08-29 17:15:05 -07:00
2020-06-27 23:03:39 -04:00
wAnimationID: :
2013-12-08 04:49:40 -05:00
; ID number of the current battle animation
ds 1
2020-06-27 23:03:39 -04:00
wNamingScreenType: :
2015-07-13 15:40:33 -07:00
2020-06-27 23:03:39 -04:00
wPartyMenuTypeOrMessageID: :
2015-07-13 15:40:33 -07:00
2020-06-27 23:03:39 -04:00
wTempTilesetNumTiles: :
2015-07-13 15:40:33 -07:00
; temporary storage for the number of tiles in a tileset
ds 1
2015-07-12 23:00:48 -07:00
2020-06-27 23:03:39 -04:00
wSavedListScrollOffset: :
2015-07-12 23:00:48 -07: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
2013-12-05 01:18:14 -05:00
; base coordinates of frame block
2020-06-27 23:03:39 -04:00
wBaseCoordX: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wBaseCoordY: :
2013-12-08 04:49:40 -05:00
ds 1
2015-03-12 10:49:35 -04:00
; low health alarm counter/enable
; high bit = enable, others = timer to cycle frequencies
2020-06-27 23:03:39 -04:00
wLowHealthAlarm: : ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wFBTileCounter: :
2013-12-08 04:49:40 -05:00
; counts how many tiles of the current frame block have been drawn
ds 1
2020-06-27 23:03:39 -04:00
wMovingBGTilesCounter2: :
2015-07-24 20:27:59 -07:00
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wSubAnimFrameDelay: :
2013-12-08 04:49:40 -05:00
; duration of each frame of the current subanimation in terms of screen refreshes
ds 1
2020-06-27 23:03:39 -04:00
wSubAnimCounter: :
2013-12-08 04:49:40 -05:00
; counts the number of subentries left in the current subanimation
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wSaveFileStatus: :
2015-07-18 20:49:52 -07:00
; 1 = no save file or save file is corrupted
; 2 = save file exists and no corruption has been detected
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wNumFBTiles: :
2013-12-08 04:49:40 -05:00
; number of tiles in current battle animation frame block
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wFlashScreenLongCounter: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wSpiralBallsBaseY: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wFallingObjectMovementByte: :
2015-07-24 14:39:45 -07:00
; bits 0-6: index into FallingObjects_DeltaXs array (0 - 8)
; bit 7: direction; 0 = right, 1 = left
2020-06-27 23:03:39 -04:00
wNumShootingBalls: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wTradedMonMovingRight: :
2015-03-14 15:25:21 -07:00
; $01 if mon is moving from left gameboy to right gameboy; $00 if vice versa
2020-06-27 23:03:39 -04:00
wOptionsInitialized: :
2015-07-18 20:49:52 -07:00
2020-06-27 23:03:39 -04:00
wNewSlotMachineBallTile: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wCoordAdjustmentAmount: :
2015-07-24 14:39:45 -07:00
; how much to add to the X/Y coord
2020-06-27 23:03:39 -04:00
wUnusedD08A: :
2015-07-24 14:39:45 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSpiralBallsBaseX: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wNumFallingObjects: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wSlideMonDelay: :
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wAnimCounter: :
2015-07-13 13:35:35 -07:00
; generic counter variable for various animations
2015-03-13 05:33:16 -07:00
2020-06-27 23:03:39 -04:00
wSubAnimTransform: :
2013-12-08 04:49:40 -05:00
; controls what transformations are applied to the subanimation
2013-12-05 01:18:14 -05:00
; 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 04:49:40 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wEndBattleWinTextPointer: :
2014-09-14 11:29:18 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wEndBattleLoseTextPointer: :
2014-09-14 11:29:18 -07:00
ds 2
2013-12-08 04:49:40 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wEndBattleTextRomBank: :
2013-12-08 04:49:40 -05:00
ds 1
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wSubAnimAddrPtr: :
2013-12-08 04:49:40 -05:00
; the address _of the address_ of the current subanimation entry
ds 2
2015-07-13 13:35:35 -07:00
2020-06-27 23:03:39 -04:00
wSlotMachineAllowMatchesCounter: :
2015-07-13 13:35:35 -07: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-27 23:03:39 -04:00
wSubAnimSubEntryAddr: :
2013-12-08 04:49:40 -05:00
; the address of the current subentry of the current subanimation
ds 2
2013-12-05 01:18:14 -05:00
2014-05-26 14:04:56 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wOutwardSpiralTileMapPointer: :
2015-07-24 14:39:45 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wPartyMenuAnimMonEnabled: :
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wTownMapSpriteBlinkingEnabled: :
2014-09-14 11:29:18 -07: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-27 23:03:39 -04:00
wUnusedD09B: :
2015-07-24 14:39:45 -07:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wFBDestAddr: :
2013-12-08 04:49:40 -05:00
; current destination address in OAM for frame blocks (big endian)
ds 2
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wFBMode: :
2013-12-08 04:49:40 -05:00
; controls how the frame blocks are put together to form frames
2013-12-05 01:18:14 -05:00
; 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-30 21:38:41 -05: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 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wLinkCableAnimBulgeToggle: :
2015-07-24 14:39:45 -07:00
; 0 = small
; 1 = big
2020-06-27 23:03:39 -04:00
wIntroNidorinoBaseTile: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wOutwardSpiralCurrentDirection: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wDropletTile: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wNewTileBlockID: :
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wWhichBattleAnimTileset: :
2015-07-24 14:39:45 -07:00
2020-06-27 23:03:39 -04:00
wSquishMonCurrentDirection: :
2015-07-24 14:39:45 -07:00
; 0 = left
; 1 = right
2020-06-27 23:03:39 -04:00
wSlideMonUpBottomRowLeftTile: :
2015-07-24 14:39:45 -07:00
; the tile ID of the leftmost tile in the bottom row in AnimationSlideMonUp_
ds 1
2015-07-12 16:24:03 -07:00
wDisableVBlankWYUpdate: : ds 1 ; if non-zero, don't update WY during V-blank
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wSpriteCurPosX: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSpriteCurPosY: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSpriteWidth: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSpriteHeight: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSpriteInputCurByte: :
2013-12-08 04:49:40 -05:00
; current input byte
ds 1
2020-06-27 23:03:39 -04:00
wSpriteInputBitCounter: :
2013-12-08 04:49:40 -05:00
; bit offset of last read input bit
ds 1
2020-06-27 23:03:39 -04:00
wSpriteOutputBitOffset: : ; determines where in the output byte the two bits are placed. Each byte contains four columns (2bpp data)
2013-12-05 01:18:14 -05:00
; 3 -> XX000000 1st column
; 2 -> 00XX0000 2nd column
; 1 -> 0000XX00 3rd column
; 0 -> 000000XX 4th column
2013-12-08 04:49:40 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wSpriteLoadFlags: :
2013-12-05 01:18:14 -05:00
; bit 0 determines used buffer (0 -> $a188, 1 -> $a310)
; bit 1 loading last sprite chunk? (there are at most 2 chunks per load operation)
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSpriteUnpackMode: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSpriteFlipped: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSpriteInputPtr: :
2013-12-08 04:49:40 -05:00
; pointer to next input byte
ds 2
2020-06-27 23:03:39 -04:00
wSpriteOutputPtr: :
2013-12-08 04:49:40 -05:00
; pointer to current output byte
ds 2
2020-06-27 23:03:39 -04:00
wSpriteOutputPtrCached: :
2013-12-08 04:49:40 -05:00
; used to revert pointer for different bit offsets
ds 2
2020-06-27 23:03:39 -04:00
wSpriteDecodeTable0Ptr: :
2013-12-08 04:49:40 -05:00
; pointer to differential decoding table (assuming initial value 0)
ds 2
2020-06-27 23:03:39 -04:00
wSpriteDecodeTable1Ptr: :
2013-12-08 04:49:40 -05:00
; pointer to differential decoding table (assuming initial value 1)
ds 2
2015-05-30 16:09:53 -05:00
wd0b5: : ds 1 ; used as a temp storage area for Pokemon Species, and other Pokemon/Battle related things
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wNameListType: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPredefBank: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHeader: :
2015-08-07 12:39:29 -07:00
2020-06-27 23:03:39 -04:00
wMonHIndex: :
2017-06-24 15:01:43 -05:00
; In the ROM base stats data structure, this is the dex number, but it is
2015-08-07 12:39:29 -07:00
; overwritten with the internal index number after the header is copied to WRAM.
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHBaseStats: :
wMonHBaseHP: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHBaseAttack: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHBaseDefense: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHBaseSpeed: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHBaseSpecial: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHTypes: :
wMonHType1: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHType2: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHCatchRate: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHBaseEXP: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHSpriteDim: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHFrontSprite: :
2013-12-08 04:49:40 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wMonHBackSprite: :
2013-12-08 04:49:40 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wMonHMoves: :
2015-08-30 21:38:41 -05:00
ds NUM_MOVES
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wMonHGrowthRate: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMonHLearnset: :
2013-12-08 04:49:40 -05:00
; bit field
2014-05-26 14:04:56 -07:00
flag_array 50 + 5
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wSavedTilesetType: :
2015-07-19 17:52:26 -07: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 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wDamage: :
2015-02-07 13:40:14 -08:00
ds 2
2013-12-08 04:49:40 -05:00
2015-07-17 02:52:25 -05:00
ds 2
2015-02-03 20:51:53 +01:00
2020-06-27 23:03:39 -04:00
wRepelRemainingSteps: :
2015-07-17 02:52:25 -05:00
ds 1
2015-02-08 00:17:03 -08:00
2020-06-27 23:03:39 -04:00
wMoves: :
2015-02-08 00:17:03 -08:00
; list of moves for FormatMovesString
ds 4
2020-06-27 23:03:39 -04:00
wMoveNum: :
2015-02-08 00:17:03 -08:00
ds 1
2020-06-27 23:03:39 -04:00
wMovesString: :
2015-02-08 00:17:03 -08:00
ds 56
2020-06-27 23:03:39 -04:00
wUnusedD119: :
2015-07-24 20:27:59 -07:00
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wWalkBikeSurfStateCopy: :
2014-09-13 00:50:56 -07:00
; wWalkBikeSurfState is sometimes copied here, but it doesn't seem to be used for anything
ds 1
2020-06-27 23:03:39 -04:00
wInitListType: :
2015-07-12 23:00:48 -07:00
; the type of list for InitList to init
ds 1
2020-06-27 23:03:39 -04:00
wCapturedMonSpecies: :
2015-07-24 20:27:59 -07:00
; 0 if no mon was captured
ds 1
2020-06-27 23:03:39 -04:00
wFirstMonsNotOutYet: :
2015-07-24 20:27:59 -07: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-27 23:03:39 -04:00
wPokeBallCaptureCalcTemp: :
2015-08-29 23:21:54 -07:00
2015-08-07 05:20:37 -07:00
; lower nybble: number of shakes
; upper nybble: number of animations to play
2020-06-27 23:03:39 -04:00
wPokeBallAnimData: :
2015-08-07 05:20:37 -07:00
2020-06-27 23:03:39 -04:00
wUsingPPUp: :
2015-08-07 05:20:37 -07:00
2020-06-27 23:03:39 -04:00
wMaxPP: :
2015-08-07 05:20:37 -07:00
; 0 for player, non-zero for enemy
2020-06-27 23:03:39 -04:00
wCalculateWhoseStats: :
2015-08-07 05:20:37 -07:00
2020-06-27 23:03:39 -04:00
wTypeEffectiveness: :
2015-08-07 05:20:37 -07:00
2020-06-27 23:03:39 -04:00
wMoveType: :
2015-08-07 05:20:37 -07:00
2020-06-27 23:03:39 -04:00
wNumSetBits: :
2015-08-07 04:24:06 -07:00
2015-05-30 16:09:53 -05:00
wd11e: : ds 1 ; used as a Pokemon and Item storage value. Also used as an output value for CountSetBits
2015-07-24 20:27:59 -07:00
2020-06-27 23:03:39 -04:00
wForcePlayerToChooseMon: :
2015-07-24 20:27:59 -07: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-08 22:39:13 -07:00
wNumRunAttempts: :
; number of times the player has tried to run from battle
ds 1
2020-06-27 23:03:39 -04:00
wEvolutionOccurred: :
2015-07-24 20:27:59 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wVBlankSavedROMBank: :
2015-07-24 20:27:59 -07:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wIsKeyItem: :
2015-07-26 23:34:43 -05:00
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wTextBoxID: :
2015-02-07 02:43:08 -08:00
ds 1
2016-01-03 14:17:10 -05: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 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wCurEnemyLVL: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wItemListPointer: :
2015-07-12 23:00:48 -07:00
; pointer to list of items terminated by $FF
ds 2
2015-07-13 00:32:03 -07:00
wListCount: :
; number of entries in a list
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wLinkState: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wTwoOptionMenuID: :
2015-07-12 23:00:48 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wChosenMenuItem: :
2015-07-12 23:00:48 -07:00
; the id of the menu item the player ultimately chose
2020-06-27 23:03:39 -04:00
wOutOfBattleBlackout: :
2015-07-12 23:00:48 -07:00
; non-zero when the whole party has fainted due to out-of-battle poison damage
ds 1
2020-06-27 23:03:39 -04:00
wMenuExitMethod: :
2015-07-12 23:00:48 -07: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-27 23:03:39 -04:00
wDungeonWarpDataEntrySize: :
2015-07-25 19:26:54 -07:00
; the size is always 6, so they didn't need a variable in RAM for this
2020-06-27 23:03:39 -04:00
wWhichPewterGuy: :
2015-07-25 19:26:54 -07:00
; 0 = museum guy
; 1 = gym guy
2020-06-27 23:03:39 -04:00
wWhichPrizeWindow: :
2015-07-25 19:26:54 -07:00
; there are 3 windows, from 0 to 2
2020-06-27 23:03:39 -04:00
wGymGateTileBlock: :
2015-07-25 19:26:54 -07:00
; a horizontal or vertical gate block
ds 1
2020-06-27 23:03:39 -04:00
wSavedSpriteScreenY: :
2015-07-25 19:26:54 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSavedSpriteScreenX: :
2015-07-25 19:26:54 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSavedSpriteMapY: :
2015-07-25 19:26:54 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSavedSpriteMapX: :
2015-07-25 19:26:54 -07:00
ds 1
ds 5
2020-06-27 23:03:39 -04:00
wWhichPrize: :
2015-07-25 19:26:54 -07:00
ds 1
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wIgnoreInputCounter: :
2014-09-14 11:29:18 -07:00
; counts downward each frame
; when it hits 0, bit 5 (ignore input bit) of wd730 is reset
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wStepCounter: :
2014-09-13 00:50:56 -07:00
; counts down once every step
ds 1
2020-06-27 23:03:39 -04:00
wNumberOfNoRandomBattleStepsLeft: :
2014-09-13 00:50:56 -07:00
; after a battle, you have at least 3 steps before a random battle can occur
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wPrize1: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPrize2: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPrize3: :
2013-12-08 04:49:40 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSerialRandomNumberListBlock: :
2015-02-07 02:43:08 -08:00
; the first 7 bytes are the preamble
2020-06-27 23:03:39 -04:00
wPrize1Price: :
2015-07-25 19:26:54 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wPrize2Price: :
2015-07-25 19:26:54 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wPrize3Price: :
2015-07-25 19:26:54 -07:00
ds 2
ds 1
2015-02-07 02:43:08 -08:00
2020-06-27 23:03:39 -04:00
wLinkBattleRandomNumberList: :
2015-02-07 02:43:08 -08:00
; shared list of 9 random numbers, indexed by wLinkBattleRandomNumberListIndex
ds 10
2020-06-27 23:03:39 -04:00
wSerialPlayerDataBlock: :
2015-02-07 02:43:08 -08:00
; the first 6 bytes are the preamble
2020-06-27 23:03:39 -04:00
wPseudoItemID: :
2015-07-25 19:26:54 -07: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-27 23:03:39 -04:00
wUnusedD153: :
2015-07-25 19:26:54 -07:00
ds 1
ds 2
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wEvoStoneItemID: :
2015-07-25 19:26:54 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSavedNPCMovementDirections2Index: :
2015-07-25 19:26:54 -07:00
ds 1
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wPlayerName: :
2015-08-10 23:51:20 -05:00
ds NAME_LENGTH
2013-12-08 04:49:40 -05:00
2015-08-10 23:03:31 -05:00
wPartyDataStart: :
2020-06-27 23:03:39 -04:00
wPartyCount: : ds 1
wPartySpecies: : ds PARTY_LENGTH
wPartyEnd: : ds 1
2013-12-08 04:49:40 -05:00
2014-06-14 04:12:40 -07:00
wPartyMons: :
2020-06-27 23:03:39 -04: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 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wPartyMonOT: : ds NAME_LENGTH * PARTY_LENGTH
wPartyMonNicks: : ds NAME_LENGTH * PARTY_LENGTH
2013-12-05 01:18:14 -05:00
2015-08-10 23:03:31 -05:00
wPartyDataEnd: :
wMainDataStart: :
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPokedexOwned: :
2014-06-14 14:24:35 -07:00
flag_array NUM_POKEMON
2014-01-27 17:09:09 -05:00
wPokedexOwnedEnd: :
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPokedexSeen: :
2014-06-14 14:24:35 -07:00
flag_array NUM_POKEMON
2014-01-27 17:09:09 -05:00
wPokedexSeenEnd: :
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wNumBagItems: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wBagItems: :
2013-12-08 04:49:40 -05:00
; item, quantity
2015-08-29 17:27:57 -07:00
ds BAG_ITEM_CAPACITY * 2
2013-12-08 04:49:40 -05:00
ds 1 ; end
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPlayerMoney: :
2014-05-26 10:05:58 -07:00
ds 3 ; BCD
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wRivalName: :
2015-08-10 23:51:20 -05:00
ds NAME_LENGTH
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wOptions: :
2013-12-05 01:18:14 -05:00
; 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 04:49:40 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wObtainedBadges: :
2016-01-03 14:17:10 -05:00
flag_array 8
2013-12-05 01:18:14 -05:00
2014-05-26 14:04:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wLetterPrintingDelayFlags: :
2015-07-14 19:46:52 -07: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
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPlayerID: :
2013-12-08 04:49:40 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wMapMusicSoundID: :
2015-08-08 22:32:44 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wMapMusicROMBank: :
2015-08-08 22:32:44 -07:00
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wMapPalOffset: :
2014-09-13 00:50:56 -07: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 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wCurMap: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wCurrentTileBlockMapViewPointer: :
2014-09-13 00:50:56 -07:00
; pointer to the upper left corner of the current view in the tile block map
ds 2
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wYCoord: :
2013-12-08 14:25:19 -05:00
; player’ s position on the current map
ds 1
2020-06-27 23:03:39 -04:00
wXCoord: :
2013-12-08 14:25:19 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wYBlockCoord: :
2013-12-08 14:25:19 -05:00
; player's y position (by block)
ds 1
2020-06-27 23:03:39 -04:00
wXBlockCoord: :
2014-04-27 02:44:29 -04:00
ds 1
2020-06-27 23:03:39 -04:00
wLastMap: :
2014-04-27 02:44:29 -04:00
ds 1
2020-06-27 23:03:39 -04:00
wUnusedD366: :
2015-07-25 19:26:54 -07:00
ds 1
2013-12-08 14:25:19 -05:00
2020-06-27 23:03:39 -04:00
wCurMapTileset: :
2013-12-08 14:25:19 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wCurMapHeight: :
2013-12-08 14:25:19 -05:00
; blocks
ds 1
2020-06-27 23:03:39 -04:00
wCurMapWidth: :
2013-12-08 14:25:19 -05:00
; blocks
ds 1
2020-06-27 23:03:39 -04:00
wMapDataPtr: :
2013-12-08 14:25:19 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wMapTextPtr: :
2013-12-08 14:25:19 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wMapScriptPtr: :
2013-12-08 14:25:19 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wMapConnections: :
2013-12-08 14:25:19 -05:00
; connection byte
ds 1
2020-06-27 23:03:39 -04:00
wMapConn1Ptr: :
2014-05-26 14:04:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wNorthConnectionStripSrc: :
2015-07-18 08:17:29 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wNorthConnectionStripDest: :
2015-07-18 08:17:29 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wNorthConnectionStripWidth: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wNorthConnectedMapWidth: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wNorthConnectedMapYAlignment: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wNorthConnectedMapXAlignment: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wNorthConnectedMapViewPointer: :
2015-07-18 08:17:29 -07:00
ds 2
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wMapConn2Ptr: :
2014-05-26 14:04:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSouthConnectionStripSrc: :
2015-07-18 08:17:29 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wSouthConnectionStripDest: :
2015-07-18 08:17:29 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wSouthConnectionStripWidth: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSouthConnectedMapWidth: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSouthConnectedMapYAlignment: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSouthConnectedMapXAlignment: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSouthConnectedMapViewPointer: :
2015-07-18 08:17:29 -07:00
ds 2
2013-12-08 14:25:19 -05:00
2020-06-27 23:03:39 -04:00
wMapConn3Ptr: :
2014-05-26 14:04:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wWestConnectionStripSrc: :
2015-07-18 08:17:29 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wWestConnectionStripDest: :
2015-07-18 08:17:29 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wWestConnectionStripHeight: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wWestConnectedMapWidth: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wWestConnectedMapYAlignment: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wWestConnectedMapXAlignment: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wWestConnectedMapViewPointer: :
2015-07-18 08:17:29 -07:00
ds 2
2013-12-08 14:25:19 -05:00
2020-06-27 23:03:39 -04:00
wMapConn4Ptr: :
2014-05-26 14:04:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wEastConnectionStripSrc: :
2015-07-18 08:17:29 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wEastConnectionStripDest: :
2015-07-18 08:17:29 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wEastConnectionStripHeight: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wEastConnectedMapWidth: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wEastConnectedMapYAlignment: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wEastConnectedMapXAlignment: :
2015-07-18 08:17:29 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wEastConnectedMapViewPointer: :
2015-07-18 08:17:29 -07:00
ds 2
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wSpriteSet: :
2013-12-08 14:25:19 -05:00
; sprite set for the current map (11 sprite picture ID's)
ds 11
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wSpriteSetID: :
2013-12-08 14:25:19 -05:00
; sprite set ID for the current map
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wObjectDataPointerTemp: :
2015-07-19 17:52:26 -07:00
ds 2
ds 2
2020-06-27 23:03:39 -04:00
wMapBackgroundTile: :
2015-07-19 17:52:26 -07:00
; the tile shown outside the boundaries of the map
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wNumberOfWarps: :
2014-09-13 00:50:56 -07:00
; number of warps in current map
ds 1
2020-06-27 23:03:39 -04:00
wWarpEntries: :
2014-09-13 00:50:56 -07:00
; current map warp entries
ds 128
2020-06-27 23:03:39 -04:00
wDestinationWarpID: :
2014-09-13 00:50:56 -07:00
; if $ff, the player's coordinates are not updated when entering the map
ds 1
ds 128
2020-06-27 23:03:39 -04:00
wNumSigns: :
2015-07-19 17:52:26 -07:00
; number of signs in the current map (up to 16)
ds 1
2020-06-27 23:03:39 -04:00
wSignCoords: :
2015-07-19 17:52:26 -07:00
; 2 bytes each
; Y, X
ds 32
2020-06-27 23:03:39 -04:00
wSignTextIDs: :
2015-07-19 17:52:26 -07:00
ds 16
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wNumSprites: :
2013-12-08 14:25:19 -05:00
; number of sprites on the current map
2014-05-26 14:04:56 -07:00
ds 1
2014-09-13 00:50:56 -07: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-27 23:03:39 -04:00
wYOffsetSinceLastSpecialWarp: :
2014-09-13 00:50:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wXOffsetSinceLastSpecialWarp: :
2014-09-13 00:50:56 -07:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wMapSpriteData: :
2014-09-13 00:50:56 -07:00
; two bytes per sprite (movement byte 2, text ID)
2013-12-08 14:25:19 -05:00
ds 32
2020-06-27 23:03:39 -04:00
wMapSpriteExtraData: :
2014-09-13 00:50:56 -07:00
; two bytes per sprite (trainer class/item ID, trainer set ID)
2014-05-26 14:04:56 -07:00
ds 32
2020-06-27 23:03:39 -04:00
wCurrentMapHeight2: :
2015-07-19 17:52:26 -07:00
; map height in 2x2 meta-tiles
ds 1
2020-06-27 23:03:39 -04:00
wCurrentMapWidth2: :
2015-07-19 17:52:26 -07:00
; map width in 2x2 meta-tiles
ds 1
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wMapViewVRAMPointer: :
2014-09-14 11:29:18 -07:00
; the address of the upper left corner of the visible portion of the BG tile map in VRAM
ds 2
2015-07-19 17:52:26 -07: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-27 23:03:39 -04:00
wPlayerMovingDirection: :
2015-07-19 17:52:26 -07: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-27 23:03:39 -04:00
wPlayerLastStopDirection: :
2015-07-19 17:52:26 -07:00
; the direction in which the player was moving before the player last stopped
ds 1
2020-06-27 23:03:39 -04:00
wPlayerDirection: :
2015-07-19 17:52:26 -07: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 14:25:19 -05:00
2020-06-27 23:03:39 -04:00
wTilesetBank: :
2013-12-08 14:25:19 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wTilesetBlocksPtr: :
2013-12-08 14:25:19 -05:00
; maps blocks (4x4 tiles) to tiles
ds 2
2020-06-27 23:03:39 -04:00
wTilesetGfxPtr: :
2013-12-08 14:25:19 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wTilesetCollisionPtr: :
2013-12-08 14:25:19 -05:00
; list of all walkable tiles
ds 2
2020-06-27 23:03:39 -04:00
wTilesetTalkingOverTiles: :
2013-12-08 14:25:19 -05:00
ds 3
2020-06-27 23:03:39 -04:00
wGrassTile: :
2013-12-08 14:25:19 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2014-05-26 10:05:58 -07:00
ds 4
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wNumBoxItems: :
2013-12-08 04:49:40 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wBoxItems: :
2013-12-08 04:49:40 -05:00
; item, quantity
2015-08-29 17:27:57 -07:00
ds PC_ITEM_CAPACITY * 2
2013-12-08 04:49:40 -05:00
ds 1 ; end
2020-06-27 23:03:39 -04:00
wCurrentBoxNum: :
2015-07-18 20:49:52 -07:00
; bits 0-6: box number
; bit 7: whether the player has changed boxes before
2015-07-15 20:04:58 -07:00
ds 2
2015-07-14 19:46:52 -07:00
2020-06-27 23:03:39 -04:00
wNumHoFTeams: :
2015-07-14 19:46:52 -07:00
; number of HOF teams
ds 1
2020-06-27 23:03:39 -04:00
wUnusedD5A3: :
2015-07-25 19:26:54 -07:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPlayerCoins: :
2014-05-26 10:05:58 -07:00
ds 2 ; BCD
2013-12-08 04:49:40 -05:00
2020-06-27 23:03:39 -04:00
wMissableObjectFlags: :
2013-12-08 04:49:40 -05:00
; bit array of missable objects. set = removed
2015-08-09 23:56:20 -05:00
ds 32
wMissableObjectFlagsEnd: :
ds 7
2014-05-26 14:04:56 -07:00
2015-05-30 16:09:53 -05:00
wd5cd: : ds 1 ; temp copy of c1x2 (sprite facing/anim)
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wMissableObjectList: :
2013-12-05 01:18:14 -05:00
; each entry consists of 2 bytes
; * the sprite ID (depending on the current map)
2015-08-30 21:38:41 -05:00
; * the missable object index (global, used for wMissableObjectFlags)
2013-12-05 01:18:14 -05:00
; terminated with $FF
2013-12-08 04:49:40 -05:00
ds 17 * 2
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wGameProgressFlags: :
2013-12-08 14:48:17 -05:00
; $c8 bytes
2020-06-27 23:03:39 -04:00
wOaksLabCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPalletTownCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wBluesHouseCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wViridianCityCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 2
2020-06-27 23:03:39 -04:00
wPewterCityCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute3CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute4CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wViridianGymCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPewterGymCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wCeruleanGymCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wVermilionGymCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wCeladonGymCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute6CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute8CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute24CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute25CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute9CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute10CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMtMoon1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMtMoonB2FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSSAnne1FRoomsCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSSAnne2FRoomsCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute22CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wRedsHouse2FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wViridianMartCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute22GateCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wCeruleanCityCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 7
2020-06-27 23:03:39 -04:00
wSSAnneBowCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wViridianForestCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wMuseum1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute13CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute14CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute17CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute19CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute21CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSafariZoneGateCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRockTunnelB1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRockTunnel1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wRoute11CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute12CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute15CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute16CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute18CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute20CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSSAnneB1FRoomsCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wVermilionCityCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPokemonTower2FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPokemonTower3FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPokemonTower4FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPokemonTower5FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPokemonTower6FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPokemonTower7FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRocketHideoutB1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRocketHideoutB2FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRocketHideoutB3FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRocketHideoutB4FCurScript: :
2013-12-08 14:48:17 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wRoute6GateCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute8GateCurScript: :
2013-12-08 14:48:17 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wCinnabarIslandCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPokemonMansion1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wPokemonMansion2FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPokemonMansion3FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPokemonMansionB1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wVictoryRoad2FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wVictoryRoad3FCurScript: :
2013-12-08 14:48:17 -05:00
ds 2
2020-06-27 23:03:39 -04:00
wFightingDojoCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSilphCo2FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSilphCo3FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSilphCo4FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSilphCo5FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSilphCo6FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSilphCo7FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSilphCo8FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSilphCo9FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wHallOfFameCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wChampionsRoomCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wLoreleisRoomCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wBrunosRoomCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wAgathasRoomCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wCeruleanCaveB1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wVictoryRoad1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wLancesRoomCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 4
2020-06-27 23:03:39 -04:00
wSilphCo10FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSilphCo11FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wFuchsiaGymCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSaffronGymCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wCinnabarGymCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wGameCornerCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute16Gate1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wBillsHouseCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute5GateCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPowerPlantCurScript: :
wRoute7GateCurScript: :
2013-12-08 14:48:17 -05:00
; overload
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wSSAnne2FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSeafoamIslandsB3FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute23CurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wSeafoamIslandsB4FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wRoute18Gate1FCurScript: :
2013-12-08 14:48:17 -05:00
ds 1
2015-08-09 23:56:20 -05:00
ds 78
wGameProgressFlagsEnd: :
ds 56
2014-05-26 14:04:56 -07:00
2015-07-18 20:49:52 -07:00
wObtainedHiddenItemsFlags: :
ds 14
wObtainedHiddenCoinsFlags: :
ds 2
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wWalkBikeSurfState: :
2014-09-13 00:50:56 -07:00
; $00 = walking
; $01 = biking
; $02 = surfing
ds 1
ds 10
2013-12-08 14:48:17 -05:00
2020-06-27 23:03:39 -04:00
wTownVisitedFlag: :
2014-05-26 14:04:56 -07:00
flag_array 13
2013-12-08 14:48:17 -05:00
2020-06-27 23:03:39 -04:00
wSafariSteps: :
2013-12-08 14:48:17 -05:00
; starts at 502
ds 2
2020-06-27 23:03:39 -04:00
wFossilItem: :
2013-12-08 14:48:17 -05:00
; item given to cinnabar lab
ds 1
2020-06-27 23:03:39 -04:00
wFossilMon: :
2013-12-08 14:48:17 -05:00
; mon that will result from the item
ds 1
ds 2
2020-06-27 23:03:39 -04:00
wEnemyMonOrTrainerClass: :
2019-07-07 00:44:21 -04:00
; trainer classes start at OPP_ID_OFFSET
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayerJumpingYScreenCoordsIndex: :
2014-09-13 00:50:56 -07:00
ds 1
2013-12-08 14:48:17 -05:00
2020-06-27 23:03:39 -04:00
wRivalStarter: :
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wPlayerStarter: :
2013-12-08 14:48:17 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wBoulderSpriteIndex: :
2014-09-13 00:50:56 -07:00
; sprite index of the boulder the player is trying to push
ds 1
2014-04-27 02:44:29 -04:00
2020-06-27 23:03:39 -04:00
wLastBlackoutMap: :
2014-04-27 02:44:29 -04:00
ds 1
2020-06-27 23:03:39 -04:00
wDestinationMap: :
2014-09-13 00:50:56 -07:00
; destination map (for certain types of special warps, not ordinary walking)
ds 1
2020-06-27 23:03:39 -04:00
wUnusedD71B: :
2015-07-25 19:26:54 -07:00
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wTileInFrontOfBoulderAndBoulderCollisionResult: :
2014-09-13 00:50:56 -07: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-27 23:03:39 -04:00
wDungeonWarpDestinationMap: :
2014-09-13 00:50:56 -07:00
; destination map for dungeon warps
ds 1
2020-06-27 23:03:39 -04:00
wWhichDungeonWarp: :
2014-09-13 00:50:56 -07:00
; which dungeon warp within the source map was used
ds 1
2020-06-27 23:03:39 -04:00
wUnusedD71F: :
2015-07-25 19:26:54 -07:00
ds 1
ds 8
2014-09-09 20:55:19 -07:00
2020-06-27 23:03:39 -04:00
wd728: :
2014-09-09 20:55:19 -07:00
; bit 0: using Strength outside of battle
2015-08-29 17:15:05 -07: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
2014-09-09 20:55:19 -07:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wBeatGymFlags: :
2015-08-30 21:38:41 -05:00
; redundant because it matches wObtainedBadges
2015-07-25 19:26:54 -07:00
; used to determine whether to show name on statue and in two NPC text scripts
ds 1
ds 1
2014-09-13 00:50:56 -07:00
2020-06-27 23:03:39 -04:00
wd72c: :
2014-09-13 00:50:56 -07:00
; bit 0: if not set, the 3 minimum steps between random battles have passed
2015-08-29 17:15:05 -07:00
; bit 1: prevent audio fade out
ds 1
2020-06-27 23:03:39 -04:00
wd72d: :
2015-08-29 17:15:05 -07: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-27 23:03:39 -04:00
wd72e: :
2015-08-29 17:15:05 -07: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 00:50:56 -07:00
ds 1
2015-08-29 17:15:05 -07:00
ds 1
2014-09-09 20:55:19 -07:00
2020-06-27 23:03:39 -04:00
wd730: :
2014-09-14 11:29:18 -07: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 04:27:59 -07:00
; bit 7: set if joypad states are being simulated in the overworld or an NPC's movement is being scripted
2014-09-09 20:55:19 -07:00
ds 1
ds 1
2020-06-27 23:03:39 -04:00
wd732: :
2014-09-13 00:50:56 -07: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 15:01:43 -05:00
; 2. does not have the player start in floor two of the player's house (instead sending them to [wLastMap])
2014-09-13 00:50:56 -07: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
2013-12-08 14:58:05 -05:00
2020-06-27 23:03:39 -04:00
wFlags_D733: :
2015-08-13 19:13:47 -07:00
; bit 0: running a test battle
2015-08-29 17:15:05 -07: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-30 21:38:41 -05: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 00:50:56 -07:00
; bit 7: used fly out of battle
2014-05-26 14:04:56 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wBeatLorelei: :
2015-07-21 14:21:14 -07: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
2014-09-09 20:55:19 -07:00
2020-06-27 23:03:39 -04:00
wd736: :
2014-09-09 20:55:19 -07:00
; bit 0: check if the player is standing on a door and make him walk down a step if so
2014-09-14 11:29:18 -07:00
; bit 1: the player is currently stepping down from a door
2014-09-13 00:50:56 -07:00
; bit 2: standing on a warp
2015-07-14 14:32:49 -07:00
; bit 6: jumping down a ledge / fishing animation
2017-06-24 15:01:43 -05:00
; bit 7: player sprite spinning due to spin tiles (Rocket hideout / Viridian Gym)
2014-09-09 20:55:19 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wCompletedInGameTradeFlags: :
2015-02-07 02:43:08 -08:00
ds 2
ds 2
2020-06-27 23:03:39 -04:00
wWarpedFromWhichWarp: :
2015-07-25 19:26:54 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wWarpedFromWhichMap: :
2015-07-25 19:26:54 -07:00
ds 1
ds 2
2014-09-14 11:29:18 -07:00
2020-06-27 23:03:39 -04:00
wCardKeyDoorY: :
2014-09-14 11:29:18 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wCardKeyDoorX: :
2014-09-14 11:29:18 -07:00
ds 1
ds 2
2020-06-27 23:03:39 -04:00
wFirstLockTrashCanIndex: :
2015-07-24 20:27:59 -07:00
ds 1
2020-06-27 23:03:39 -04:00
wSecondLockTrashCanIndex: :
2015-07-24 20:27:59 -07:00
ds 1
2015-07-20 18:32:02 -07:00
2015-07-24 20:27:59 -07:00
ds 2
2020-06-27 23:03:39 -04:00
wEventFlags: :
2015-07-20 18:32:02 -07:00
ds 320
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wLinkEnemyTrainerName: :
2015-02-07 02:43:08 -08:00
; linked game's trainer name
2020-06-27 23:03:39 -04:00
wGrassRate: :
2013-12-08 14:58:05 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wGrassMons: :
2015-08-30 22:04:08 -05:00
;ds 20
ds 11
; Overload wGrassMons
2020-06-27 23:03:39 -04:00
wSerialEnemyDataBlock: :
2015-08-30 22:04:08 -05:00
ds 9
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wEnemyPartyCount: : ds 1
wEnemyPartyMons: : ds PARTY_LENGTH + 1
2013-12-05 01:18:14 -05:00
2015-08-30 22:04:08 -05:00
; Overload enemy party data
2017-09-29 19:16:08 -07:00
UNION
2020-06-27 23:03:39 -04:00
wWaterRate: : db
wWaterMons: : db
2015-08-30 22:04:08 -05:00
2017-09-29 19:16:08 -07:00
NEXTU
2015-09-07 09:42:24 -05:00
2020-06-27 23:03:39 -04:00
wEnemyMons: :
2015-09-07 09:42:24 -05:00
wEnemyMon1: : party_struct wEnemyMon1
2014-06-14 04:12:40 -07:00
wEnemyMon2: : party_struct wEnemyMon2
wEnemyMon3: : party_struct wEnemyMon3
wEnemyMon4: : party_struct wEnemyMon4
wEnemyMon5: : party_struct wEnemyMon5
wEnemyMon6: : party_struct wEnemyMon6
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wEnemyMonOT: : ds NAME_LENGTH * PARTY_LENGTH
wEnemyMonNicks: : ds NAME_LENGTH * PARTY_LENGTH
2014-05-26 14:04:56 -07:00
2017-09-29 19:16:08 -07:00
ENDU
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wTrainerHeaderPtr: :
2013-12-08 14:58:05 -05:00
ds 2
2013-12-05 01:18:14 -05:00
2014-05-26 14:04:56 -07:00
ds 6
2020-06-27 23:03:39 -04:00
wOpponentAfterWrongAnswer: :
2015-07-25 19:26:54 -07:00
; the trainer the player must face after getting a wrong answer in the Cinnabar
; gym quiz
2020-06-27 23:03:39 -04:00
wUnusedDA38: :
2015-07-25 19:26:54 -07:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wCurMapScript: :
2013-12-05 01:18:14 -05:00
; index of current map script, mostly used as index for function pointer array
2017-06-24 15:01:43 -05:00
; mostly copied from map-specific map script pointer and written back later
2013-12-08 14:58:05 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2016-01-03 14:17:10 -05:00
ds 7
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wPlayTimeHours: :
2016-01-03 14:17:10 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayTimeMaxed: :
2016-01-03 14:17:10 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayTimeMinutes: :
2016-01-03 14:17:10 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayTimeSeconds: :
2013-12-08 14:58:05 -05:00
ds 1
2020-06-27 23:03:39 -04:00
wPlayTimeFrames: :
2013-12-08 14:58:05 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2020-06-27 23:03:39 -04:00
wSafariZoneGameOver: :
2014-09-14 11:29:18 -07:00
ds 1
2013-12-08 14:58:05 -05:00
2020-06-27 23:03:39 -04:00
wNumSafariBalls: :
2013-12-08 14:58:05 -05:00
ds 1
2014-06-14 04:12:40 -07:00
2020-06-27 23:03:39 -04:00
wDayCareInUse: :
2014-01-05 18:24:01 -06:00
; 0 if no pokemon is in the daycare
; 1 if pokemon is in the daycare
ds 1
2020-06-27 23:03:39 -04:00
wDayCareMonName: : ds NAME_LENGTH
wDayCareMonOT: : ds NAME_LENGTH
2014-05-26 14:04:56 -07:00
2020-06-27 23:03:39 -04:00
wDayCareMon: : box_struct wDayCareMon
2013-12-08 14:58:05 -05:00
2015-08-10 23:03:31 -05:00
wMainDataEnd: :
wBoxDataStart: :
2013-12-08 14:58:05 -05:00
2020-06-27 23:03:39 -04:00
wNumInBox: : ds 1
2014-06-14 04:12:40 -07:00
wBoxSpecies: : ds MONS_PER_BOX + 1
2013-12-08 14:58:05 -05:00
2014-06-14 04:12:40 -07:00
wBoxMons: :
2020-06-27 23:03:39 -04:00
wBoxMon1: : box_struct wBoxMon1
wBoxMon2: : ds box_struct_length * ( MONS_PER_BOX + - 1 )
2014-01-05 18:24:01 -06:00
2020-06-27 23:03:39 -04:00
wBoxMonOT: : ds NAME_LENGTH * MONS_PER_BOX
wBoxMonNicks: : ds NAME_LENGTH * MONS_PER_BOX
wBoxMonNicksEnd: :
2013-12-05 01:18:14 -05:00
2015-08-10 23:03:31 -05:00
wBoxDataEnd: :
2014-05-23 15:34:35 -07:00
2018-11-18 18:29:24 -05:00
SECTION "Stack" , WRAM0
2020-06-27 23:03:39 -04:00
wStack: :
2014-05-26 14:04:56 -07:00
2015-04-26 12:05:25 -04:00
INCLUDE "sram.asm"