2013-12-05 01:18:14 -05:00
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
\ 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
\ 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
SECTION "WRAM Bank 0" , WRAM0
2014-05-26 14:04:56 -07:00
wc000: : ds 1
wc001: : ds 1
wc002: : ds 1
wc003: : ds 1
wc004: : ds 1
wc005: : ds 1
wc006: : ds 8
wc00e: : ds 4
wc012: : ds 4
wc016: : ds 16
wc026: : ds 1
wc027: : ds 1
wc028: : ds 2
wc02a: : ds 1
wc02b: : ds 1
wc02c: : ds 1
wc02d: : ds 1
wc02e: : ds 8
wc036: : ds 8
wc03e: : ds 8
wc046: : ds 8
wc04e: : ds 8
wc056: : ds 8
wc05e: : ds 8
wc066: : ds 8
wc06e: : ds 8
wc076: : ds 8
wc07e: : ds 8
wc086: : ds 8
wc08e: : ds 8
wc096: : ds 8
wc09e: : ds 8
wc0a6: : ds 8
wc0ae: : ds 8
wc0b6: : ds 8
wc0be: : ds 8
wc0c6: : ds 8
wc0ce: : ds 1
wc0cf: : ds 1
wc0d0: : ds 1
wc0d1: : ds 1
wc0d2: : ds 1
wc0d3: : ds 1
wc0d4: : ds 1
wc0d5: : ds 1
wc0d6: : ds 8
wc0de: : ds 8
wc0e6: : ds 1
wc0e7: : ds 1
wc0e8: : ds 1
wc0e9: : ds 1
wc0ea: : ds 1
wc0eb: : ds 1
wc0ec: : ds 1
wc0ed: : ds 1
wc0ee: : ds 1
wc0ef: : ds 1
wc0f0: : ds 1
wc0f1: : ds 1
wc0f2: : ds 14
2014-05-26 10:05:58 -07:00
2013-12-05 01:18:14 -05:00
SECTION "Sprite State Data" , WRAM0 [ $ c100 ]
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
ds $ 10 * $ 10
2014-05-26 10:05:58 -07:00
SECTION "Sprite State Data 2" , WRAM0 [ $ c200 ]
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
ds $ 10 * $ 10
2014-05-26 10:05:58 -07:00
SECTION "OAM Buffer" , WRAM0 [ $ c300 ]
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
2014-01-27 16:22:41 -05:00
wScreenEdgeTiles: : ; cbfc
2013-12-05 01:18:14 -05:00
; the tiles of the row or column to be redrawn by RedrawExposedScreenEdge
ds 20 * 2
; 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-05-30 16:09:53 -05:00
; group these 3 addresses together because of an ld a,[hli]
wcc2b: : ds 1 ; used in party menu
wcc2c: : ds 1 ; used in item related menus (inventory, pc)
wcc2d: : ds 1 ; also used in inventory, supposed to save an item id
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
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
2015-05-30 16:09:53 -05:00
; group these two together
wcc3a: : ds 1 ; both used in home/text.asm
2014-05-26 14:04:56 -07:00
wcc3b: : ds 1
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-05-30 16:09:53 -05:00
wcc3d: : ds 1 ; not used for anything other than mentioned above (haha link function)
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-05-30 16:09:53 -05:00
wcc47: : ds 1 ; used in text id stuff
wcc48: : ds 1 ; part of wUnknownSerialCounter
2015-02-07 02:43:08 -08:00
wWhichTradeMonSelectionMenu: : ; cc49
; $00 = player mons
; $01 = enemy mons
2015-05-30 16:09:53 -05:00
wcc49: : ds 1 ; used in some pokemon related stuff (some kind of species storage byte)
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-05-30 16:09:53 -05:00
wcc4b: : ds 2 ; used as a joypad storage value
wcc4d: : ds 1 ; used in sprite hiding/showing related operations
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-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-05-30 16:09:53 -05:00
wcc5b: : ds 1 ; these upcoming values below are miscellaneous storage values
wcc5c: : ds 1 ; used in pokedex evaluation as well
wcc5d: : ds 1 ; used in pokedex evaluation
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
ds 12
2014-06-14 14:24:35 -07:00
2015-05-30 16:09:53 -05:00
wcc6b: : ds 14 ; doesn't seem to be used for anything, probably just more storage
wcc79: : ds 30 ; used in battle animations
2014-09-09 20:55:19 -07:00
wNPCMovementDirections2: : ; cc97
wSwitchPartyMonTempBuffer: : ; cc97
; temporary buffer when swapping party mon data
ds 10
2015-05-30 16:09:53 -05:00
wcca1: : ds 49 ; used in overworld npc movement
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
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-05-30 16:09:53 -05:00
wccd3: : ds 1 ; used in battle, pokemon, PC and game corner stuff
wccd4: : ds 1 ; used in evolving pokemon and has a direct reference for simulated joypad stuff in vermillion and seafoam
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-05-30 16:09:53 -05:00
wccd9: : ds 2 ; used in InitBattleVariablesLoop (written to after the loop is finished)
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-05-30 16:09:53 -05:00
wcce3: : ds 1 ; used in battle-related text functions
wcce4: : ds 1 ; used in battle-related text functions
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-05-30 16:09:53 -05:00
wcceb: : ds 1 ; used to save the dvs of a mon when it uses transform
wccec: : ds 1 ; also used with above case
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-05-30 16:09:53 -05:00
wccf0: : ds 1 ; used as a check if a mon fainted
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-05-30 16:09:53 -05:00
wccf6: : ds 1 ; used in some hp bar thing
2015-07-12 15:51:04 -07:00
wPlayerMonMinimized: : ds 1 ; ccf7
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)
ds 10
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-05-30 16:09:53 -05:00
wcd37: : ds 1 ; used in list menus, like the fossil lab menu or drink girl menu. Also used in link menu.
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-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-10-17 22:47:31 -06:00
wSubtrahend: : ; cd3d
; subtract (BCD) wSubtrahend, wSubtrahend+1, wSubtrahend+2
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
2013-12-05 01:18:14 -05:00
ds 1
2014-09-13 00:50:56 -07:00
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-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
2015-05-30 16:09:53 -05:00
wcd3f: : ; used with daycare text for money amount
2013-12-05 01:18:14 -05:00
ds 1
2014-09-13 00:50:56 -07:00
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
2013-12-05 01:18:14 -05:00
ds 1
2014-09-14 11:29:18 -07:00
2015-02-07 02:43:08 -08:00
wTradedPlayerMonOT: : ; cd41
wHiddenObjectX: : ; cd41
2014-09-14 11:29:18 -07:00
2015-07-13 13:35:35 -07:00
wSlotMachineWinningSymbol: : ; cd42
; the OAM tile number of the upper left corner of the winning symbol minus 2
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-13 13:35:35 -07:00
wSlotMachineWheel1MiddleTile: : ; cd42
2015-05-30 16:09:53 -05:00
wcd42: : ds 1 ; used in pewter center script, printing field mon moves, slot machines and HoF PC
2015-07-13 13:35:35 -07:00
wSlotMachineWheel1TopTile: : ; cd43
2015-05-30 16:09:53 -05:00
wcd43: : ds 1 ; slot machine stuff and GetMonFieldMoves
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
wSlotMachineWheel3BottomTile: : ; cd47
2015-05-30 16:09:53 -05:00
wcd47: : ds 1 ; used in slot machine and spinning player sprite
2015-07-13 13:35:35 -07:00
wSlotMachineWheel3MiddleTile: : ; cd48
2015-05-30 16:09:53 -05:00
wcd48: : ds 1 ; same as above
2015-07-13 13:35:35 -07:00
wSlotMachineWheel3TopTile: : ; cd49
2015-05-30 16:09:53 -05:00
wcd49: : ds 1 ; used in slot machine, displaying the gym leaders/badges on the trainer card, and displaying the town map
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
ds 1
wcd4b: : ; cd4b
; used in player animations
ds 1
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-05-30 16:09:53 -05:00
wcd4d: : ds 1 ; used with cut and slot machine
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-05-30 16:09:53 -05:00
wcd4e: : ds 1 ; used with in-game trades and slot machine
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-05-30 16:09:53 -05:00
wcd4f: : ds 1 ; used with in-game trades, emotion bubbles, and player animations
2015-07-13 13:35:35 -07:00
wSlotMachineBet: : ; cd50
; how many coins the player bet on the slot machine (1 to 3)
2015-05-30 16:09:53 -05:00
wcd50: : ds 9 ; used with in-game trades, emotion bubbles, and player and miscellaneous sprite animations
2015-02-07 02:43:08 -08:00
wTradedEnemyMonOTID: : ; cd59
ds 2
2015-05-30 16:09:53 -05:00
wcd5b: : ds 1 ; used in some sprite stuff, town map and surge gym trash cans
wcd5c: : ds 1 ; used in town map
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-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-05-30 16:09:53 -05:00
wcd6a: : ds 1 ; used as the output of the outcome of an item (successful, unsuccessful, can't be used now, etc.)
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-05-30 16:09:53 -05:00
; as well as the said function, these values are used as a buffer for PlaceString
wcd6c: : ds 1 ; used in pokemon status screen and battle stuff
wcd6d: : ds 4 ; used solely for PlaceString
wcd71: : ds 1 ; used with pokemon status screen
wcd72: : ds 5 ; used with restoring PP
wcd77: : ds 1 ; used as an end terminator for GetMonName: (@ is written to this location)
wcd78: : ds 9 ; also used with restoring PP
2013-12-05 01:18:14 -05:00
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
2014-01-27 16:22:41 -05:00
wBuffer: : ; cee9
2014-05-23 15:34:35 -07:00
; Temporary storage area of 30 bytes.
2014-01-27 16:22:41 -05:00
wHPBarMaxHP: : ; cee9
2013-12-05 01:18:14 -05:00
ds 2
2014-01-27 16:22:41 -05:00
wHPBarOldHP: : ; ceeb
2013-12-05 01:18:14 -05:00
ds 2
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-05-30 16:09:53 -05:00
wcef0: : ds 1 ; used with HP bar stuff, probably used with wBuffer too.
wcef1: : ds 12 ; same case as above
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-05-30 16:09:53 -05:00
wcf05: : ds 1 ; used with enemy using healing moves
wcf06: : ds 1 ; used with healing items as a storage value to store wWhichPokemon
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-05-30 16:09:53 -05:00
wcf08: : ds 1 ; used as a storage value for the bank to return to after a BankswitchHome (bankswitch in homebank)
wcf09: : ds 1 ; used as a temp storage value for the bank to switch to
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)
wcf0e: : ds 1 ; used with some overworld collison check
wcf0f: : ds 1 ; used with moving overworld sprites
2014-09-09 20:55:19 -07:00
wNPCMovementScriptFunctionNum: : ; cf10
; which script function within the pointer table indicated by
; wNPCMovementScriptPointerTableNum
ds 1
2015-05-30 16:09:53 -05:00
wcf11: : ds 1 ; used as a flag if the game needs to switch to the bank which the map is in when displaying a text id (flag is set during predefs)
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-05-30 16:09:53 -05:00
wcf18: : ds 2 ; used with overworld movement
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-05-30 16:09:53 -05:00
wcf1c: : ds 1 ; used with sgb palettes
wcf1d: : ds 1 ; used when displaying palettes for Pokemon
wcf1e: : ds 1 ; used to display palettes for HP bar
wcf1f: : ds 6 ; used to display HP bars in Pokemon Menu (probably palettes)
wcf25: : ds 8 ; used to display HP bar for Pokemon Status Screen (probably palettes too)
wcf2d: : ds 1 ; also used to display HP bar for Pokemon Menu (something about HP colour)
wcf2e: : ds 2 ; more HP bar palette stuff.
wcf30: : ds 7 ; used with palettes (apparently for Pokedex)
wcf37: : ds 20 ; used with palletes too (used for Party Menu)
wcf4b: : ds 1 ; storage buffer for various strings
wcf4c: : ds 1 ; used with displaying EXP value, probably also overflowed with wcf4b
2015-03-31 20:28:42 +02:00
wGainBoostedExp: : ; cf4d
ds 1
ds 17
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
wGymCityName: : ; cf5f
wStringBuffer1: : ; cf5f
2013-12-05 01:18:14 -05:00
ds 16 + 1
2014-01-27 16:22:41 -05:00
wGymLeaderName: : ; cf70
wStringBuffer2: : ; cf70
2013-12-05 01:18:14 -05:00
ds 16 + 1
2014-01-27 16:22:41 -05:00
wStringBuffer3: : ; cf81
2014-05-26 14:04:56 -07:00
ds 9 + 1
2015-02-07 18:37:40 -08:00
wList: : ; cf8b
ds 2
2015-05-30 16:09:53 -05:00
wcf8d: : ds 1 ; used in GetMonName
wcf8e: : ds 1 ; also used in GetMonName (probably as a pointer)
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
2014-01-27 16:22:41 -05:00
wMusicHeaderPointer: : ; cfc7
2013-12-08 04:49:40 -05:00
; (the current music channel address - $4000) / 3
ds 1
2015-05-30 16:09:53 -05:00
wcfc8: : ds 1 ; used with audio
wcfc9: : ds 1 ; also used with audio
wcfca: : ds 1 ; also used with audio too
2014-09-13 00:50:56 -07:00
wUpdateSpritesEnabled: : ; cfcb
; $01 enables UpdateSprites; anything else disables it
ds 1
2013-12-08 04:49:40 -05:00
2014-01-27 16:22:41 -05:00
W_ENEMYMOVENUM: : ; cfcc
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ENEMYMOVEEFFECT: : ; cfcd
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ENEMYMOVEPOWER: : ; cfce
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ENEMYMOVETYPE: : ; cfcf
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ENEMYMOVEACCURACY: : ; cfd0
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ENEMYMOVEMAXPP: : ; cfd1
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PLAYERMOVENUM: : ; cfd2
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PLAYERMOVEEFFECT: : ; cfd3
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PLAYERMOVEPOWER: : ; cfd4
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PLAYERMOVETYPE: : ; cfd5
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PLAYERMOVEACCURACY: : ; cfd6
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PLAYERMOVEMAXPP: : ; 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
2014-06-14 04:12:40 -07:00
wEnemyMonNick: : ds 11 ; cfda
2013-12-05 01:18:14 -05:00
2014-06-14 04:12:40 -07:00
wEnemyMon: : ; cfe5
; The wEnemyMon struct reaches past 0xcfff,
; the end of wram bank 0 on cgb.
; This has no significance on dmg, where wram
; isn't banked (c000-dfff is contiguous).
; However, recent versions of rgbds have replaced
; dmg-style wram with cgb wram banks.
2013-12-05 01:18:14 -05:00
2014-06-14 04:12:40 -07:00
; Until this is fixed, this struct will have
; to be declared manually.
2013-12-05 01:18:14 -05:00
2014-06-14 04:12:40 -07:00
wEnemyMonSpecies: : db
wEnemyMonHP: : dw
wEnemyMonPartyPos: :
wEnemyMonBoxLevel: : db
wEnemyMonStatus: : db
wEnemyMonType: :
wEnemyMonType1: : db
wEnemyMonType2: : db
2014-08-08 22:39:13 -07:00
wEnemyMonCatchRate_NotReferenced: : db
2014-06-14 04:12:40 -07:00
wEnemyMonMoves: : ds NUM_MOVES
wEnemyMonDVs: : ds 2
wEnemyMonLevel: : db
wEnemyMonMaxHP: : dw
wEnemyMonAttack: : dw
wEnemyMonDefense: : dw
wEnemyMonSpeed: : dw
wEnemyMonSpecial: : dw
wEnemyMonPP: : ds 2 ; NUM_MOVES - 2
SECTION "WRAM Bank 1" , WRAMX , BANK [ 1 ]
ds 2 ; NUM_MOVES - 2
2013-12-08 04:49:40 -05:00
2014-08-08 22:39:13 -07:00
wEnemyMonBaseStats: : ds 5
wEnemyMonCatchRate: : ds 1
wEnemyMonBaseExp: : ds 1
2013-12-08 04:49:40 -05:00
2014-06-14 04:12:40 -07:00
wBattleMonNick: : ds 11 ; d009
wBattleMon: : battle_struct wBattleMon ; d014
2013-12-08 04:49:40 -05:00
2014-01-27 16:22:41 -05:00
W_TRAINERCLASS: : ; 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-05-30 16:09:53 -05:00
wd036: : ds 16 ; used as a temporary buffer to print "XXX learned YYY"
wd046: : ds 1 ; used with trainer pointer stuff (not exactly sure, but the label is incremented and loaded with a value, so wd047 is accessed)
wd047: : ds 1 ; used with unloading trainer data?
wd048: : ds 2 ; used as a pointer for missable object loop
2013-12-22 19:05:44 -06:00
2014-01-27 16:22:41 -05:00
W_TRAINERNAME: : ; 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
2014-01-27 16:22:41 -05:00
W_ISINBATTLE: : ; d057
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
2014-01-27 16:22:41 -05:00
W_CUROPPONENT: : ; d059
2013-12-08 04:49:40 -05:00
; in a wild battle, this is the species of pokemon
; in a trainer battle, this is the trainer class + $C8
ds 1
2014-01-27 16:22:41 -05:00
W_BATTLETYPE: : ; 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
2014-01-27 16:22:41 -05:00
W_LONEATTACKNO: : ; d05c
2013-12-08 04:49:40 -05:00
; which entry in LoneAttacks to use
2014-01-27 16:22:41 -05:00
W_GYMLEADERNO: : ; d05c
2013-12-08 04:49:40 -05:00
; it's actually the same thing as ^
ds 1
2014-01-27 16:22:41 -05:00
W_TRAINERNO: : ; 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
2014-01-27 16:22:41 -05:00
W_MOVEMISSED: : ; 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
2014-01-27 16:22:41 -05:00
W_PLAYERBATTSTATUS1: : ; 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
2014-01-27 16:22:41 -05:00
W_PLAYERBATTSTATUS2: : ; 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
2014-01-27 16:22:41 -05:00
W_PLAYERBATTSTATUS3: : ; d064
2013-12-05 01:18:14 -05:00
; bit 0 - toxic
; bit 1 - light screen
; bit 2 - reflect
; bit 3 - tranformed
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
2014-01-27 16:22:41 -05:00
W_ENEMYBATTSTATUS1: : ; d067
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ENEMYBATTSTATUS2: : ; d068
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ENEMYBATTSTATUS3: : ; 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-07-03 14:37:53 -05:00
W_PLAYERCONFUSEDCOUNTER: : ; d06b
2015-01-31 18:26:05 +01:00
ds 1
2013-12-08 04:49:40 -05:00
2014-01-27 16:22:41 -05:00
W_PLAYERTOXICCOUNTER: : ; d06c
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PLAYERDISABLEDMOVE: : ; 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-07-03 14:37:53 -05:00
W_ENEMYCONFUSEDCOUNTER: : ; d070
2015-01-31 18:26:05 +01:00
ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_ENEMYTOXICCOUNTER: : ; d071
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ENEMYDISABLEDMOVE: : ; 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-05-30 16:09:53 -05:00
wAmountMoneyWon: : ; wd079 - wd07b
wd079: : ds 1 ; used as a value to print the money won from a battle, as well as a misc. value in seafoam
wd07a: : ds 1 ; same case as above
wd07b: : ds 1 ; used as a buffer to convert the money won from a battle into BCD
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_ANIMATIONID: : ; d07c
2013-12-08 04:49:40 -05:00
; ID number of the current battle animation
ds 1
2015-05-30 16:09:53 -05:00
wd07d: : ds 1 ; used with naming functions and party display type
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
2014-01-27 16:22:41 -05:00
W_BASECOORDX: : ; d081
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_BASECOORDY: : ; 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
2014-01-27 16:22:41 -05:00
W_FBTILECOUNTER: : ; d084
2013-12-08 04:49:40 -05:00
; counts how many tiles of the current frame block have been drawn
ds 1
2015-05-30 16:09:53 -05:00
wd085: : ds 1 ; used with animating water/flowers
2013-12-08 04:49:40 -05:00
2014-01-27 16:22:41 -05:00
W_SUBANIMFRAMEDELAY: : ; d086
2013-12-08 04:49:40 -05:00
; duration of each frame of the current subanimation in terms of screen refreshes
ds 1
2014-01-27 16:22:41 -05:00
W_SUBANIMCOUNTER: : ; 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-05-30 16:09:53 -05:00
wd088: : ds 1 ; savefile checksum (if file is corrupted)
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_NUMFBTILES: : ; 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-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-05-30 16:09:53 -05:00
wd08a: : ds 1 ; used with sprites and displaying the option menu on the main menu screen?
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
2014-01-27 16:22:41 -05:00
W_SUBANIMTRANSFORM: : ; 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
2014-01-27 16:22:41 -05:00
W_SUBANIMADDRPTR: : ; 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.
2014-01-27 16:22:41 -05:00
W_SUBANIMSUBENTRYADDR: : ; 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-05-30 16:09:53 -05:00
wd09a: : ds 1 ; used with the battle transition screen when entering a battle (screen slowly draws into black)
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-05-30 16:09:53 -05:00
wd09b: : ds 1 ; also used with battle transition screen and move animations
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_FBDESTADDR: : ; 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
2014-01-27 16:22:41 -05:00
W_FBMODE: : ; 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
; 04: delay, without cleaning OAM buffer, and do not advance [W_FBDESTADDR], so that the next frame block will overwrite this one
; sprite data is written column by column, each byte contains 8 columns (one for ech bit)
; for 2bpp sprites, pairs of two consecutive bytes (i.e. pairs of consecutive rows of sprite data)
; contain the upper and lower bit of each of the 8 pixels, respectively
2013-12-08 04:49:40 -05:00
ds 1
2014-09-14 11:29:18 -07:00
wNewTileBlockID: : ; d09f
2015-05-30 16:09:53 -05:00
wd09f: : ds 1 ; used with predef ReplaceTileBlock
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
2014-01-27 16:22:41 -05:00
W_SPRITECURPOSX: : ; d0a1
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SPRITECURPOSY: : ; d0a2
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SPRITEWITDH: : ; d0a3
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SPRITEHEIGHT: : ; d0a4
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SPRITEINPUTCURBYTE: : ; d0a5
2013-12-08 04:49:40 -05:00
; current input byte
ds 1
2014-01-27 16:22:41 -05:00
W_SPRITEINPUTBITCOUNTER: : ; d0a6
2013-12-08 04:49:40 -05:00
; bit offset of last read input bit
ds 1
2014-01-27 16:22:41 -05:00
W_SPRITEOUTPUTBITOFFSET: : ; 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
2014-01-27 16:22:41 -05:00
W_SPRITELOADFLAGS: : ; 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
2014-01-27 16:22:41 -05:00
W_SPRITEUNPACKMODE: : ; d0a9
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SPRITEFLIPPED: : ; d0aa
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SPRITEINPUTPTR: : ; d0ab
2013-12-08 04:49:40 -05:00
; pointer to next input byte
ds 2
2014-01-27 16:22:41 -05:00
W_SPRITEOUTPUTPTR: : ; d0ad
2013-12-08 04:49:40 -05:00
; pointer to current output byte
ds 2
2014-01-27 16:22:41 -05:00
W_SPRITEOUTPUTPTRCACHED: : ; d0af
2013-12-08 04:49:40 -05:00
; used to revert pointer for different bit offsets
ds 2
2014-01-27 16:22:41 -05:00
W_SPRITEDECODETABLE0PTR: : ; d0b1
2013-12-08 04:49:40 -05:00
; pointer to differential decoding table (assuming initial value 0)
ds 2
2014-01-27 16:22:41 -05:00
W_SPRITEDECODETABLE1PTR: : ; 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
2014-01-27 16:22:41 -05:00
W_MONHEADER: : ; d0b8
W_MONHDEXNUM: : ; d0b8
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHBASESTATS: : ; d0b9
W_MONHBASEHP: : ; d0b9
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHBASEATTACK: : ; d0ba
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHBASEDEFENSE: : ; d0bb
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHBASESPEED: : ; d0bc
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHBASESPECIAL: : ; d0bd
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHTYPES: : ; d0be
W_MONHTYPE1: : ; d0be
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHTYPE2: : ; d0bf
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHCATCHRATE: : ; d0c0
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHBASEXP: : ; d0c1
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHSPRITEDIM: : ; d0c2
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHFRONTSPRITE: : ; d0c3
2013-12-08 04:49:40 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_MONHBACKSPRITE: : ; d0c5
2013-12-08 04:49:40 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_MONHMOVES: : ; d0c7
2013-12-08 04:49:40 -05:00
ds 4
2014-01-27 16:22:41 -05:00
W_MONHGROWTHRATE: : ; d0cb
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MONHLEARNSET: : ; 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-05-30 16:09:53 -05:00
wd0d4: : ds 3 ; temp storage for hTilesetType
2013-12-08 04:49:40 -05:00
2014-01-27 16:22:41 -05:00
W_MONHPADDING: : ; d0d7
2013-12-08 04:49:40 -05:00
2014-01-27 16:22:41 -05:00
W_DAMAGE: : ; d0d7
2015-02-07 13:40:14 -08:00
ds 2
2013-12-08 04:49:40 -05:00
2015-02-07 13:40:14 -08:00
ds 2
2015-02-03 20:51:53 +01:00
2015-07-03 14:37:53 -05:00
wRepelRemainingSteps: : ; d0db
2015-02-03 20:51:53 +01: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-05-30 16:09:53 -05:00
wd119: : ds 1 ; written to from W_CURMAPTILESET but never read
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-05-30 16:09:53 -05:00
wd11c: : ds 1 ; temp storage value for catching pokemon
wd11d: : ds 1 ; used with battle switchout and testing if the enemy mon fainted
wd11e: : ds 1 ; used as a Pokemon and Item storage value. Also used as an output value for CountSetBits
wd11f: : ds 1 ; used when running from battle and PartyMenuInit
2014-08-08 22:39:13 -07:00
wNumRunAttempts: :
; number of times the player has tried to run from battle
ds 1
2015-05-30 16:09:53 -05:00
wd121: : ds 1 ; used with evolving pokemon
wd122: : ds 2 ; saved ROM bank number for vblank
2015-07-12 23:00:48 -07:00
wIsKeyItem: : ds 1 ; d124
2015-02-07 02:43:08 -08:00
wTextBoxID: : ; d125
ds 1
2015-05-30 16:09:53 -05:00
wd126: : 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
2014-01-27 16:22:41 -05:00
W_CURENEMYLVL: : ; 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-05-30 16:09:53 -05:00
wd12f: : ds 1 ; used in some coordinatestuff, npc pathstuff, and game corner prize stuff
wd130: : ds 1 ; saved value of screen Y coord of trainer sprite
wd131: : ds 1 ; saved value of screen X coord of trainer sprite
wd132: : ds 1 ; saved value of map Y coordinate of trainer sprite (not sure for purpose)
wd133: : ds 6 ; saved value of map X coordinate of trainer sprite
wd139: : ds 1 ; backup of selected menu entry for game corner prizes
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
2014-01-27 16:22:41 -05:00
W_PRIZE1: : ; d13d
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PRIZE2: : ; d13e
2013-12-08 04:49:40 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PRIZE3: : ; 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-05-30 16:09:53 -05:00
wd141: : ds 2 ; prices for prizes
wd143: : ds 2 ; prices for prizes
wd145: : ds 3 ; prices for prizes
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-05-30 16:09:53 -05:00
wd152: : ds 1 ; used as a temporary storage for the item used
wd153: : ds 3 ; written to during pokedex flag action but doesn't seem to be read from
wd156: : ds 1 ; evolution stone ID used
wd157: : ds 1 ; used with oak's lab script (related to npc movement directions), possibly indirectly accessed with values below
2013-12-08 04:49:40 -05:00
2014-06-14 04:12:40 -07:00
wPlayerName: : ; d158
ds 11
2013-12-08 04:49:40 -05:00
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
2014-06-14 14:24:35 -07:00
wPartyMonOT: : ds 11 * PARTY_LENGTH ; d273
wPartyMonNicks: : ds 11 * PARTY_LENGTH ; d2b5
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
ds 20 * 2
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
2014-01-27 16:22:41 -05:00
W_RIVALNAME: : ; d34a
2013-12-08 04:49:40 -05:00
ds 11
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_OPTIONS: : ; 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
2014-01-27 16:22:41 -05:00
W_OBTAINEDBADGES: : ; d356
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-05-30 16:09:53 -05:00
wd358: : ds 1 ; bit 0 set = no delay when printing text (W_OPTIONS is still checked though)
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-05-30 16:09:53 -05:00
wd35b: : ds 1 ; used with audio stuff
wd35c: : ds 1 ; storage for audio bank for current map?
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
2014-01-27 16:22:41 -05:00
W_CURMAP: : ; 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
2014-01-27 16:22:41 -05:00
W_YCOORD: : ; d361
2013-12-08 14:25:19 -05:00
; player’ s position on the current map
ds 1
2014-01-27 16:22:41 -05:00
W_XCOORD: : ; d362
2013-12-08 14:25:19 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_YBLOCKCOORD: : ; d363
2013-12-08 14:25:19 -05:00
; player's y position (by block)
ds 1
2014-01-27 16:22:41 -05:00
W_XBLOCKCOORD: : ; d364
2014-04-27 02:44:29 -04:00
ds 1
wLastMap: : ; d365
ds 1
2015-05-30 16:09:53 -05:00
wd366: : ds 1 ; W_CURMAPWIDTH of the last outdoor map visited when entering an inside map
2013-12-08 14:25:19 -05:00
2014-01-27 16:22:41 -05:00
W_CURMAPTILESET: : ; d367
2013-12-08 14:25:19 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_CURMAPHEIGHT: : ; d368
2013-12-08 14:25:19 -05:00
; blocks
ds 1
2014-01-27 16:22:41 -05:00
W_CURMAPWIDTH: : ; d369
2013-12-08 14:25:19 -05:00
; blocks
ds 1
2014-01-27 16:22:41 -05:00
W_MAPDATAPTR: : ; d36a
2013-12-08 14:25:19 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_MAPTEXTPTR: : ; d36c
2013-12-08 14:25:19 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_MAPSCRIPTPTR: : ; d36e
2013-12-08 14:25:19 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_MAPCONNECTIONS: : ; d370
2013-12-08 14:25:19 -05:00
; connection byte
ds 1
2014-01-27 16:22:41 -05:00
W_MAPCONN1PTR: : ; d371
2014-05-26 14:04:56 -07:00
ds 1
2015-05-30 16:09:53 -05:00
wd372: : ds 1 ; some connection stuff, too bothered to label it
2014-05-26 14:04:56 -07:00
wd373: : ds 1
wd374: : ds 1
wd375: : ds 1
wd376: : ds 1
wd377: : ds 1
wd378: : ds 1
wd379: : ds 1
wd37a: : ds 1
wd37b: : ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_MAPCONN2PTR: : ; d37c
2014-05-26 14:04:56 -07:00
ds 1
wd37d: : ds 1
wd37e: : ds 1
wd37f: : ds 1
wd380: : ds 1
wd381: : ds 1
wd382: : ds 1
wd383: : ds 1
wd384: : ds 1
wd385: : ds 1
wd386: : ds 1
2013-12-08 14:25:19 -05:00
2014-01-27 16:22:41 -05:00
W_MAPCONN3PTR: : ; d387
2014-05-26 14:04:56 -07:00
ds 1
wd388: : ds 1
wd389: : ds 1
wd38a: : ds 1
wd38b: : ds 1
wd38c: : ds 1
wd38d: : ds 1
wd38e: : ds 1
wd38f: : ds 1
wd390: : ds 1
wd391: : ds 1
2013-12-08 14:25:19 -05:00
2014-01-27 16:22:41 -05:00
W_MAPCONN4PTR: : ; d392
2014-05-26 14:04:56 -07:00
ds 1
wd393: : ds 1
wd394: : ds 1
wd395: : ds 1
wd396: : ds 1
wd397: : ds 1
wd398: : ds 1
wd399: : ds 1
wd39a: : ds 1
wd39b: : ds 1
wd39c: : ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_SPRITESET: : ; 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
2014-01-27 16:22:41 -05:00
W_SPRITESETID: : ; 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-05-30 16:09:53 -05:00
wd3a9: : ds 1 ; used when getting the object data pointer
wd3aa: : ds 3 ; second part of the pointer
wd3ad: : ds 1 ; used as the beginning value for copying warp data
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-05-30 16:09:53 -05:00
wd4b0: : ds 1 ; number of signs on the map
wd4b1: : ds 32 ; starting address for sign coords
wd4d1: : ds 16 ; starting address for sign text IDs
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_NUMSPRITES: : ; 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
2014-01-27 16:22:41 -05:00
W_MAPSPRITEDATA: : ; 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
2014-01-27 16:22:41 -05:00
W_MAPSPRITEEXTRADATA: : ; 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-05-30 16:09:53 -05:00
wd524: : ds 1 ; map height in 2x2 metatiles, also used with checking connections
wd525: : ds 1 ; map width in 2x2 metatiles, also used with checking connections
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-05-30 16:09:53 -05:00
wd528: : ds 1 ; additional storage for directions
wd529: : ds 1 ; same case as above, but used differently
wd52a: : ds 1 ; same case as above
2013-12-08 14:25:19 -05:00
2014-01-27 16:22:41 -05:00
W_TILESETBANK: : ; d52b
2013-12-08 14:25:19 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_TILESETBLOCKSPTR: : ; d52c
2013-12-08 14:25:19 -05:00
; maps blocks (4x4 tiles) to tiles
ds 2
2014-01-27 16:22:41 -05:00
W_TILESETGFXPTR: : ; d52e
2013-12-08 14:25:19 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_TILESETCOLLISIONPTR: : ; d530
2013-12-08 14:25:19 -05:00
; list of all walkable tiles
ds 2
2014-01-27 16:22:41 -05:00
W_TILESETTALKINGOVERTILES: : ; d532
2013-12-08 14:25:19 -05:00
ds 3
2014-01-27 16:22:41 -05:00
W_GRASSTILE: : ; 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
ds 50 * 2
ds 1 ; end
2015-05-30 16:09:53 -05:00
wd5a0: : ds 2 ; current box number
wd5a2: : ds 1 ; number of HOF teams
wd5a3: : ds 1 ; unused? (written to when loading map data)
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
2014-01-27 16:22:41 -05:00
W_MISSABLEOBJECTFLAGS: : ; d5a6
2013-12-08 04:49:40 -05:00
; bit array of missable objects. set = removed
2014-05-26 14:04:56 -07:00
ds 39
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
2014-01-27 16:22:41 -05:00
W_MISSABLEOBJECTLIST: : ; d5ce
2013-12-05 01:18:14 -05:00
; each entry consists of 2 bytes
; * the sprite ID (depending on the current map)
; * the missable object index (global, used for W_MISSABLEOBJECTFLAGS)
; terminated with $FF
2013-12-08 04:49:40 -05:00
ds 17 * 2
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_GAMEPROGRESSFLAGS: : ; d5f0
2013-12-08 14:48:17 -05:00
; $c8 bytes
ds 0
2014-01-27 16:22:41 -05:00
W_OAKSLABCURSCRIPT: : ; d5f0
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PALLETTOWNCURSCRIPT: : ; d5f1
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2014-01-27 16:22:41 -05:00
W_BLUESHOUSECURSCRIPT: : ; d5f3
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_VIRIDIANCITYCURSCRIPT: : ; d5f4
2013-12-08 14:48:17 -05:00
ds 1
ds 2
2014-01-27 16:22:41 -05:00
W_PEWTERCITYCURSCRIPT: : ; d5f7
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE3CURSCRIPT: : ; d5f8
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE4CURSCRIPT: : ; d5f9
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2014-01-27 16:22:41 -05:00
W_VIRIDIANGYMCURSCRIPT: : ; d5fb
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PEWTERGYMCURSCRIPT: : ; d5fc
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_CERULEANGYMCURSCRIPT: : ; d5fd
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_VERMILIONGYMCURSCRIPT: : ; d5fe
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_CELADONGYMCURSCRIPT: : ; d5ff
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE6CURSCRIPT: : ; d600
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE8CURSCRIPT: : ; d601
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE24CURSCRIPT: : ; d602
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE25CURSCRIPT: : ; d603
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE9CURSCRIPT: : ; d604
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE10CURSCRIPT: : ; d605
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MTMOON1CURSCRIPT: : ; d606
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MTMOON3CURSCRIPT: : ; d607
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SSANNE8CURSCRIPT: : ; d608
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SSANNE9CURSCRIPT: : ; d609
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE22CURSCRIPT: : ; d60a
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2014-01-27 16:22:41 -05:00
W_REDSHOUSE2CURSCRIPT: : ; d60c
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_VIRIDIANMARKETCURSCRIPT: : ; d60d
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE22GATECURSCRIPT: : ; d60e
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_CERULEANCITYCURSCRIPT: : ; d60f
2013-12-08 14:48:17 -05:00
ds 1
ds 7
2014-01-27 16:22:41 -05:00
W_SSANNE5CURSCRIPT: : ; d617
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_VIRIDIANFORESTCURSCRIPT: : ; d618
2013-12-08 14:48:17 -05:00
ds 1
2014-04-06 09:12:05 -04:00
W_MUSEUM1FCURSCRIPT: : ; d619
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE13CURSCRIPT: : ; d61a
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE14CURSCRIPT: : ; d61b
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE17CURSCRIPT: : ; d61c
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE19CURSCRIPT: : ; d61d
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE21CURSCRIPT: : ; d61e
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SAFARIZONEENTRANCECURSCRIPT: : ; d61f
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROCKTUNNEL2CURSCRIPT: : ; d620
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROCKTUNNEL1CURSCRIPT: : ; d621
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE11CURSCRIPT: : ; d623
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE12CURSCRIPT: : ; d624
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE15CURSCRIPT: : ; d625
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE16CURSCRIPT: : ; d626
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE18CURSCRIPT: : ; d627
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE20CURSCRIPT: : ; d628
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SSANNE10CURSCRIPT: : ; d629
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_VERMILIONCITYCURSCRIPT: : ; d62a
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_POKEMONTOWER2CURSCRIPT: : ; d62b
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_POKEMONTOWER3CURSCRIPT: : ; d62c
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_POKEMONTOWER4CURSCRIPT: : ; d62d
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_POKEMONTOWER5CURSCRIPT: : ; d62e
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_POKEMONTOWER6CURSCRIPT: : ; d62f
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_POKEMONTOWER7CURSCRIPT: : ; d630
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROCKETHIDEOUT1CURSCRIPT: : ; d631
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROCKETHIDEOUT2CURSCRIPT: : ; d632
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROCKETHIDEOUT3CURSCRIPT: : ; d633
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROCKETHIDEOUT4CURSCRIPT: : ; d634
2013-12-08 14:48:17 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_ROUTE6GATECURSCRIPT: : ; d636
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE8GATECURSCRIPT: : ; d637
2013-12-08 14:48:17 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_CINNABARISLANDCURSCRIPT: : ; d639
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MANSION1CURSCRIPT: : ; d63a
2013-12-08 14:48:17 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_MANSION2CURSCRIPT: : ; d63c
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MANSION3CURSCRIPT: : ; d63d
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_MANSION4CURSCRIPT: : ; d63e
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_VICTORYROAD2CURSCRIPT: : ; d63f
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_VICTORYROAD3CURSCRIPT: : ; d640
2013-12-08 14:48:17 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_FIGHTINGDOJOCURSCRIPT: : ; d642
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SILPHCO2CURSCRIPT: : ; d643
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SILPHCO3CURSCRIPT: : ; d644
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SILPHCO4CURSCRIPT: : ; d645
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SILPHCO5CURSCRIPT: : ; d646
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SILPHCO6CURSCRIPT: : ; d647
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SILPHCO7CURSCRIPT: : ; d648
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SILPHCO8CURSCRIPT: : ; d649
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SILPHCO9CURSCRIPT: : ; d64a
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_HALLOFFAMEROOMCURSCRIPT: : ; d64b
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_GARYCURSCRIPT: : ; d64c
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_LORELEICURSCRIPT: : ; d64d
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_BRUNOCURSCRIPT: : ; d64e
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_AGATHACURSCRIPT: : ; d64f
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_UNKNOWNDUNGEON3CURSCRIPT: : ; d650
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_VICTORYROAD1CURSCRIPT: : ; d651
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2014-01-27 16:22:41 -05:00
W_LANCECURSCRIPT: : ; d653
2013-12-08 14:48:17 -05:00
ds 1
ds 4
2014-01-27 16:22:41 -05:00
W_SILPHCO10CURSCRIPT: : ; d658
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SILPHCO11CURSCRIPT: : ; d659
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2014-01-27 16:22:41 -05:00
W_FUCHSIAGYMCURSCRIPT: : ; d65b
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SAFFRONGYMCURSCRIPT: : ; d65c
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2014-01-27 16:22:41 -05:00
W_CINNABARGYMCURSCRIPT: : ; d65e
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_CELADONGAMECORNERCURSCRIPT: : ; d65f
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE16GATECURSCRIPT: : ; d660
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_BILLSHOUSECURSCRIPT: : ; d661
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE5GATECURSCRIPT: : ; d662
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_POWERPLANTCURSCRIPT: : ; d663
2013-12-08 14:48:17 -05:00
; overload
ds 0
2014-01-27 16:22:41 -05:00
W_ROUTE7GATECURSCRIPT: : ; d663
2013-12-08 14:48:17 -05:00
; overload
ds 1
ds 1
2014-01-27 16:22:41 -05:00
W_SSANNE2CURSCRIPT: : ; d665
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SEAFOAMISLANDS4CURSCRIPT: : ; d666
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE23CURSCRIPT: : ; d667
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_SEAFOAMISLANDS5CURSCRIPT: : ; d668
2013-12-08 14:48:17 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_ROUTE18GATECURSCRIPT: : ; d669
2013-12-08 14:48:17 -05:00
ds 1
2014-05-26 14:04:56 -07:00
ds 134
2015-05-30 16:09:53 -05:00
wd6f0: : ds 14 ; flags for hidden items?
wd6fe: : ds 2 ; flags for hidden coins?
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
2014-01-27 16:22:41 -05:00
W_TOWNVISITEDFLAG: : ; 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
2014-01-27 16:22:41 -05:00
W_FOSSILITEM: : ; d70f
2013-12-08 14:48:17 -05:00
; item given to cinnabar lab
ds 1
2014-01-27 16:22:41 -05:00
W_FOSSILMON: : ; d710
2013-12-08 14:48:17 -05:00
; mon that will result from the item
ds 1
ds 2
2014-01-27 16:22:41 -05:00
W_ENEMYMONORTRAINERCLASS: : ; d713
2013-12-08 14:48:17 -05:00
; trainer classes start at $c8
ds 1
2014-09-13 00:50:56 -07:00
wPlayerJumpingYScreenCoordsIndex: : ; d714
ds 1
2013-12-08 14:48:17 -05:00
2014-01-27 16:22:41 -05:00
W_RIVALSTARTER: : ; d715
2013-12-08 14:48:17 -05:00
ds 1
ds 1
2014-01-27 16:22:41 -05:00
W_PLAYERSTARTER: : ; 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-05-30 16:09:53 -05:00
wd71b: : ds 1 ; written to but doesn't seem to be read
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-05-30 16:09:53 -05:00
wd71f: : ds 9 ; used with card key
2014-09-09 20:55:19 -07:00
wd728: :
; bit 0: using Strength outside of battle
ds 1
ds 1
2015-05-30 16:09:53 -05:00
wd72a: : ds 2 ; flags for if a gym is beaten, also used to determine whether to display your name on the gym statues
2014-09-13 00:50:56 -07:00
wd72c: : ; d72c
; bit 0: if not set, the 3 minimum steps between random battles have passed
ds 1
2015-05-30 16:09:53 -05:00
wd72d: : ds 1 ; misc temp flags? (in some scripts, bit 6 and 7 set after a special battle (e.g. gym leaders) has been won)
; also used as a start menu flag
wd72e: : ds 2 ; more temp misc flags, used with npc movement, main menu and other stuff
2014-09-09 20:55:19 -07:00
wd730: :
2014-09-14 11:29:18 -07:00
; bit 0: NPC sprite being moved by script
; bit 5: ignore joypad input
; bit 6: print text with no delay between each letter
2014-09-09 20:55:19 -07:00
; bit 7: set if joypad states are being simulated in the overworld
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
; 2. does not have the player start in floor two of the playyer's house (instead sending them to [wLastMap])
; 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
2014-01-27 16:22:41 -05:00
W_FLAGS_D733: : ; d733
2013-12-05 01:18:14 -05:00
; bit 4: use variable [W_CURMAPSCRIPT] 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-05-30 16:09:53 -05:00
wd734: : ds 2 ; flag for indigo plateau and lorelei (not sure what it's for)
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
; bit 6: jumping down a ledge
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-05-30 16:09:53 -05:00
wd73b: : ds 1 ; used with elevator warps
wd73c: : ds 3 ; also used with elevator warps
2014-09-14 11:29:18 -07:00
wCardKeyDoorY: : ; d73f
ds 1
wCardKeyDoorX: : ; d740
ds 1
ds 2
2015-05-30 16:09:53 -05:00
wd743: : ds 1 ; used with surge gym trash cans
wd744: : ds 3 ; also used with surge gym trash cans
wd747: : ds 3 ; and we're getting to flags, which I'm not going to bother commenting
2014-05-26 14:04:56 -07:00
wd74a: : ds 1
2015-02-07 02:43:08 -08:00
wd74b: : ; d74b
; bit 0: Prof. Oak has lead the player to the north end of his lab
; bit 1: Prof. Oak has asked the player to choose a pokemon
; bit 2: the player and the rival have received their pokemon
; bit 3: the player has battled the rival in Oak's lab
; bit 4: Prof. Oak has given the player 5 pokeballs
; bit 5: received pokedex
ds 1
2014-05-26 14:04:56 -07:00
wd74c: : ds 2
wd74e: : ds 3
wd751: : ds 1
wd752: : ds 2
wd754: : ds 1
wd755: : ds 5
wd75a: : ds 1
wd75b: : ds 3
wd75e: : ds 1
wd75f: : ds 5
wd764: : ds 1
wd765: : ds 1
wd766: : ds 1
wd767: : ds 1
wd768: : ds 1
wd769: : ds 3
wd76c: : ds 5
wd771: : ds 2
wd773: : ds 4
wd777: : ds 1
wd778: : ds 4
wd77c: : ds 1
wd77d: : ds 1
wd77e: : ds 5
wd783: : ds 11
wd78e: : ds 2
wd790: : ds 2
wd792: : ds 4
wd796: : ds 2
wd798: : ds 2
wd79a: : ds 1
wd79b: : ds 1
wd79c: : ds 5
wd7a1: : ds 2
wd7a3: : ds 12
wd7af: : ds 2
wd7b1: : ds 2
wd7b3: : ds 1
wd7b4: : ds 5
wd7b9: : ds 4
wd7bd: : ds 2
wd7bf: : ds 3
wd7c2: : ds 1
wd7c3: : ds 2
wd7c5: : ds 1
wd7c6: : ds 3
wd7c9: : ds 4
wd7cd: : ds 2
wd7cf: : ds 2
wd7d1: : ds 1
wd7d2: : ds 1
wd7d3: : ds 2
wd7d5: : ds 1
wd7d6: : ds 1
wd7d7: : ds 1
wd7d8: : ds 1
wd7d9: : ds 2
wd7db: : ds 2
wd7dd: : ds 2
wd7df: : ds 1
wd7e0: : ds 1
wd7e1: : ds 2
wd7e3: : ds 2
wd7e5: : ds 2
wd7e7: : ds 1
wd7e8: : ds 1
wd7e9: : ds 2
wd7eb: : ds 2
wd7ed: : ds 1
wd7ee: : ds 1
wd7ef: : ds 1
wd7f0: : ds 1
wd7f1: : ds 1
wd7f2: : ds 1
wd7f3: : ds 2
wd7f5: : ds 1
wd7f6: : ds 9
wd7ff: : ds 4
wd803: : ds 2
wd805: : ds 2
wd807: : ds 2
wd809: : ds 10
wd813: : ds 2
wd815: : ds 1
wd816: : ds 1
wd817: : ds 2
wd819: : ds 2
wd81b: : ds 10
wd825: : ds 1
wd826: : ds 1
wd827: : ds 1
wd828: : ds 1
wd829: : ds 1
wd82a: : ds 1
wd82b: : ds 1
wd82c: : ds 1
wd82d: : ds 1
wd82e: : ds 1
wd82f: : ds 1
wd830: : ds 1
wd831: : ds 1
wd832: : ds 1
wd833: : ds 1
wd834: : ds 1
wd835: : ds 1
wd836: : ds 1
wd837: : ds 1
wd838: : ds 15
wd847: : ds 2
wd849: : ds 2
wd84b: : ds 12
wd857: : ds 8
wd85f: : ds 4
wd863: : ds 1
wd864: : ds 1
wd865: : ds 1
wd866: : ds 1
wd867: : ds 2
wd869: : ds 20
wd87d: : ds 2
wd87f: : ds 1
wd880: : ds 1
wd881: : ds 1
wd882: : ds 5
2013-12-05 01:18:14 -05:00
2015-02-07 02:43:08 -08:00
wLinkEnemyTrainerName: : ; d887
; linked game's trainer name
2014-01-27 16:22:41 -05:00
W_GRASSRATE: : ; d887
2013-12-08 14:58:05 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_GRASSMONS: : ; d888
2013-12-08 14:58:05 -05:00
ds 20
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
2014-06-14 04:12:40 -07:00
wEnemyMons: : ; d8a4
wEnemyMon1: : party_struct wEnemyMon1
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
2014-06-14 14:24:35 -07:00
wEnemyMonOT: : ds 11 * PARTY_LENGTH ; d9ac
wEnemyMonNicks: : ds 11 * PARTY_LENGTH ; d9ee
2014-05-26 14:04:56 -07:00
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_TRAINERHEADERPTR: : ; 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-05-30 16:09:53 -05:00
wda38: : ds 1 ; used with cinnabar gym questions and pokemon tower 7F?
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_CURMAPSCRIPT: : ; da39
2013-12-05 01:18:14 -05:00
; index of current map script, mostly used as index for function pointer array
; mostly copied from map-specific map script pointer and wirtten back later
2013-12-08 14:58:05 -05:00
ds 1
2013-12-05 01:18:14 -05:00
2013-12-08 14:58:05 -05:00
ds 6
2013-12-05 01:18:14 -05:00
2014-01-27 16:22:41 -05:00
W_PLAYTIMEHOURS: : ; da40
2013-12-08 14:58:05 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_PLAYTIMEMINUTES: : ; da42
2013-12-08 14:58:05 -05:00
ds 2
2014-01-27 16:22:41 -05:00
W_PLAYTIMESECONDS: : ; da44
2013-12-08 14:58:05 -05:00
ds 1
2014-01-27 16:22:41 -05:00
W_PLAYTIMEFRAMES: : ; 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
2014-01-27 16:22:41 -05:00
W_NUMSAFARIBALLS: : ; da47
2013-12-08 14:58:05 -05:00
ds 1
2014-06-14 04:12:40 -07:00
2014-01-27 16:22:41 -05:00
W_DAYCARE_IN_USE: : ; 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
2014-06-14 04:12:40 -07:00
W_DAYCAREMONNAME: : ds 11 ; da49
W_DAYCAREMONOT: : ds 11 ; 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
2014-06-14 04:12:40 -07:00
W_NUMINBOX: : ds 1 ; da80
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
2014-06-14 04:12:40 -07:00
wBoxMonOT: : ds 11 * MONS_PER_BOX ; dd2a
wBoxMonNicks: : ds 11 * MONS_PER_BOX ; de06
wBoxMonNicksEnd: : ; dee2
2013-12-05 01:18:14 -05:00
2014-05-23 15:34:35 -07:00
2014-05-26 14:04:56 -07:00
SECTION "Stack" , WRAMX [ $ dfff ], BANK [ 1 ]
2014-05-23 15:34:35 -07:00
wStack: : ; dfff
ds - $ 100
2014-05-26 14:04:56 -07:00
2015-04-26 12:05:25 -04:00
INCLUDE "sram.asm"