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
2015-08-08 22:32:44 -07:00
wUnusedC000: : ; c000
ds 1
wSoundID: : ; c001
ds 1
wMuteAudioAndPauseMusic: : ; c002
; 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
wDisableChannelOutputWhenSfxEnds: : ; c003
ds 1
wStereoPanning: : ; c004
ds 1
wSavedVolume: : ; c005
ds 1
wChannelCommandPointers: : ; c006
ds 16
wChannelReturnAddresses: : ; c016
ds 16
wChannelSoundIDs: : ; c026
ds 8
wChannelFlags1: : ; c02e
ds 8
wChannelFlags2: : ; c036
ds 8
wChannelDuties: : ; c03e
ds 8
wChannelDutyCycles: : ; c046
ds 8
wChannelVibratoDelayCounters: : ; c04e
; reloaded at the beginning of a note. counts down until the vibrato begins.
ds 8
wChannelVibratoExtents: : ; c056
ds 8
wChannelVibratoRates: : ; c05e
; high nybble is rate (counter reload value) and low nybble is counter.
; time between applications of vibrato.
ds 8
wChannelFrequencyLowBytes: : ; c066
ds 8
wChannelVibratoDelayCounterReloadValues: : ; c06e
; delay of the beginning of the vibrato from the start of the note
ds 8
wChannelPitchBendLengthModifiers: : ; c076
ds 8
wChannelPitchBendFrequencySteps: : ; c07e
ds 8
wChannelPitchBendFrequencyStepsFractionalPart: : ; c086
ds 8
wChannelPitchBendCurrentFrequencyFractionalPart: : ; c08e
ds 8
wChannelPitchBendCurrentFrequencyHighBytes: : ; c096
ds 8
wChannelPitchBendCurrentFrequencyLowBytes: : ; c09e
ds 8
wChannelPitchBendTargetFrequencyHighBytes: : ; c0a6
ds 8
wChannelPitchBendTargetFrequencyLowBytes: : ; c0ae
ds 8
wChannelNoteDelayCounters: : ; c0b6
; 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
wChannelLoopCounters: : ; c0be
ds 8
wChannelNoteSpeeds: : ; c0c6
ds 8
wChannelNoteDelayCountersFractionalPart: : ; c0ce
ds 8
wChannelOctaves: : ; c0d6
ds 8
wChannelVolumes: : ; c0de
; also includes fade for hardware channels that support it
ds 8
wMusicWaveInstrument: :
ds 1
wSfxWaveInstrument: :
ds 1
wMusicTempo: : ; c0e8
ds 2
wSfxTempo: : ; c0ea
ds 2
wSfxHeaderPointer: : ; c0ec
ds 2
wNewSoundID: : ; c0ee
ds 1
wAudioROMBank: : ; c0ef
ds 1
wAudioSavedROMBank: : ; c0f0
ds 1
wFrequencyModifier: : ; c0f1
ds 1
wTempoModifier: : ; c0f2
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: :
2014-01-27 16:22:41 -05:00
wSpriteStateData1: : ; c100
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
2014-01-27 16:22:41 -05:00
wSpriteStateData2: : ; c200
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
2014-01-27 16:22:41 -05:00
wOAMBuffer: : ; c300
2013-12-05 01:18:14 -05:00
; buffer for OAM data. Copied to OAM by DMA
ds 4 * 40
2014-01-27 16:22:41 -05:00
wTileMap: : ; c3a0
2013-12-05 01:18:14 -05:00
; buffer for tiles that are visible on screen (20 columns by 18 rows)
ds 20 * 18
2015-02-07 02:43:08 -08:00
wSerialPartyMonsPatchList: : ; c508
; list of indexes to patch with SERIAL_NO_DATA_BYTE after transfer
2014-01-27 16:22:41 -05:00
wTileMapBackup: : ; c508
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
2015-02-07 02:43:08 -08:00
wSerialEnemyMonsPatchList: : ; c5d0
; 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: :
wOverworldMap: : ; c6e8
ds 1300
2013-12-05 01:18:14 -05:00
2015-08-14 02:46:12 -07:00
wRedrawRowOrColumnSrcTiles: : ; cbfc
; 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)
2014-01-27 16:22:41 -05:00
wTopMenuItemY: : ; cc24
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wTopMenuItemX: : ; cc25
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wCurrentMenuItem: : ; cc26
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
2014-01-27 16:22:41 -05:00
wTileBehindCursor: : ; cc27
2013-12-05 01:18:14 -05:00
; the tile that was behind the menu cursor's current location
ds 1
2014-01-27 16:22:41 -05:00
wMaxMenuItem: : ; cc28
2013-12-05 01:18:14 -05:00
; id of the bottom menu item
ds 1
2014-01-27 16:22:41 -05:00
wMenuWatchedKeys: : ; cc29
2013-12-05 01:18:14 -05:00
; bit mask of keys that the menu will respond to
ds 1
2014-01-27 16:22:41 -05:00
wLastMenuItem: : ; cc2a
2013-12-05 01:18:14 -05:00
; id of previously selected menu item
ds 1
2015-07-15 20:04:58 -07:00
wPartyAndBillsPCSavedMenuItem: : ; cc2b
; 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
wBagSavedMenuItem: : ; cc2c
; It is used by the bag list to remember the cursor position while the menu
; isn't active.
ds 1
wBattleAndStartSavedMenuItem: : ; cc2d
; 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
2014-01-27 16:22:41 -05:00
wPlayerMoveListIndex: : ; cc2e
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wPlayerMonNumber: : ; cc2f
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
2014-01-27 16:22:41 -05:00
wMenuCursorLocation: : ; cc30
2013-12-05 01:18:14 -05:00
; the address of the menu cursor's current location within wTileMap
ds 2
ds 2
2014-01-27 16:22:41 -05:00
wMenuJoypadPollCount: : ; cc34
2013-12-05 01:18:14 -05:00
; how many times should HandleMenuInput poll the joypad state before it returns?
ds 1
2014-08-08 22:39:13 -07:00
wMenuItemToSwap: : ; cc35
; 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
2014-01-27 16:22:41 -05:00
wListScrollOffset: : ; cc36
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
2015-07-13 00:32:03 -07:00
wMenuWatchMovingOutOfBounds: : ; cc37
; 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
wTradeCenterPointerTableIndex: : ; cc38
ds 1
ds 1
2016-09-11 02:01:37 -07:00
wTextDest: : ; cc3a
; 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
wDoNotWaitForButtonPressAfterDisplayingText: : ; cc3c
; if non-zero, skip waiting for a button press after displaying text in DisplayTextID
ds 1
2015-02-07 02:43:08 -08:00
wSerialSyncAndExchangeNybbleReceiveData: : ; cc3d
; the final received nybble is stored here by Serial_SyncAndExchangeNybble
wSerialExchangeNybbleTempReceiveData: : ; cc3d
; temporary nybble used by Serial_ExchangeNybble
wLinkMenuSelectionReceiveBuffer: : ; cc3d
; 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
wSerialExchangeNybbleReceiveData: : ; cc3e
; the final received nybble is stored here by Serial_ExchangeNybble
ds 1
ds 3
wSerialExchangeNybbleSendData: : ; cc42
; this nybble is sent when using Serial_SyncAndExchangeNybble or Serial_ExchangeNybble
wLinkMenuSelectionSendBuffer: : ; cc42
; two byte buffer
; the menu selection byte is stored twice before sending
ds 5
wLinkTimeoutCounter: : ; cc47
; 1 byte
wUnknownSerialCounter: : ; cc47
; 2 bytes
2015-07-25 19:26:54 -07:00
wEnteringCableClub: : ; cc47
ds 1
ds 1
2015-02-07 02:43:08 -08:00
wWhichTradeMonSelectionMenu: : ; cc49
; $00 = player mons
; $01 = enemy mons
2015-07-15 20:04:58 -07:00
wMonDataLocation: : ; cc49
; 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
2014-01-27 16:22:41 -05:00
wMenuWrappingEnabled: : ; cc4a
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
2015-07-24 20:27:59 -07:00
wCheckFor180DegreeTurn: : ; cc4b
; whether to check for 180-degree turn (0 = don't, 1 = do)
ds 1
ds 1
wMissableObjectIndex: : ; cc4d
ds 1
2014-05-23 15:11:09 -07:00
wPredefID: : ; cc4e
ds 1
wPredefRegisters: : ; cc4f
ds 6
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
wTrainerHeaderFlagBit: : ; cc55
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
2014-09-09 20:55:19 -07:00
wNPCMovementScriptPointerTableNum: : ; cc57
; which NPC movement script pointer is being used
; 0 if an NPC movement script is not running
ds 1
wNPCMovementScriptBank: : ; cc58
; ROM bank of current NPC movement script
ds 1
ds 2
2014-06-14 14:24:35 -07:00
2015-08-12 22:14:31 -07:00
wUnusedCC5B: : ; cc5b
wVermilionDockTileMapBuffer: : ; cc5b
; 180 bytes
wOaksAideRewardItemName: : ; cc5b
wDexRatingNumMonsSeen: : ; cc5b
wFilteredBagItems: : ; cc5b
; List of bag items that has been filtered to a certain type of items,
; such as drinks or fossils.
wElevatorWarpMaps: : ; cc5b
wMonPartySpritesSavedOAM: : ; cc5b
; Saved copy of OAM for the first frame of the animation to make it easy to
; flip back from the second frame.
; $60 bytes
2015-08-12 02:16:56 -07:00
wTrainerCardBlkPacket: : ; cc5b
; $40 bytes
2015-07-13 13:35:35 -07:00
wSlotMachineSevenAndBarModeChance: : ; cc5b
; 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.
2014-06-14 14:24:35 -07:00
wHallOfFame: : ; cc5b
2015-03-31 20:28:42 +02:00
wBoostExpByExpAll: : ; cc5b
2015-03-31 21:09:43 +02:00
wAnimationType: : ; cc5b
; values between 0-6. Shake screen horizontally, shake screen vertically, blink Pokemon...
2015-07-15 04:27:59 -07:00
wNPCMovementDirections: : ; cc5b
2015-08-12 22:14:31 -07:00
ds 1
2015-07-15 04:27:59 -07:00
2015-08-12 22:14:31 -07:00
wDexRatingNumMonsOwned: : ; cc5c
ds 1
wDexRatingText: : ; cc5d
ds 1
2015-07-13 13:35:35 -07:00
wSlotMachineSavedROMBank: : ; cc5e
; 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
wAnimPalette: : ; cc79
ds 1
ds 29
2014-09-09 20:55:19 -07:00
wNPCMovementDirections2: : ; cc97
wSwitchPartyMonTempBuffer: : ; cc97
; temporary buffer when swapping party mon data
ds 10
2015-07-15 13:58:21 -07:00
wNumStepsToTake: : ; cca1
; used in Pallet Town scripted movement
ds 49
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
wRLEByteCount: : ; ccd2
2013-12-05 01:18:14 -05:00
ds 1
2015-07-18 20:49:52 -07:00
wAddedToParty: : ; ccd3
; 0 = not added
; 1 = added
2014-09-09 20:55:19 -07:00
wSimulatedJoypadStatesEnd: : ; ccd3
; 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
2015-07-15 20:04:58 -07:00
wParentMenuItem: : ; ccd3
2015-07-18 20:49:52 -07:00
wCanEvolveFlags: : ; ccd3
; 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
2015-07-25 19:26:54 -07:00
wForceEvolution: : ; ccd4
ds 1
2015-03-31 20:40:22 +02:00
; if [ccd5] != 1, the second AI layer is not applied
wAILayer2Encouragement: : ; ccd5
ds 1
ds 1
2013-12-05 01:18:14 -05:00
; current HP of player and enemy substitutes
2014-01-27 16:22:41 -05:00
wPlayerSubstituteHP: : ; ccd7
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wEnemySubstituteHP: : ; ccd8
2013-12-05 01:18:14 -05:00
ds 1
2015-08-13 19:13:47 -07:00
wTestBattlePlayerSelectedMove: : ; ccd9
; 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
2014-01-27 16:22:41 -05:00
wMoveMenuType: : ; ccdb
2013-12-05 01:18:14 -05:00
; 0=regular, 1=mimic, 2=above message box (relearn, heal pp..)
ds 1
2014-01-27 16:22:41 -05:00
wPlayerSelectedMove: : ; ccdc
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wEnemySelectedMove: : ; ccdd
2013-12-05 01:18:14 -05:00
ds 1
2015-02-07 02:43:08 -08:00
wLinkBattleRandomNumberListIndex: : ; ccde
2015-02-03 20:51:53 +01:00
ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
wAICount: : ; ccdf
2013-12-05 01:18:14 -05:00
; number of times remaining that AI action can occur
ds 1
ds 2
2014-01-27 16:22:41 -05:00
wEnemyMoveListIndex: : ; cce2
2013-12-05 01:18:14 -05:00
ds 1
2015-07-23 20:48:35 -07:00
wLastSwitchInEnemyMonHP: : ; cce3
; 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
wTotalPayDayMoney: : ; cce5
; total amount of money made using Pay Day during the current battle
ds 3
wSafariEscapeFactor: : ; cce8
ds 1
wSafariBaitFactor: : ; cce9
ds 1 ;
ds 1
2015-08-14 00:36:06 -07:00
wTransformedEnemyMonOriginalDVs: : ; cceb
ds 2
2015-04-09 01:17:56 +02:00
wMonIsDisobedient: : ds 1 ; cced
2015-05-30 16:09:53 -05:00
wPlayerDisabledMoveNumber: : ds 1 ; ccee
2015-04-09 01:17:56 +02:00
wEnemyDisabledMoveNumber: : ds 1 ; ccef
2015-08-14 00:36:06 -07:00
wInHandlePlayerMonFainted: : ; ccf0
; 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
wPlayerUsedMove: : ds 1 ; ccf1
wEnemyUsedMove: : ds 1 ; ccf2
2015-07-12 15:51:04 -07:00
wEnemyMonMinimized: : ds 1 ; ccf3
2014-08-08 22:39:13 -07:00
2015-04-09 01:17:56 +02:00
wMoveDidntMiss: : ds 1 ; ccf4
wPartyFoughtCurrentEnemyFlags: : ; ccf5
2014-08-08 22:39:13 -07:00
; flags that indicate which party members have fought the current enemy mon
flag_array 6
2015-08-14 00:36:06 -07:00
wLowHealthAlarmDisabled: : ; ccf6
; Whether the low health alarm has been disabled due to the player winning the
; battle.
ds 1
wPlayerMonMinimized: : ; ccf7
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
2015-07-13 13:35:35 -07:00
wLuckySlotHiddenObjectIndex: : ; cd05
2015-02-07 02:43:08 -08:00
wEnemyNumHits: : ; cd05
; number of hits by enemy in attacks like Double Slap, etc.
wEnemyBideAccumulatedDamage: : ; cd05
; 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
wInGameTradeGiveMonSpecies: : ; cd0f
2015-06-11 17:41:33 -05:00
wPlayerMonUnmodifiedLevel: : ; cd0f
2014-08-08 22:39:13 -07:00
ds 1
2015-02-07 02:43:08 -08:00
wInGameTradeTextPointerTablePointer: : ; cd10
2014-08-08 22:39:13 -07:00
wPlayerMonUnmodifiedMaxHP: : ; cd10
2015-02-07 02:43:08 -08:00
ds 2
wInGameTradeTextPointerTableIndex: : ; cd12
2014-08-08 22:39:13 -07:00
wPlayerMonUnmodifiedAttack: : ; cd12
ds 1
2015-02-07 02:43:08 -08:00
wInGameTradeGiveMonName: : ; cd13
2014-08-08 22:39:13 -07:00
ds 1
wPlayerMonUnmodifiedDefense: : ; cd14
ds 2
wPlayerMonUnmodifiedSpeed: : ; cd16
ds 2
wPlayerMonUnmodifiedSpecial: : ; cd18
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: :
2014-01-27 16:22:41 -05:00
wPlayerMonAttackMod: : ; cd1a
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wPlayerMonDefenseMod: : ; cd1b
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wPlayerMonSpeedMod: : ; cd1c
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wPlayerMonSpecialMod: : ; cd1d
2013-12-05 01:18:14 -05:00
ds 1
2015-02-07 02:43:08 -08:00
wInGameTradeReceiveMonName: : ; cd1e
2014-01-27 16:22:41 -05:00
wPlayerMonAccuracyMod: : ; cd1e
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wPlayerMonEvasionMod: : ; cd1f
2013-12-05 01:18:14 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 3
2014-08-08 22:39:13 -07:00
wEnemyMonUnmodifiedLevel: : ; cd23
ds 1
wEnemyMonUnmodifiedMaxHP: : ; cd24
ds 2
wEnemyMonUnmodifiedAttack: : ; cd26
ds 2
wEnemyMonUnmodifiedDefense: : ; cd28
ds 1
2015-02-07 02:43:08 -08:00
wInGameTradeMonNick: : ; cd29
2014-08-08 22:39:13 -07:00
ds 1
2015-02-07 02:43:08 -08:00
2014-08-08 22:39:13 -07:00
wEnemyMonUnmodifiedSpeed: : ; cd2a
ds 2
wEnemyMonUnmodifiedSpecial: : ; cd2c
ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
wEngagedTrainerClass: : ; cd2d
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wEngagedTrainerSet: : ; cd2e
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: :
2014-01-27 16:22:41 -05:00
wEnemyMonAttackMod: : ; cd2e
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wEnemyMonDefenseMod: : ; cd2f
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wEnemyMonSpeedMod: : ; cd30
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wEnemyMonSpecialMod: : ; cd31
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wEnemyMonAccuracyMod: : ; cd32
2013-12-05 01:18:14 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wEnemyMonEvasionMod: : ; cd33
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
wNPCMovementDirections2Index: : ; cd37
2015-08-12 22:14:31 -07:00
wUnusedCD37: : ; cd37
wFilteredBagItemsCount: : ; cd37
; number of items in wFilteredBagItems list
ds 1
2014-09-09 20:55:19 -07:00
wSimulatedJoypadStatesIndex: : ; cd38
; the next simulated joypad state is at wSimulatedJoypadStatesEnd plus this value minus 1
; 0 if the joypad state is not being simulated
ds 1
wWastedByteCD39: : ; cd39
; written to but nothing ever reads it
ds 1
wWastedByteCD3A: : ; cd3a
; written to but nothing ever reads it
ds 1
wOverrideSimulatedJoypadStatesMask: : ; cd3b
; 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
2015-07-24 14:39:45 -07:00
wFallingObjectsMovementData: : ; cd3d
; up to 20 bytes (one byte for each falling object)
wSavedY: : ; cd3d
wTempSCX: : ; cd3d
2015-07-23 06:07:12 -07:00
wBattleTransitionCircleScreenQuadrantY: : ; cd3d
; 0 = upper half (Y < 9)
; 1 = lower half (Y >= 9)
wBattleTransitionCopyTilesOffset: : ; cd3d
; 2 bytes
; after 1 row/column has been copied, the offset to the next one to copy from
wInwardSpiralUpdateScreenCounter: : ; cd3d
; 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
2015-07-18 20:49:52 -07:00
wHoFTeamIndex: : ; cd3d
wSSAnneSmokeDriftAmount: : ; cd3d
; multiplied by 16 to get the number of times to go right by 2 pixels
wRivalStarterTemp: : ; cd3d
wBoxMonCounts: : ; cd3d
; 12 bytes
; array of the number of mons in each box
wDexMaxSeenMon: : ; cd3d
wPPRestoreItem: : ; cd3d
wWereAnyMonsAsleep: : ; cd3d
wCanPlaySlots: : ; cd3d
wNumShakes: : ; cd3d
wDayCareStartLevel: : ; cd3d
; the level of the mon at the time it entered day care
2015-07-18 08:17:29 -07:00
wWhichBadge: : ; cd3d
2015-07-18 20:49:52 -07:00
wPriceTemp: : ; cd3d
2015-07-18 08:17:29 -07:00
; 3-byte BCD number
2015-07-17 00:16:27 -07:00
wTitleMonSpecies: : ; cd3d
wPlayerCharacterOAMTile: : ; cd3d
2015-07-16 22:08:34 -07:00
wMoveDownSmallStarsOAMCount: : ; cd3d
; the number of small stars OAM entries to move down
2015-07-15 20:04:58 -07:00
wChargeMoveNum: : ; cd3d
wCoordIndex: : ; cd3d
wOptionsTextSpeedCursorX: : ; cd3d
wBoxNumString: : ; cd3d
wTrainerInfoTextBoxWidthPlus1: : ; cd3d
wSwappedMenuItem: : ; cd3d
2015-07-14 19:46:52 -07:00
wHoFMonSpecies: : ; cd3d
2015-07-14 15:48:34 -07:00
wFieldMoves: : ; cd3d
; 4 bytes
; the current mon's field moves
2015-07-14 14:32:49 -07:00
wBadgeNumberTile: : ; cd3d
; tile ID of the badge number being drawn
wRodResponse: : ; cd3d
; 0 = no bite
; 1 = bite
; 2 = no fish on map
2015-07-13 19:24:07 -07:00
wWhichTownMapLocation: : ; cd3d
2015-07-13 13:35:35 -07:00
wStoppingWhichSlotMachineWheel: : ; cd3d
; which wheel the player is trying to stop
; 0 = none, 1 = wheel 1, 2 = wheel 2, 3 or greater = wheel 3
2015-02-07 02:43:08 -08:00
wTradedPlayerMonSpecies: : ; cd3d
wTradingWhichPlayerMon: : ; cd3d
2014-09-14 11:29:18 -07:00
wChangeBoxSavedMapTextPointer: : ; cd3d
2014-09-13 00:50:56 -07:00
wFlyAnimUsingCoordList: : ; cd3d
wPlayerSpinInPlaceAnimFrameDelay: : ; cd3d
wPlayerSpinWhileMovingUpOrDownAnimDeltaY: : ; cd3d
2014-09-14 11:29:18 -07:00
wHiddenObjectFunctionArgument: : ; cd3d
2014-01-27 16:22:41 -05:00
wWhichTrade: : ; cd3d
2013-12-05 01:18:14 -05:00
; which entry from TradeMons to select
2014-01-27 16:22:41 -05:00
wTrainerSpriteOffset: : ; cd3d
2015-07-19 14:01:08 -07:00
wUnusedCD3D: : ; cd3d
2013-12-05 01:18:14 -05:00
ds 1
2014-09-13 00:50:56 -07:00
2015-07-23 06:07:12 -07:00
wHUDPokeballGfxOffsetX: : ; cd3e
; difference in X between the next ball and the current one
wBattleTransitionCircleScreenQuadrantX: : ; cd3e
; 0 = left half (X < 10)
; 1 = right half (X >= 10)
2015-07-18 20:49:52 -07:00
wSSAnneSmokeX: : ; cd3e
wRivalStarterBallSpriteIndex: : ; cd3e
wDayCareNumLevelsGrown: : ; cd3e
2015-07-15 20:04:58 -07:00
wOptionsBattleAnimCursorX: : ; cd3e
wTrainerInfoTextBoxWidth: : ; cd3e
2015-07-14 19:46:52 -07:00
wHoFPartyMonIndex: : ; cd3e
wNumCreditsMonsDisplayed: : ; cd3e
; the number of credits mons that have been displayed so far
2015-07-14 14:32:49 -07:00
wBadgeNameTile: : ; cd3e
; first tile ID of the name being drawn
2015-07-13 19:24:07 -07:00
wFlyLocationsList: : ; cd3e
; 11 bytes plus $ff sentinel values at each end
2015-07-13 13:35:35 -07:00
wSlotMachineWheel1Offset: : ; cd3e
2015-02-07 02:43:08 -08:00
wTradedEnemyMonSpecies: : ; cd3e
wTradingWhichEnemyMon: : ; cd3e
2014-09-13 00:50:56 -07:00
wFlyAnimCounter: : ; cd3e
wPlayerSpinInPlaceAnimFrameDelayDelta: : ; cd3e
wPlayerSpinWhileMovingUpOrDownAnimMaxY: : ; cd3e
2014-09-14 11:29:18 -07:00
wHiddenObjectFunctionRomBank: : ; cd3e
2014-01-27 16:22:41 -05:00
wTrainerEngageDistance: : ; cd3e
2013-12-05 01:18:14 -05:00
ds 1
2014-09-13 00:50:56 -07:00
2015-07-23 06:07:12 -07:00
wHUDGraphicsTiles: : ; cd3f
; 3 bytes
wDayCareTotalCost: : ; cd3f
; 2-byte BCD number
2015-07-18 20:49:52 -07:00
wJigglypuffFacingDirections: : ; cd3f
2015-07-15 20:04:58 -07:00
wOptionsBattleStyleCursorX: : ; cd3f
wTrainerInfoTextBoxNextRowOffset: : ; cd3f
2015-07-14 19:46:52 -07:00
wHoFMonLevel: : ; cd3f
2015-07-14 14:32:49 -07:00
wBadgeOrFaceTiles: : ; cd3f
; 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
2015-07-13 13:35:35 -07:00
wSlotMachineWheel2Offset: : ; cd3f
2015-02-07 02:43:08 -08:00
wNameOfPlayerMonToBeTraded: : ; cd3f
2014-09-13 00:50:56 -07:00
wFlyAnimBirdSpriteImageIndex: : ; cd3f
wPlayerSpinInPlaceAnimFrameDelayEndValue: : ; cd3f
wPlayerSpinWhileMovingUpOrDownAnimFrameDelay: : ; cd3f
2014-09-14 11:29:18 -07:00
wHiddenObjectIndex: : ; cd3f
2014-01-27 16:22:41 -05:00
wTrainerFacingDirection: : ; cd3f
2013-12-05 01:18:14 -05:00
ds 1
2014-09-13 00:50:56 -07:00
2015-07-14 19:46:52 -07:00
wHoFMonOrPlayer: : ; cd40
; show mon or show player?
; 0 = mon
; 1 = player
2015-07-13 13:35:35 -07:00
wSlotMachineWheel3Offset: : ; cd40
2014-09-13 00:50:56 -07:00
wPlayerSpinInPlaceAnimSoundID: : ; cd40
2014-09-14 11:29:18 -07:00
wHiddenObjectY: : ; cd40
2014-01-27 16:22:41 -05:00
wTrainerScreenY: : ; cd40
2015-07-23 06:07:12 -07:00
wUnusedCD40: : ; cd40
2013-12-05 01:18:14 -05:00
ds 1
2014-09-14 11:29:18 -07:00
2015-07-23 06:07:12 -07:00
wDayCarePerLevelCost: : ; cd41
; 2-byte BCD number (always set to $0100)
2015-07-18 20:49:52 -07:00
wHoFTeamIndex2: : ; cd41
wHiddenItemOrCoinsIndex: : ; cd41
2015-02-07 02:43:08 -08:00
wTradedPlayerMonOT: : ; cd41
wHiddenObjectX: : ; cd41
2014-09-14 11:29:18 -07:00
2015-07-14 15:48:34 -07:00
wSlotMachineWinningSymbol: : ; cd41
2015-07-13 13:35:35 -07:00
; the OAM tile number of the upper left corner of the winning symbol minus 2
2015-07-14 15:48:34 -07:00
wNumFieldMoves: : ; cd41
2015-07-13 13:35:35 -07:00
wSlotMachineWheel1BottomTile: : ; cd41
2014-01-27 16:22:41 -05:00
wTrainerScreenX: : ; cd41
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
2015-07-14 19:46:52 -07:00
wHoFTeamNo: : ; cd42
2015-07-13 13:35:35 -07:00
wSlotMachineWheel1MiddleTile: : ; cd42
2015-07-14 15:48:34 -07:00
wFieldMovesLeftmostXCoord: : ; cd42
2015-07-23 06:07:12 -07:00
ds 1
2015-07-13 13:35:35 -07:00
2015-07-14 15:48:34 -07:00
wLastFieldMoveID: : ; cd43
; unused
2015-07-13 13:35:35 -07:00
2015-07-14 15:48:34 -07:00
wSlotMachineWheel1TopTile: : ; cd43
ds 1
2015-07-13 13:35:35 -07:00
wSlotMachineWheel2BottomTile: : ; cd44
ds 1
wSlotMachineWheel2MiddleTile: : ; cd45
ds 1
wTempCoins1: : ; cd46
; 2 bytes
; temporary variable used to add payout amount to the player's coins
wSlotMachineWheel2TopTile: : ; cd46
ds 1
2015-07-14 14:32:49 -07:00
wBattleTransitionSpiralDirection: : ; cd47
; 0 = outward, 1 = inward
2015-07-13 13:35:35 -07:00
2015-07-14 14:32:49 -07:00
wSlotMachineWheel3BottomTile: : ; cd47
ds 1
2015-07-13 13:35:35 -07:00
wSlotMachineWheel3MiddleTile: : ; cd48
2015-07-14 14:32:49 -07:00
wFacingDirectionList: : ; cd48
; 4 bytes (also, the byte before the start of the list (cd47) is used a temp
; variable when the list is rotated)
; used when spinning the player's sprite
ds 1
2015-07-13 13:35:35 -07:00
wSlotMachineWheel3TopTile: : ; cd49
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
wTempCoins2: : ; cd4a
; 2 bytes
; temporary variable used to subtract the bet amount from the player's coins
wPayoutCoins: : ; cd4a
; 2 bytes
2015-07-14 14:32:49 -07:00
ds 2
2015-02-07 02:43:08 -08:00
wTradedPlayerMonOTID: : ; cd4c
2015-07-13 13:35:35 -07:00
wSlotMachineFlags: : ; cd4c
; 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
wSlotMachineWheel1SlipCounter: : ; cd4d
; wheel 1 can "slip" while this is non-zero
2015-07-14 19:46:52 -07:00
wCutTile: : ; cd4d
; $3d = tree tile
; $52 = grass tile
ds 1
2015-02-07 02:43:08 -08:00
2015-07-13 13:35:35 -07:00
wSlotMachineWheel2SlipCounter: : ; cd4e
; wheel 2 can "slip" while this is non-zero
2015-02-07 02:43:08 -08:00
wTradedEnemyMonOT: : ; cd4e
2015-07-14 14:32:49 -07:00
ds 1
2015-02-07 02:43:08 -08:00
2015-07-14 14:32:49 -07:00
wSavedPlayerScreenY: : ; cd4f
2015-07-13 13:35:35 -07:00
wSlotMachineRerollCounter: : ; cd4f
; 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.
2015-07-14 14:32:49 -07:00
wEmotionBubbleSpriteIndex: : ; cd4f
; the index of the sprite the emotion bubble is to be displayed above
ds 1
wWhichEmotionBubble: : ; cd50
2015-07-13 13:35:35 -07:00
wSlotMachineBet: : ; cd50
; how many coins the player bet on the slot machine (1 to 3)
2015-07-14 14:32:49 -07:00
wSavedPlayerFacingDirection: : ; cd50
wWhichAnimationOffsets: : ; cd50
; 0 = cut animation, 1 = boulder dust animation
ds 9
2015-02-07 02:43:08 -08:00
wTradedEnemyMonOTID: : ; cd59
ds 2
2015-07-24 20:27:59 -07:00
wStandingOnWarpPadOrHole: : ; cd5b
; 0 = neither
; 1 = warp pad
; 2 = hole
2015-07-13 19:24:07 -07:00
wOAMBaseTile: : ; cd5b
2015-07-24 20:27:59 -07:00
wGymTrashCanIndex: : ; cd5b
ds 1
wSymmetricSpriteOAMAttributes: : ; cd5c
ds 1
2015-03-14 15:25:21 -07:00
wMonPartySpriteSpecies: : ; cd5d
ds 1
wLeftGBMonSpecies: : ; cd5e
; in the trade animation, the mon that leaves the left gameboy
ds 1
wRightGBMonSpecies: : ; cd5f
; in the trade animation, the mon that leaves the right gameboy
ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
wFlags_0xcd60: : ; cd60
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
2015-07-14 23:16:06 -07:00
wActionResultOrTookBattleTurn: : ; cd6a
; 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
2014-05-25 10:51:53 -07:00
wJoyIgnore: : ; cd6b
; Set buttons are ignored.
2013-12-05 01:18:14 -05:00
ds 1
2015-07-14 23:16:06 -07:00
wDownscaledMonSize: : ; cd6c
; size of downscaled mon pic used in pokeball entering/exiting animation
; $00 = 5× 5
; $01 = 3× 3
wNumMovesMinusOne: : ; cd6c
; 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
wStatusScreenCurrentPP: : ; cd71
; temp variable used to print a move's current PP on the status screen
ds 1
ds 6
wNormalMaxPPList: : ; cd78
; 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
2015-02-07 02:43:08 -08:00
wSerialOtherGameboyRandomNumberListBlock: : ; cd81
; buffer for transferring the random number list generated by the other gameboy
2014-01-27 16:22:41 -05:00
wTileMapBackup2: : ; cd81
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
2015-07-24 20:27:59 -07:00
wNamingScreenNameLength: : ; cee9
2015-07-18 20:49:52 -07:00
wEvoOldSpecies: : ; cee9
2014-01-27 16:22:41 -05:00
wBuffer: : ; cee9
2014-05-23 15:34:35 -07:00
; Temporary storage area of 30 bytes.
2015-07-13 19:24:07 -07:00
wTownMapCoords: : ; cee9
; lower nybble is x, upper nybble is y
2015-07-18 20:49:52 -07:00
wLearningMovesFromDayCare: : ; cee9
; whether WriteMonMoves is being used to make a mon learn moves from day care
; non-zero if so
2015-07-24 14:39:45 -07:00
wChangeMonPicEnemyTurnSpecies: : ; cee9
2014-01-27 16:22:41 -05:00
wHPBarMaxHP: : ; cee9
2015-07-18 20:49:52 -07:00
ds 1
2015-07-24 20:27:59 -07:00
wNamingScreenSubmitName: : ; ceea
; non-zero when the player has chosen to submit the name
2015-07-24 14:39:45 -07:00
wChangeMonPicPlayerTurnSpecies: : ; ceea
2015-07-18 20:49:52 -07:00
wEvoNewSpecies: : ; ceea
ds 1
2015-07-24 20:27:59 -07:00
wAlphabetCase: : ; ceeb
; 0 = upper case
; 1 = lower case
2015-07-18 20:49:52 -07:00
wEvoMonTileOffset: : ; ceeb
2014-01-27 16:22:41 -05:00
wHPBarOldHP: : ; ceeb
2015-07-18 20:49:52 -07:00
ds 1
wEvoCancelled: : ; ceec
ds 1
2015-07-24 20:27:59 -07:00
wNamingScreenLetter: : ; ceed
2014-01-27 16:22:41 -05:00
wHPBarNewHP: : ; ceed
2013-12-05 01:18:14 -05:00
ds 2
2014-01-27 16:22:41 -05:00
wHPBarDelta: : ; ceef
2013-12-05 01:18:14 -05:00
ds 1
2014-05-26 14:04:56 -07:00
2015-07-24 20:27:59 -07:00
wHPBarTempHP: : ; cef0
ds 2
ds 11
2014-05-26 14:04:56 -07:00
2014-01-27 16:22:41 -05:00
wHPBarHPDifference: : ; cefd
2013-12-05 01:18:14 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 7
2015-07-14 23:16:06 -07:00
wAIItem: : ; cf05
; the item that the AI used
ds 1
wUsedItemOnWhichPokemon: : ; cf05
ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
wAnimSoundID: : ; cf07
2013-12-05 01:18:14 -05:00
; sound ID during battle animations
ds 1
2015-07-14 23:16:06 -07:00
wBankswitchHomeSavedROMBank: : ; cf08
; used as a storage value for the bank to return to after a BankswitchHome (bankswitch in homebank)
ds 1
wBankswitchHomeTemp: : ; cf09
; used as a temp storage value for the bank to switch to
ds 1
2015-07-12 23:00:48 -07:00
wBoughtOrSoldItemInMart: : ; cf0a
; 0 = nothing bought or sold in pokemart
; 1 = bought or sold something in pokemart
; this value is not used for anything
ds 1
2014-08-08 22:39:13 -07:00
wBattleResult: : ; cf0b
; $00 - win
; $01 - lose
; $02 - draw
ds 1
2014-09-13 00:50:56 -07:00
wAutoTextBoxDrawingControl: : ; cf0c
; 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
wTilePlayerStandingOn: : ; cf0e
; used in CheckForTilePairCollisions2 to store the tile the player is on
ds 1
2015-07-17 02:52:25 -05:00
wNPCNumScriptedSteps: : ds 1 ; cf0f
2014-09-09 20:55:19 -07:00
wNPCMovementScriptFunctionNum: : ; cf10
; which script function within the pointer table indicated by
; wNPCMovementScriptPointerTableNum
ds 1
2015-07-14 23:16:06 -07:00
wTextPredefFlag: : ; cf11
; 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
wPredefParentBank: : ; cf12
ds 1
2014-09-13 00:50:56 -07:00
wSpriteIndex: : ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
wCurSpriteMovement2: : ; cf14
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
2014-09-09 20:55:19 -07:00
wNPCMovementScriptSpriteOffset: : ; cf17
; sprite offset of sprite being controlled by NPC movement script
ds 1
2015-07-15 13:58:21 -07:00
wScriptedNPCWalkCounter: : ; cf18
ds 1
ds 1
2014-05-23 15:34:35 -07:00
wGBC: : ; cf1a
ds 1
2014-09-13 00:50:56 -07:00
wOnSGB: : ; cf1b
; if running on SGB, it's 1, else it's 0
ds 1
2015-08-12 02:16:56 -07:00
wDefaultPaletteCommand: : ; cf1c
ds 1
wPlayerHPBarColor: : ; cf1d
wWholeScreenPaletteMonSpecies: : ; cf1d
; species of the mon whose palette is used for the whole screen
ds 1
wEnemyHPBarColor: : ; cf1e
ds 1
; 0: green
; 1: yellow
; 2: red
wPartyMenuHPBarColors: : ; cf1f
ds 6
wStatusScreenHPBarColor: : ; cf25
ds 1
ds 7
2017-03-16 20:47:01 +01:00
wCopyingSGBTileData: : ; cf2d
2015-08-12 02:16:56 -07:00
wWhichPartyMenuHPBar: : ; cf2d
wPalPacket: : ; cf2d
ds 1
wPartyMenuBlkPacket: : ; cf2e
; $30 bytes
ds 29
2015-08-12 22:14:31 -07:00
wExpAmountGained: : ; cf4b
; 2-byte big-endian number
; the total amount of exp a mon gained
wcf4b: : ds 2 ; storage buffer for various strings
2015-03-31 20:28:42 +02:00
wGainBoostedExp: : ; cf4d
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
2014-01-27 16:22:41 -05:00
wGymCityName: : ; cf5f
2015-07-14 23:16:06 -07:00
ds 17
2014-01-27 16:22:41 -05:00
wGymLeaderName: : ; cf70
2015-08-10 23:51:20 -05:00
ds NAME_LENGTH
2015-07-14 23:16:06 -07:00
wItemList: : ; cf7b
ds 16
2014-05-26 14:04:56 -07:00
2015-07-14 23:16:06 -07:00
wListPointer: : ; cf8b
2015-02-07 18:37:40 -08:00
ds 2
2015-08-07 12:39:29 -07:00
wUnusedCF8D: : ; cf8d
; 2 bytes
; used to store pointers, but never read
ds 2
2015-02-07 18:37:40 -08:00
wItemPrices: : ; cf8f
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
2014-01-27 16:22:41 -05:00
wWhichPokemon: : ; cf92
2013-12-05 01:18:14 -05:00
; which pokemon you selected
ds 1
2015-07-12 23:00:48 -07:00
wPrintItemPrices: : ; cf93
; if non-zero, then print item prices when displaying lists
ds 1
2013-12-05 01:18:14 -05:00
2015-02-07 22:18:42 -08:00
wHPBarType: : ; cf94
; type of HP bar
; $00 = enemy HUD in battle
; $01 = player HUD in battle / status screen
; $02 = party menu
2014-01-27 16:22:41 -05:00
wListMenuID: : ; cf94
2013-12-05 01:18:14 -05:00
; ID used by DisplayListMenuID
ds 1
2015-07-12 23:36:56 -07:00
wRemoveMonFromBox: : ; cf95
; if non-zero, RemovePokemon will remove the mon from the current box,
; else it will remove the mon from the party
wMoveMonType: : ; cf95
; 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
wItemQuantity: : ; cf96
ds 1
wMaxItemQuantity: : ; cf97
ds 1
2015-02-07 18:37:40 -08:00
; LoadMonData copies mon data here
wLoadedMon: : party_struct wLoadedMon ; cf98
2015-02-08 18:40:08 -08:00
wFontLoaded: : ; cfc4
; 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
2014-01-27 16:22:41 -05:00
wWalkCounter: : ; cfc5
2013-12-08 04:49:40 -05:00
; walk animation counter
ds 1
2013-12-05 01:18:14 -05:00
2014-09-13 00:50:56 -07:00
wTileInFrontOfPlayer: : ; cfc6
; background tile number in front of the player (either 1 or 2 steps ahead)
ds 1
2013-12-08 04:49:40 -05:00
2015-08-08 22:32:44 -07:00
wAudioFadeOutControl: : ; cfc7
; 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
2015-08-08 22:32:44 -07:00
wAudioFadeOutCounterReloadValue: : ; cfc8
2013-12-08 04:49:40 -05:00
ds 1
2015-08-08 22:32:44 -07:00
wAudioFadeOutCounter: : ; cfc9
ds 1
wLastMusicSoundID: : ; cfca
; 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
wUpdateSpritesEnabled: : ; cfcb
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
2015-08-30 21:38:41 -05:00
wEnemyMoveNum: : ; cfcc
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wEnemyMoveEffect: : ; cfcd
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wEnemyMovePower: : ; cfce
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wEnemyMoveType: : ; cfcf
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wEnemyMoveAccuracy: : ; cfd0
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wEnemyMoveMaxPP: : ; cfd1
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPlayerMoveNum: : ; cfd2
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPlayerMoveEffect: : ; cfd3
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPlayerMovePower: : ; cfd4
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPlayerMoveType: : ; cfd5
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPlayerMoveAccuracy: : ; cfd6
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPlayerMoveMaxPP: : ; cfd7
2013-12-08 04:49:40 -05:00
ds 1
2014-06-14 04:12:40 -07:00
wEnemyMonSpecies2: : ; cfd8
2013-12-08 04:49:40 -05:00
ds 1
2014-06-14 04:12:40 -07:00
wBattleMonSpecies2: : ; cfd9
2013-12-08 04:49:40 -05:00
ds 1
2015-08-10 23:51:20 -05:00
wEnemyMonNick: : ds NAME_LENGTH ; cfda
2013-12-05 01:18:14 -05:00
2018-03-24 13:41:54 -05:00
wEnemyMon: : battle_struct wEnemyMon ; cfe5
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
2015-08-10 23:51:20 -05:00
wBattleMonNick: : ds NAME_LENGTH ; d009
2014-06-14 04:12:40 -07:00
wBattleMon: : battle_struct wBattleMon ; d014
2013-12-08 04:49:40 -05:00
2015-08-30 21:38:41 -05:00
wTrainerClass: : ; d031
2013-12-08 04:49:40 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 1
2015-07-03 14:37:53 -05:00
wTrainerPicPointer: : ; d033
2015-04-09 13:05:57 +02:00
ds 2
ds 1
2015-08-14 00:36:06 -07:00
wTempMoveNameBuffer: : ; d036
wLearnMoveMonName: : ; d036
; The name of the mon that is learning a move.
ds 16
2015-07-24 20:27:59 -07:00
wTrainerBaseMoney: : ; d046
; 2-byte BCD number
; money received after battle = base money × level of highest-level enemy mon
ds 2
wMissableObjectCounter: : ; d048
ds 1
ds 1
2013-12-22 19:05:44 -06:00
2015-08-30 21:38:41 -05:00
wTrainerName: : ; d04a
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
2015-08-30 21:38:41 -05:00
wIsInBattle: : ; d057
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
2014-08-08 22:39:13 -07:00
wPartyGainExpFlags: : ; d058
; 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
2015-08-30 21:38:41 -05:00
wCurOpponent: : ; d059
2013-12-08 04:49:40 -05:00
; in a wild battle, this is the species of pokemon
2015-08-10 11:09:16 -05:00
; in a trainer battle, this is the trainer class + 200
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wBattleType: : ; d05a
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
2015-03-31 20:28:42 +02:00
wDamageMultipliers: : ; d05b
; 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
2015-08-30 21:38:41 -05:00
wLoneAttackNo: : ; d05c
2013-12-08 04:49:40 -05:00
; which entry in LoneAttacks to use
2015-08-30 21:38:41 -05:00
wGymLeaderNo: : ; d05c
2013-12-08 04:49:40 -05:00
; it's actually the same thing as ^
ds 1
2015-08-30 21:38:41 -05:00
wTrainerNo: : ; d05d
2013-12-08 04:49:40 -05:00
; which instance of [youngster, lass, etc] is this?
ds 1
2014-08-08 22:39:13 -07:00
wCriticalHitOrOHKO: : ; d05e
; $00 = normal attack
; $01 = critical hit
; $02 = successful OHKO
; $ff = failed OHKO
ds 1
2013-12-08 04:49:40 -05:00
2015-08-30 21:38:41 -05:00
wMoveMissed: : ; d05f
2013-12-08 04:49:40 -05:00
ds 1
2015-02-08 01:44:41 -08:00
wPlayerStatsToDouble: : ; d060
; always 0
ds 1
wPlayerStatsToHalve: : ; d061
; always 0
ds 1
2013-12-08 04:49:40 -05:00
2015-08-30 21:38:41 -05:00
wPlayerBattleStatus1: : ; d062
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
2015-08-30 21:38:41 -05:00
wPlayerBattleStatus2: : ; d063
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
2015-08-30 21:38:41 -05:00
wPlayerBattleStatus3: : ; d064
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
2015-02-08 01:44:41 -08:00
wEnemyStatsToDouble: : ; d065
; always 0
ds 1
wEnemyStatsToHalve: : ; d066
; always 0
ds 1
2013-12-08 04:49:40 -05:00
2015-08-30 21:38:41 -05:00
wEnemyBattleStatus1: : ; d067
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wEnemyBattleStatus2: : ; d068
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wEnemyBattleStatus3: : ; d069
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
2015-08-30 21:38:41 -05:00
wPlayerConfusedCounter: : ; d06b
2015-01-31 18:26:05 +01:00
ds 1
2013-12-08 04:49:40 -05:00
2015-08-30 21:38:41 -05:00
wPlayerToxicCounter: : ; d06c
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPlayerDisabledMove: : ; d06d
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
2015-04-09 01:17:56 +02:00
wEnemyNumAttacksLeft: : ; d06f
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
2015-08-30 21:38:41 -05:00
wEnemyConfusedCounter: : ; d070
2015-01-31 18:26:05 +01:00
ds 1
2013-12-05 01:18:14 -05:00
2016-06-11 21:30:05 -07:00
wEnemyToxicCounter: : ; d071
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wEnemyDisabledMove: : ; d072
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
2015-02-07 02:43:08 -08:00
wPlayerNumHits: : ; d074
; number of hits by player in attacks like Double Slap, etc.
wPlayerBideAccumulatedDamage: : ; d074
; the amount of damage accumulated by the player while biding (2 bytes)
wUnknownSerialCounter2: : ; d075
; 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
2015-07-24 20:27:59 -07:00
wAmountMoneyWon: : ; d079
; 3-byte BCD number
wObjectToHide: : ; d079
ds 1
wObjectToShow: : ; d07a
ds 1
ds 1
2013-12-05 01:18:14 -05:00
2015-08-29 17:15:05 -07:00
wDefaultMap: : ; d07c
; the map you will start at when the debug bit is set
wMenuItemOffset: : ; d07c
2015-08-30 21:38:41 -05:00
wAnimationID: : ; d07c
2013-12-08 04:49:40 -05:00
; ID number of the current battle animation
ds 1
2015-07-13 15:40:33 -07:00
wNamingScreenType: : ; d07d
wPartyMenuTypeOrMessageID: : ; d07d
wTempTilesetNumTiles: : ; d07d
; temporary storage for the number of tiles in a tileset
ds 1
2015-07-12 23:00:48 -07:00
wSavedListScrollOffset: : ; d07e
; 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
2015-08-30 21:38:41 -05:00
wBaseCoordX: : ; d081
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wBaseCoordY: : ; d082
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
wLowHealthAlarm: : ds 1 ; d083
2013-12-08 04:49:40 -05:00
2015-08-30 21:38:41 -05:00
wFBTileCounter: : ; d084
2013-12-08 04:49:40 -05:00
; counts how many tiles of the current frame block have been drawn
ds 1
2015-07-24 20:27:59 -07:00
wMovingBGTilesCounter2: : ; d085
ds 1
2013-12-08 04:49:40 -05:00
2015-08-30 21:38:41 -05:00
wSubAnimFrameDelay: : ; d086
2013-12-08 04:49:40 -05:00
; duration of each frame of the current subanimation in terms of screen refreshes
ds 1
2015-08-30 21:38:41 -05:00
wSubAnimCounter: : ; d087
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
2015-08-29 17:15:05 -07:00
wSaveFileStatus: : ; d088
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
2015-08-30 21:38:41 -05:00
wNumFBTiles: : ; d089
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
2015-07-24 14:39:45 -07:00
wFlashScreenLongCounter: : ; d08a
wSpiralBallsBaseY: : ; d08a
wFallingObjectMovementByte: : ; d08a
; bits 0-6: index into FallingObjects_DeltaXs array (0 - 8)
; bit 7: direction; 0 = right, 1 = left
wNumShootingBalls: : ; d08a
2015-03-14 15:25:21 -07:00
wTradedMonMovingRight: : ; d08a
; $01 if mon is moving from left gameboy to right gameboy; $00 if vice versa
2015-07-18 20:49:52 -07:00
wOptionsInitialized: : ; d08a
2015-07-24 14:39:45 -07:00
wNewSlotMachineBallTile: : ; d08a
wCoordAdjustmentAmount: : ; d08a
; how much to add to the X/Y coord
wUnusedD08A: : ; d08a
ds 1
wSpiralBallsBaseX: : ; d08b
wNumFallingObjects: : ; d08b
wSlideMonDelay: : ; d08b
2013-12-05 01:18:14 -05:00
2015-07-13 13:35:35 -07:00
wAnimCounter: : ; d08b
; generic counter variable for various animations
2015-03-13 05:33:16 -07:00
2015-08-30 21:38:41 -05:00
wSubAnimTransform: : ; d08b
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
2014-09-14 11:29:18 -07:00
wEndBattleWinTextPointer: : ; d08c
ds 2
wEndBattleLoseTextPointer: : ; d08e
ds 2
2013-12-08 04:49:40 -05:00
ds 2
2014-09-14 11:29:18 -07:00
wEndBattleTextRomBank: : ; d092
2013-12-08 04:49:40 -05:00
ds 1
ds 1
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wSubAnimAddrPtr: : ; d094
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
wSlotMachineAllowMatchesCounter: : ; d096
; 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.
2015-08-30 21:38:41 -05:00
wSubAnimSubEntryAddr: : ; d096
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
2015-07-24 14:39:45 -07:00
wOutwardSpiralTileMapPointer: : ; d09a
ds 1
wPartyMenuAnimMonEnabled: : ; d09b
2014-09-14 11:29:18 -07:00
wTownMapSpriteBlinkingEnabled: : ; d09b
; non-zero when enabled. causes nest locations to blink on and off.
; the town selection cursor will blink regardless of what this value is
2015-07-24 14:39:45 -07:00
wUnusedD09B: : ; d09b
ds 1
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wFBDestAddr: : ; d09c
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
2015-08-30 21:38:41 -05:00
wFBMode: : ; d09e
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
2015-07-24 14:39:45 -07:00
wLinkCableAnimBulgeToggle: : ; d09f
; 0 = small
; 1 = big
wIntroNidorinoBaseTile: : ; d09f
wOutwardSpiralCurrentDirection: : ; d09f
wDropletTile: : ; d09f
2014-09-14 11:29:18 -07:00
wNewTileBlockID: : ; d09f
2015-07-24 14:39:45 -07:00
wWhichBattleAnimTileset: : ; d09f
wSquishMonCurrentDirection: : ; d09f
; 0 = left
; 1 = right
wSlideMonUpBottomRowLeftTile: : ; d09f
; 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
2015-08-30 21:38:41 -05:00
wSpriteCurPosX: : ; d0a1
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wSpriteCurPosY: : ; d0a2
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wSpriteWidth: : ; d0a3
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wSpriteHeight: : ; d0a4
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wSpriteInputCurByte: : ; d0a5
2013-12-08 04:49:40 -05:00
; current input byte
ds 1
2015-08-30 21:38:41 -05:00
wSpriteInputBitCounter: : ; d0a6
2013-12-08 04:49:40 -05:00
; bit offset of last read input bit
ds 1
2015-08-30 21:38:41 -05:00
wSpriteOutputBitOffset: : ; d0a7; 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
2015-08-30 21:38:41 -05:00
wSpriteLoadFlags: : ; d0a8
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
2015-08-30 21:38:41 -05:00
wSpriteUnpackMode: : ; d0a9
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wSpriteFlipped: : ; d0aa
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wSpriteInputPtr: : ; d0ab
2013-12-08 04:49:40 -05:00
; pointer to next input byte
ds 2
2015-08-30 21:38:41 -05:00
wSpriteOutputPtr: : ; d0ad
2013-12-08 04:49:40 -05:00
; pointer to current output byte
ds 2
2015-08-30 21:38:41 -05:00
wSpriteOutputPtrCached: : ; d0af
2013-12-08 04:49:40 -05:00
; used to revert pointer for different bit offsets
ds 2
2015-08-30 21:38:41 -05:00
wSpriteDecodeTable0Ptr: : ; d0b1
2013-12-08 04:49:40 -05:00
; pointer to differential decoding table (assuming initial value 0)
ds 2
2015-08-30 21:38:41 -05:00
wSpriteDecodeTable1Ptr: : ; d0b3
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
2015-02-08 01:44:41 -08:00
wNameListType: : ; d0b6
2013-12-08 04:49:40 -05:00
ds 1
2014-05-23 15:11:09 -07:00
wPredefBank: : ; d0b7
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHeader: : ; d0b8
2015-08-07 12:39:29 -07:00
2015-08-30 21:38:41 -05:00
wMonHIndex: : ; d0b8
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
2015-08-30 21:38:41 -05:00
wMonHBaseStats: : ; d0b9
wMonHBaseHP: : ; d0b9
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHBaseAttack: : ; d0ba
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHBaseDefense: : ; d0bb
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHBaseSpeed: : ; d0bc
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHBaseSpecial: : ; d0bd
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHTypes: : ; d0be
wMonHType1: : ; d0be
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHType2: : ; d0bf
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHCatchRate: : ; d0c0
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHBaseEXP: : ; d0c1
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHSpriteDim: : ; d0c2
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHFrontSprite: : ; d0c3
2013-12-08 04:49:40 -05:00
ds 2
2015-08-30 21:38:41 -05:00
wMonHBackSprite: : ; d0c5
2013-12-08 04:49:40 -05:00
ds 2
2015-08-30 21:38:41 -05:00
wMonHMoves: : ; d0c7
ds NUM_MOVES
2013-12-08 04:49:40 -05:00
2015-08-30 21:38:41 -05:00
wMonHGrowthRate: : ; d0cb
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wMonHLearnset: : ; d0cc
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
2015-07-19 17:52:26 -07:00
wSavedTilesetType: : ; d0d4
; 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
2015-08-30 21:38:41 -05:00
wDamage: : ; d0d7
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
2015-07-03 14:37:53 -05:00
wRepelRemainingSteps: : ; d0db
2015-07-17 02:52:25 -05:00
ds 1
2015-02-08 00:17:03 -08:00
2015-07-03 14:37:53 -05:00
wMoves: : ; d0dc
2015-02-08 00:17:03 -08:00
; list of moves for FormatMovesString
ds 4
wMoveNum: : ; d0e0
ds 1
wMovesString: : ; d0e1
ds 56
2015-07-24 20:27:59 -07:00
wUnusedD119: : ; d119
ds 1
2014-09-13 00:50:56 -07:00
wWalkBikeSurfStateCopy: : ; d11a
; wWalkBikeSurfState is sometimes copied here, but it doesn't seem to be used for anything
ds 1
2015-07-12 23:00:48 -07:00
wInitListType: : ; d11b
; the type of list for InitList to init
ds 1
2015-07-24 20:27:59 -07:00
wCapturedMonSpecies: : ; d11c
; 0 if no mon was captured
ds 1
wFirstMonsNotOutYet: : ; d11d
; 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
2015-08-29 23:21:54 -07:00
wPokeBallCaptureCalcTemp: : ; d11e
2015-08-07 05:20:37 -07:00
; lower nybble: number of shakes
; upper nybble: number of animations to play
wPokeBallAnimData: : ; d11e
wUsingPPUp: : ; d11e
wMaxPP: : ; d11e
; 0 for player, non-zero for enemy
wCalculateWhoseStats: : ; d11e
wTypeEffectiveness: : ; d11e
wMoveType: : ; d11e
2015-08-07 04:24:06 -07:00
wNumSetBits: : ; d11e
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
wForcePlayerToChooseMon: : ; d11f
; 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
2015-07-24 20:27:59 -07:00
wEvolutionOccurred: : ; d121
ds 1
wVBlankSavedROMBank: : ; d122
ds 1
ds 1
wIsKeyItem: : ; d124
2015-07-26 23:34:43 -05:00
ds 1
2015-02-07 02:43:08 -08:00
wTextBoxID: : ; d125
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
2015-08-30 21:38:41 -05:00
wCurEnemyLVL: : ; d127
2013-12-08 04:49:40 -05:00
ds 1
2015-07-12 23:00:48 -07:00
wItemListPointer: : ; d128
; 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
2015-02-07 02:43:08 -08:00
wLinkState: : ; d12b
2013-12-08 04:49:40 -05:00
ds 1
2015-07-12 23:00:48 -07:00
wTwoOptionMenuID: : ; d12c
ds 1
wChosenMenuItem: : ; d12d
; the id of the menu item the player ultimately chose
wOutOfBattleBlackout: : ; d12d
; non-zero when the whole party has fainted due to out-of-battle poison damage
ds 1
wMenuExitMethod: : ; d12e
; 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
2015-07-25 19:26:54 -07:00
wDungeonWarpDataEntrySize: : ; d12f
; the size is always 6, so they didn't need a variable in RAM for this
wWhichPewterGuy: : ; d12f
; 0 = museum guy
; 1 = gym guy
wWhichPrizeWindow: : ; d12f
; there are 3 windows, from 0 to 2
wGymGateTileBlock: : ; d12f
; a horizontal or vertical gate block
ds 1
wSavedSpriteScreenY: : ; d130
ds 1
wSavedSpriteScreenX: : ; d131
ds 1
wSavedSpriteMapY: : ; d132
ds 1
wSavedSpriteMapX: : ; d133
ds 1
ds 5
wWhichPrize: : ; d139
ds 1
2014-09-14 11:29:18 -07:00
wIgnoreInputCounter: : ; d13a
; 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
wStepCounter: : ; d13b
; counts down once every step
ds 1
wNumberOfNoRandomBattleStepsLeft: : ; d13c
; 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
2015-08-30 21:38:41 -05:00
wPrize1: : ; d13d
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPrize2: : ; d13e
2013-12-08 04:49:40 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPrize3: : ; d13f
2013-12-08 04:49:40 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 1
2015-02-07 02:43:08 -08:00
wSerialRandomNumberListBlock: : ; d141
; the first 7 bytes are the preamble
2015-07-25 19:26:54 -07:00
wPrize1Price: : ; d141
ds 2
wPrize2Price: : ; d143
ds 2
wPrize3Price: : ; d145
ds 2
ds 1
2015-02-07 02:43:08 -08:00
wLinkBattleRandomNumberList: : ; d148
; shared list of 9 random numbers, indexed by wLinkBattleRandomNumberListIndex
ds 10
wSerialPlayerDataBlock: : ; d152
; the first 6 bytes are the preamble
2015-07-25 19:26:54 -07:00
wPseudoItemID: : ; d152
; 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
wUnusedD153: : ; d153
ds 1
ds 2
2013-12-08 04:49:40 -05:00
2015-07-25 19:26:54 -07:00
wEvoStoneItemID: : ; d156
ds 1
wSavedNPCMovementDirections2Index: : ; d157
ds 1
2013-12-08 04:49:40 -05:00
2014-06-14 04:12:40 -07:00
wPlayerName: : ; d158
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: :
2014-06-14 04:12:40 -07:00
wPartyCount: : ds 1 ; d163
2014-06-14 14:24:35 -07:00
wPartySpecies: : ds PARTY_LENGTH ; d164
2014-06-14 04:12:40 -07:00
wPartyEnd: : ds 1 ; d16a
2013-12-08 04:49:40 -05:00
2014-06-14 04:12:40 -07:00
wPartyMons: :
wPartyMon1: : party_struct wPartyMon1 ; d16b
wPartyMon2: : party_struct wPartyMon2 ; d197
wPartyMon3: : party_struct wPartyMon3 ; d1c3
wPartyMon4: : party_struct wPartyMon4 ; d1ef
wPartyMon5: : party_struct wPartyMon5 ; d21b
wPartyMon6: : party_struct wPartyMon6 ; d247
2013-12-08 04:49:40 -05:00
2015-08-10 23:51:20 -05:00
wPartyMonOT: : ds NAME_LENGTH * PARTY_LENGTH ; d273
wPartyMonNicks: : ds NAME_LENGTH * PARTY_LENGTH ; d2b5
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
2014-01-27 16:22:41 -05:00
wPokedexOwned: : ; d2f7
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
2014-01-27 16:22:41 -05:00
wPokedexSeen: : ; d30a
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
2014-01-27 16:22:41 -05:00
wNumBagItems: : ; d31d
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wBagItems: : ; d31e
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
2014-01-27 16:22:41 -05:00
wPlayerMoney: : ; d347
2014-05-26 10:05:58 -07:00
ds 3 ; BCD
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wRivalName: : ; d34a
2015-08-10 23:51:20 -05:00
ds NAME_LENGTH
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wOptions: : ; d355
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
2015-08-30 21:38:41 -05:00
wObtainedBadges: : ; d356
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
2015-07-14 19:46:52 -07:00
wLetterPrintingDelayFlags: : ; d358
; 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
2014-01-27 16:22:41 -05:00
wPlayerID: : ; d359
2013-12-08 04:49:40 -05:00
ds 2
2015-08-08 22:32:44 -07:00
wMapMusicSoundID: : ; d35b
ds 1
wMapMusicROMBank: : ; d35c
ds 1
2014-09-13 00:50:56 -07:00
wMapPalOffset: : ; d35d
; 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
2015-08-30 21:38:41 -05:00
wCurMap: : ; d35e
2013-12-08 04:49:40 -05:00
ds 1
2014-09-13 00:50:56 -07:00
wCurrentTileBlockMapViewPointer: : ; d35f
; 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
2015-08-30 21:38:41 -05:00
wYCoord: : ; d361
2013-12-08 14:25:19 -05:00
; player’ s position on the current map
ds 1
2015-08-30 21:38:41 -05:00
wXCoord: : ; d362
2013-12-08 14:25:19 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wYBlockCoord: : ; d363
2013-12-08 14:25:19 -05:00
; player's y position (by block)
ds 1
2015-08-30 21:38:41 -05:00
wXBlockCoord: : ; d364
2014-04-27 02:44:29 -04:00
ds 1
wLastMap: : ; d365
ds 1
2015-07-25 19:26:54 -07:00
wUnusedD366: : ; d366
ds 1
2013-12-08 14:25:19 -05:00
2015-08-30 21:38:41 -05:00
wCurMapTileset: : ; d367
2013-12-08 14:25:19 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wCurMapHeight: : ; d368
2013-12-08 14:25:19 -05:00
; blocks
ds 1
2015-08-30 21:38:41 -05:00
wCurMapWidth: : ; d369
2013-12-08 14:25:19 -05:00
; blocks
ds 1
2015-08-30 21:38:41 -05:00
wMapDataPtr: : ; d36a
2013-12-08 14:25:19 -05:00
ds 2
2015-08-30 21:38:41 -05:00
wMapTextPtr: : ; d36c
2013-12-08 14:25:19 -05:00
ds 2
2015-08-30 21:38:41 -05:00
wMapScriptPtr: : ; d36e
2013-12-08 14:25:19 -05:00
ds 2
2015-08-30 21:38:41 -05:00
wMapConnections: : ; d370
2013-12-08 14:25:19 -05:00
; connection byte
ds 1
2015-08-30 21:38:41 -05:00
wMapConn1Ptr: : ; d371
2014-05-26 14:04:56 -07:00
ds 1
2015-07-18 08:17:29 -07:00
wNorthConnectionStripSrc: : ; d372
ds 2
wNorthConnectionStripDest: : ; d374
ds 2
wNorthConnectionStripWidth: : ; d376
ds 1
wNorthConnectedMapWidth: : ; d377
ds 1
wNorthConnectedMapYAlignment: : ; d378
ds 1
wNorthConnectedMapXAlignment: : ; d379
ds 1
wNorthConnectedMapViewPointer: : ; d37a
ds 2
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wMapConn2Ptr: : ; d37c
2014-05-26 14:04:56 -07:00
ds 1
2015-07-18 08:17:29 -07:00
wSouthConnectionStripSrc: : ; d37d
ds 2
wSouthConnectionStripDest: : ; d37f:
ds 2
wSouthConnectionStripWidth: : ; d381
ds 1
wSouthConnectedMapWidth: : ; d382
ds 1
wSouthConnectedMapYAlignment: : ; d383
ds 1
wSouthConnectedMapXAlignment: : ; d384
ds 1
wSouthConnectedMapViewPointer: : ; d385
ds 2
2013-12-08 14:25:19 -05:00
2015-08-30 21:38:41 -05:00
wMapConn3Ptr: : ; d387
2014-05-26 14:04:56 -07:00
ds 1
2015-07-18 08:17:29 -07:00
wWestConnectionStripSrc: : ; d388
ds 2
wWestConnectionStripDest: : ; d38a
ds 2
wWestConnectionStripHeight: : ; d38c
ds 1
wWestConnectedMapWidth: : ; d38d
ds 1
wWestConnectedMapYAlignment: : ; d38e
ds 1
wWestConnectedMapXAlignment: : ; d38f
ds 1
wWestConnectedMapViewPointer: : ; d390
ds 2
2013-12-08 14:25:19 -05:00
2015-08-30 21:38:41 -05:00
wMapConn4Ptr: : ; d392
2014-05-26 14:04:56 -07:00
ds 1
2015-07-18 08:17:29 -07:00
wEastConnectionStripSrc: : ; d393
ds 2
wEastConnectionStripDest: : ; d395
ds 2
wEastConnectionStripHeight: : ; d397
ds 1
wEastConnectedMapWidth: : ; d398
ds 1
wEastConnectedMapYAlignment: : ; d399
ds 1
wEastConnectedMapXAlignment: : ; d39a
ds 1
wEastConnectedMapViewPointer: : ; d39b
ds 2
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wSpriteSet: : ; d39d
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
2015-08-30 21:38:41 -05:00
wSpriteSetID: : ; d3a8
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
2015-07-19 17:52:26 -07:00
wObjectDataPointerTemp: : ; d3a9
ds 2
ds 2
wMapBackgroundTile: : ; d3ad
; the tile shown outside the boundaries of the map
ds 1
2014-09-13 00:50:56 -07:00
wNumberOfWarps: : ; d3ae
; number of warps in current map
ds 1
wWarpEntries: : ; d3af
; current map warp entries
ds 128
wDestinationWarpID: : ; d42f
; if $ff, the player's coordinates are not updated when entering the map
ds 1
ds 128
2015-07-19 17:52:26 -07:00
wNumSigns: : ; d4b0
; number of signs in the current map (up to 16)
ds 1
wSignCoords: : ; d4b1
; 2 bytes each
; Y, X
ds 32
wSignTextIDs: : ; d4d1
ds 16
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wNumSprites: : ; d4e1
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
wYOffsetSinceLastSpecialWarp: : ; d4e2
ds 1
wXOffsetSinceLastSpecialWarp: : ; d4e3
ds 1
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wMapSpriteData: : ; d4e4
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
2015-08-30 21:38:41 -05:00
wMapSpriteExtraData: : ; d504
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
2015-07-19 17:52:26 -07:00
wCurrentMapHeight2: : ; d524
; map height in 2x2 meta-tiles
ds 1
wCurrentMapWidth2: : ; d525
; map width in 2x2 meta-tiles
ds 1
2014-09-14 11:29:18 -07:00
wMapViewVRAMPointer: : ; d526
; 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.
wPlayerMovingDirection: : ; d528
; 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
wPlayerLastStopDirection: : ; d529
; the direction in which the player was moving before the player last stopped
ds 1
wPlayerDirection: : ; d52a
; 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
2016-06-12 01:06:27 -07:00
wTilesetBank: : ; d52b
2013-12-08 14:25:19 -05:00
ds 1
2016-06-12 01:06:27 -07:00
wTilesetBlocksPtr: : ; d52c
2013-12-08 14:25:19 -05:00
; maps blocks (4x4 tiles) to tiles
ds 2
2016-06-12 01:06:27 -07:00
wTilesetGfxPtr: : ; d52e
2013-12-08 14:25:19 -05:00
ds 2
2016-06-12 01:06:27 -07:00
wTilesetCollisionPtr: : ; d530
2013-12-08 14:25:19 -05:00
; list of all walkable tiles
ds 2
2016-06-12 01:06:27 -07:00
wTilesetTalkingOverTiles: : ; d532
2013-12-08 14:25:19 -05:00
ds 3
2015-08-30 21:38:41 -05:00
wGrassTile: : ; d535
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
2014-01-27 16:22:41 -05:00
wNumBoxItems: : ; d53a
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
wBoxItems: : ; d53b
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
2015-07-15 20:04:58 -07:00
wCurrentBoxNum: : ; d5a0
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
wNumHoFTeams: : ; d5a2
; number of HOF teams
ds 1
2015-07-25 19:26:54 -07:00
wUnusedD5A3: : ; d5a3
ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
wPlayerCoins: : ; d5a4
2014-05-26 10:05:58 -07:00
ds 2 ; BCD
2013-12-08 04:49:40 -05:00
2015-08-30 21:38:41 -05:00
wMissableObjectFlags: : ; d5a6
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
2015-08-30 21:38:41 -05:00
wMissableObjectList: : ; d5ce
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
2015-08-30 21:38:41 -05:00
wGameProgressFlags: : ; d5f0
2013-12-08 14:48:17 -05:00
; $c8 bytes
2015-08-30 21:38:41 -05:00
wOaksLabCurScript: : ; d5f0
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPalletTownCurScript: : ; d5f1
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2015-08-30 21:38:41 -05:00
wBluesHouseCurScript: : ; d5f3
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wViridianCityCurScript: : ; d5f4
2013-12-08 14:48:17 -05:00
ds 1
ds 2
2015-08-30 21:38:41 -05:00
wPewterCityCurScript: : ; d5f7
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute3CurScript: : ; d5f8
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute4CurScript: : ; d5f9
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2015-08-30 21:38:41 -05:00
wViridianGymCurScript: : ; d5fb
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPewterGymCurScript: : ; d5fc
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wCeruleanGymCurScript: : ; d5fd
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wVermilionGymCurScript: : ; d5fe
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wCeladonGymCurScript: : ; d5ff
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute6CurScript: : ; d600
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute8CurScript: : ; d601
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute24CurScript: : ; d602
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute25CurScript: : ; d603
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute9CurScript: : ; d604
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute10CurScript: : ; d605
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wMtMoon1FCurScript: : ; d606
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wMtMoonB2FCurScript: : ; d607
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSSAnne1FRoomsCurScript: : ; d608
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSSAnne2FRoomsCurScript: : ; d609
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute22CurScript: : ; d60a
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2019-01-01 15:06:23 -05:00
wRedsHouse2FCurScript: : ; d60c
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wViridianMartCurScript: : ; d60d
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute22GateCurScript: : ; d60e
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wCeruleanCityCurScript: : ; d60f
2013-12-08 14:48:17 -05:00
ds 1
ds 7
2019-01-01 15:06:23 -05:00
wSSAnneBowCurScript: : ; d617
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wViridianForestCurScript: : ; d618
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wMuseum1FCurScript: : ; d619
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute13CurScript: : ; d61a
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute14CurScript: : ; d61b
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute17CurScript: : ; d61c
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute19CurScript: : ; d61d
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute21CurScript: : ; d61e
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSafariZoneGateCurScript: : ; d61f
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wRockTunnelB1FCurScript: : ; d620
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wRockTunnel1FCurScript: : ; d621
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2015-08-30 21:38:41 -05:00
wRoute11CurScript: : ; d623
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute12CurScript: : ; d624
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute15CurScript: : ; d625
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute16CurScript: : ; d626
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute18CurScript: : ; d627
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute20CurScript: : ; d628
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSSAnneB1FRoomsCurScript: : ; d629
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wVermilionCityCurScript: : ; d62a
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wPokemonTower2FCurScript: : ; d62b
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wPokemonTower3FCurScript: : ; d62c
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wPokemonTower4FCurScript: : ; d62d
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wPokemonTower5FCurScript: : ; d62e
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wPokemonTower6FCurScript: : ; d62f
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wPokemonTower7FCurScript: : ; d630
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wRocketHideoutB1FCurScript: : ; d631
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wRocketHideoutB2FCurScript: : ; d632
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wRocketHideoutB3FCurScript: : ; d633
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wRocketHideoutB4FCurScript: : ; d634
2013-12-08 14:48:17 -05:00
ds 2
2015-08-30 21:38:41 -05:00
wRoute6GateCurScript: : ; d636
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute8GateCurScript: : ; d637
2013-12-08 14:48:17 -05:00
ds 2
2015-08-30 21:38:41 -05:00
wCinnabarIslandCurScript: : ; d639
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wPokemonMansion1FCurScript: : ; d63a
2013-12-08 14:48:17 -05:00
ds 2
2019-01-01 15:06:23 -05:00
wPokemonMansion2FCurScript: : ; d63c
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wPokemonMansion3FCurScript: : ; d63d
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wPokemonMansionB1FCurScript: : ; d63e
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wVictoryRoad2FCurScript: : ; d63f
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wVictoryRoad3FCurScript: : ; d640
2013-12-08 14:48:17 -05:00
ds 2
2015-08-30 21:38:41 -05:00
wFightingDojoCurScript: : ; d642
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSilphCo2FCurScript: : ; d643
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSilphCo3FCurScript: : ; d644
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSilphCo4FCurScript: : ; d645
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSilphCo5FCurScript: : ; d646
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSilphCo6FCurScript: : ; d647
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSilphCo7FCurScript: : ; d648
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSilphCo8FCurScript: : ; d649
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSilphCo9FCurScript: : ; d64a
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wHallOfFameCurScript: : ; d64b
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wChampionsRoomCurScript: : ; d64c
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wLoreleisRoomCurScript: : ; d64d
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wBrunosRoomCurScript: : ; d64e
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wAgathasRoomCurScript: : ; d64f
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wCeruleanCaveB1FCurScript: : ; d650
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wVictoryRoad1FCurScript: : ; d651
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2019-01-01 15:06:23 -05:00
wLancesRoomCurScript: : ; d653
2013-12-08 14:48:17 -05:00
ds 1
ds 4
2019-01-01 15:06:23 -05:00
wSilphCo10FCurScript: : ; d658
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSilphCo11FCurScript: : ; d659
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2015-08-30 21:38:41 -05:00
wFuchsiaGymCurScript: : ; d65b
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wSaffronGymCurScript: : ; d65c
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2015-08-30 21:38:41 -05:00
wCinnabarGymCurScript: : ; d65e
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wGameCornerCurScript: : ; d65f
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wRoute16Gate1FCurScript: : ; d660
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wBillsHouseCurScript: : ; d661
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute5GateCurScript: : ; d662
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPowerPlantCurScript: : ; d663
wRoute7GateCurScript: : ; d663
2013-12-08 14:48:17 -05:00
; overload
ds 1
ds 1
2019-01-01 15:06:23 -05:00
wSSAnne2FCurScript: : ; d665
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSeafoamIslandsB3FCurScript: : ; d666
2013-12-08 14:48:17 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wRoute23CurScript: : ; d667
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wSeafoamIslandsB4FCurScript: : ; d668
2013-12-08 14:48:17 -05:00
ds 1
2019-01-01 15:06:23 -05:00
wRoute18Gate1FCurScript: : ; d669
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
wWalkBikeSurfState: : ; d700
; $00 = walking
; $01 = biking
; $02 = surfing
ds 1
ds 10
2013-12-08 14:48:17 -05:00
2015-08-30 21:38:41 -05:00
wTownVisitedFlag: : ; d70b
2014-05-26 14:04:56 -07:00
flag_array 13
2013-12-08 14:48:17 -05:00
2014-01-27 16:22:41 -05:00
wSafariSteps: : ; d70d
2013-12-08 14:48:17 -05:00
; starts at 502
ds 2
2015-08-30 21:38:41 -05:00
wFossilItem: : ; d70f
2013-12-08 14:48:17 -05:00
; item given to cinnabar lab
ds 1
2015-08-30 21:38:41 -05:00
wFossilMon: : ; d710
2013-12-08 14:48:17 -05:00
; mon that will result from the item
ds 1
ds 2
2015-08-30 21:38:41 -05:00
wEnemyMonOrTrainerClass: : ; d713
2015-08-10 11:09:16 -05:00
; trainer classes start at 200
2013-12-08 14:48:17 -05:00
ds 1
2014-09-13 00:50:56 -07:00
wPlayerJumpingYScreenCoordsIndex: : ; d714
ds 1
2013-12-08 14:48:17 -05:00
2015-08-30 21:38:41 -05:00
wRivalStarter: : ; d715
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2015-08-30 21:38:41 -05:00
wPlayerStarter: : ; d717
2013-12-08 14:48:17 -05:00
ds 1
2014-09-13 00:50:56 -07:00
wBoulderSpriteIndex: : ; d718
; sprite index of the boulder the player is trying to push
ds 1
2014-04-27 02:44:29 -04:00
wLastBlackoutMap: : ; d719
ds 1
2014-09-13 00:50:56 -07:00
wDestinationMap: : ; d71a
; destination map (for certain types of special warps, not ordinary walking)
ds 1
2015-07-25 19:26:54 -07:00
wUnusedD71B: : ; d71b
ds 1
2014-09-13 00:50:56 -07:00
wTileInFrontOfBoulderAndBoulderCollisionResult: : ; d71c
; 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
wDungeonWarpDestinationMap: : ; d71d
; destination map for dungeon warps
ds 1
wWhichDungeonWarp: : ; d71e
; which dungeon warp within the source map was used
ds 1
2015-07-25 19:26:54 -07:00
wUnusedD71F: : ; d71f
ds 1
ds 8
2014-09-09 20:55:19 -07:00
2015-08-29 17:15:05 -07:00
wd728: : ; d728
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
2015-07-25 19:26:54 -07:00
wBeatGymFlags: : ; d72a
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
wd72c: : ; d72c
; 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
wd72d: : ; d72d
; 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
wd72e: : ; d72e
; 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
2015-08-29 17:15:05 -07:00
wd730: : ; d730
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
2014-09-13 00:50:56 -07:00
wd732: : ; d732
; 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
2015-08-30 21:38:41 -05:00
wFlags_D733: : ; 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
2015-07-21 14:21:14 -07:00
wBeatLorelei: : ; d734
; 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
wd736: : ; d736
; 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
2015-02-07 02:43:08 -08:00
wCompletedInGameTradeFlags: : ; d737
ds 2
ds 2
2015-07-25 19:26:54 -07:00
wWarpedFromWhichWarp: : ; d73b
ds 1
wWarpedFromWhichMap: : ; d73c
ds 1
ds 2
2014-09-14 11:29:18 -07:00
wCardKeyDoorY: : ; d73f
ds 1
wCardKeyDoorX: : ; d740
ds 1
ds 2
2015-07-24 20:27:59 -07:00
wFirstLockTrashCanIndex: : ; d743
ds 1
wSecondLockTrashCanIndex: : ; d743
ds 1
2015-07-20 18:32:02 -07:00
2015-07-24 20:27:59 -07:00
ds 2
2015-07-20 18:32:02 -07:00
wEventFlags: : ; d747
ds 320
2013-12-05 01:18:14 -05:00
2015-02-07 02:43:08 -08:00
wLinkEnemyTrainerName: : ; d887
; linked game's trainer name
2015-08-30 21:38:41 -05:00
wGrassRate: : ; d887
2013-12-08 14:58:05 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wGrassMons: : ; d888
2015-08-30 22:04:08 -05:00
;ds 20
ds 11
; Overload wGrassMons
wSerialEnemyDataBlock: : ; d893
ds 9
2013-12-05 01:18:14 -05:00
2014-06-14 04:12:40 -07:00
wEnemyPartyCount: : ds 1 ; d89c
2014-06-14 14:24:35 -07:00
wEnemyPartyMons: : ds PARTY_LENGTH + 1 ; d89d
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
2015-09-07 09:42:24 -05:00
wWaterRate: : db ; d8a4
wWaterMons: : db ; d8a5
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
wEnemyMons: : ; d8a4
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
2015-08-10 23:51:20 -05:00
wEnemyMonOT: : ds NAME_LENGTH * PARTY_LENGTH ; d9ac
wEnemyMonNicks: : ds NAME_LENGTH * PARTY_LENGTH ; d9ee
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
2015-08-30 21:38:41 -05:00
wTrainerHeaderPtr: : ; da30
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
2015-07-25 19:26:54 -07:00
wOpponentAfterWrongAnswer: : ; da38
; the trainer the player must face after getting a wrong answer in the Cinnabar
; gym quiz
wUnusedDA38: : ; da38
ds 1
2013-12-05 01:18:14 -05:00
2015-08-30 21:38:41 -05:00
wCurMapScript: : ; da39
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
2016-01-03 14:17:10 -05:00
wPlayTimeHours: : ; da41
ds 1
wPlayTimeMaxed: : ; da42
ds 1
wPlayTimeMinutes: : ; da43
ds 1
2015-08-30 21:38:41 -05:00
wPlayTimeSeconds: : ; da44
2013-12-08 14:58:05 -05:00
ds 1
2015-08-30 21:38:41 -05:00
wPlayTimeFrames: : ; da45
2013-12-08 14:58:05 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2014-09-14 11:29:18 -07:00
wSafariZoneGameOver: : ; da46
ds 1
2013-12-08 14:58:05 -05:00
2015-08-30 21:38:41 -05:00
wNumSafariBalls: : ; da47
2013-12-08 14:58:05 -05:00
ds 1
2014-06-14 04:12:40 -07:00
2015-08-30 21:38:41 -05:00
wDayCareInUse: : ; da48
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
2015-08-30 21:38:41 -05:00
wDayCareMonName: : ds NAME_LENGTH ; da49
wDayCareMonOT: : ds NAME_LENGTH ; da54
2014-05-26 14:04:56 -07:00
2014-06-14 04:12:40 -07:00
wDayCareMon: : box_struct wDayCareMon ; da5f
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
2015-08-30 21:38:41 -05:00
wNumInBox: : ds 1 ; da80
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: :
wBoxMon1: : box_struct wBoxMon1 ; da96
wBoxMon2: : ds box_struct_length * ( MONS_PER_BOX + - 1 ) ; dab7
2014-01-05 18:24:01 -06:00
2015-08-10 23:51:20 -05:00
wBoxMonOT: : ds NAME_LENGTH * MONS_PER_BOX ; dd2a
wBoxMonNicks: : ds NAME_LENGTH * MONS_PER_BOX ; de06
2014-06-14 04:12:40 -07:00
wBoxMonNicksEnd: : ; dee2
2013-12-05 01:18:14 -05:00
2015-08-10 23:03:31 -05:00
wBoxDataEnd: :
2018-11-18 18:29:24 -05:00
; dee2
2014-05-23 15:34:35 -07:00
2018-11-18 18:29:24 -05:00
SECTION "Stack" , WRAM0
2014-05-23 15:34:35 -07:00
wStack: : ; dfff
2014-05-26 14:04:56 -07:00
2015-04-26 12:05:25 -04:00
INCLUDE "sram.asm"