diff options
Diffstat (limited to 'constants')
29 files changed, 320 insertions, 240 deletions
diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm index f5895dd98..640b1e8cd 100644 --- a/constants/audio_constants.asm +++ b/constants/audio_constants.asm @@ -30,44 +30,49 @@ NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS NUM_CHANNELS EQU const_value ; channel_struct members (see macros/wram.asm) -CHANNEL_MUSIC_ID EQUS "(wChannel1MusicID - wChannel1)" -CHANNEL_MUSIC_BANK EQUS "(wChannel1MusicBank - wChannel1)" -CHANNEL_FLAGS1 EQUS "(wChannel1Flags1 - wChannel1)" -CHANNEL_FLAGS2 EQUS "(wChannel1Flags2 - wChannel1)" -CHANNEL_FLAGS3 EQUS "(wChannel1Flags3 - wChannel1)" -CHANNEL_MUSIC_ADDRESS EQUS "(wChannel1MusicAddress - wChannel1)" -CHANNEL_LAST_MUSIC_ADDRESS EQUS "(wChannel1LastMusicAddress - wChannel1)" -CHANNEL_NOTE_FLAGS EQUS "(wChannel1NoteFlags - wChannel1)" -CHANNEL_CONDITION EQUS "(wChannel1Condition - wChannel1)" -CHANNEL_DUTY_CYCLE EQUS "(wChannel1DutyCycle - wChannel1)" -CHANNEL_VOLUME_ENVELOPE EQUS "(wChannel1VolumeEnvelope - wChannel1)" -CHANNEL_FREQUENCY EQUS "(wChannel1Frequency - wChannel1)" -CHANNEL_PITCH EQUS "(wChannel1Pitch - wChannel1)" -CHANNEL_OCTAVE EQUS "(wChannel1Octave - wChannel1)" -CHANNEL_TRANSPOSITION EQUS "(wChannel1Transposition - wChannel1)" -CHANNEL_NOTE_DURATION EQUS "(wChannel1NoteDuration - wChannel1)" -CHANNEL_FIELD16 EQUS "(wChannel1Field16 - wChannel1)" -CHANNEL_LOOP_COUNT EQUS "(wChannel1LoopCount - wChannel1)" -CHANNEL_TEMPO EQUS "(wChannel1Tempo - wChannel1)" -CHANNEL_TRACKS EQUS "(wChannel1Tracks - wChannel1)" -CHANNEL_DUTY_CYCLE_PATTERN EQUS "(wChannel1DutyCyclePattern - wChannel1)" -CHANNEL_VIBRATO_DELAY_COUNT EQUS "(wChannel1VibratoDelayCount - wChannel1)" -CHANNEL_VIBRATO_DELAY EQUS "(wChannel1VibratoDelay - wChannel1)" -CHANNEL_VIBRATO_EXTENT EQUS "(wChannel1VibratoExtent - wChannel1)" -CHANNEL_VIBRATO_RATE EQUS "(wChannel1VibratoRate - wChannel1)" -CHANNEL_PITCH_SLIDE_TARGET EQUS "(wChannel1PitchSlideTarget - wChannel1)" -CHANNEL_PITCH_SLIDE_AMOUNT EQUS "(wChannel1PitchSlideAmount - wChannel1)" -CHANNEL_PITCH_SLIDE_AMOUNT_FRACTION EQUS "(wChannel1PitchSlideAmountFraction - wChannel1)" -CHANNEL_FIELD25 EQUS "(wChannel1Field25 - wChannel1)" -CHANNEL_PITCH_OFFSET EQUS "(wChannel1PitchOffset - wChannel1)" -CHANNEL_FIELD29 EQUS "(wChannel1Field29 - wChannel1)" -CHANNEL_FIELD2A EQUS "(wChannel1Field2a - wChannel1)" -CHANNEL_FIELD2C EQUS "(wChannel1Field2c - wChannel1)" -CHANNEL_NOTE_LENGTH EQUS "(wChannel1NoteLength - wChannel1)" -CHANNEL_FIELD2E EQUS "(wChannel1Field2e - wChannel1)" -CHANNEL_FIELD2F EQUS "(wChannel1Field2f - wChannel1)" -CHANNEL_FIELD30 EQUS "(wChannel1Field30 - wChannel1)" -CHANNEL_STRUCT_LENGTH EQUS "(wChannel2 - wChannel1)" +rsreset +CHANNEL_MUSIC_ID rw +CHANNEL_MUSIC_BANK rb +CHANNEL_FLAGS1 rb +CHANNEL_FLAGS2 rb +CHANNEL_FLAGS3 rb +CHANNEL_MUSIC_ADDRESS rw +CHANNEL_LAST_MUSIC_ADDRESS rw + rb_skip 2 +CHANNEL_NOTE_FLAGS rb +CHANNEL_CONDITION rb +CHANNEL_DUTY_CYCLE rb +CHANNEL_VOLUME_ENVELOPE rb +CHANNEL_FREQUENCY rw +CHANNEL_PITCH rb +CHANNEL_OCTAVE rb +CHANNEL_TRANSPOSITION rb +CHANNEL_NOTE_DURATION rb +CHANNEL_FIELD16 rb + rb_skip +CHANNEL_LOOP_COUNT rb +CHANNEL_TEMPO rw +CHANNEL_TRACKS rb +CHANNEL_DUTY_CYCLE_PATTERN rb +CHANNEL_VIBRATO_DELAY_COUNT rb +CHANNEL_VIBRATO_DELAY rb +CHANNEL_VIBRATO_EXTENT rb +CHANNEL_VIBRATO_RATE rb +CHANNEL_PITCH_SLIDE_TARGET rw +CHANNEL_PITCH_SLIDE_AMOUNT rb +CHANNEL_PITCH_SLIDE_AMOUNT_FRACTION rb +CHANNEL_FIELD25 rb + rb_skip +CHANNEL_PITCH_OFFSET rw +CHANNEL_FIELD29 rb +CHANNEL_FIELD2A rw +CHANNEL_FIELD2C rb +CHANNEL_NOTE_LENGTH rb +CHANNEL_FIELD2E rb +CHANNEL_FIELD2F rb +CHANNEL_FIELD30 rb + rb_skip +CHANNEL_STRUCT_LENGTH EQU _RS NOISE_CHAN_F EQU 2 ; bit set in CHAN5-CHAN7 diff --git a/constants/battle_anim_constants.asm b/constants/battle_anim_constants.asm index 351c90453..f0eaec914 100644 --- a/constants/battle_anim_constants.asm +++ b/constants/battle_anim_constants.asm @@ -1,24 +1,25 @@ ; battle_anim_struct members (see macros/wram.asm) - const_def - const BATTLEANIMSTRUCT_INDEX - const BATTLEANIMSTRUCT_OAMFLAGS - const BATTLEANIMSTRUCT_FIX_Y - const BATTLEANIMSTRUCT_FRAMESET_ID - const BATTLEANIMSTRUCT_FUNCTION - const BATTLEANIMSTRUCT_PALETTE - const BATTLEANIMSTRUCT_TILEID - const BATTLEANIMSTRUCT_XCOORD - const BATTLEANIMSTRUCT_YCOORD - const BATTLEANIMSTRUCT_XOFFSET - const BATTLEANIMSTRUCT_YOFFSET - const BATTLEANIMSTRUCT_PARAM - const BATTLEANIMSTRUCT_DURATION - const BATTLEANIMSTRUCT_FRAME - const BATTLEANIMSTRUCT_JUMPTABLE_INDEX - const BATTLEANIMSTRUCT_VAR1 - const BATTLEANIMSTRUCT_VAR2 - const_skip 7 -BATTLEANIMSTRUCT_LENGTH EQU const_value +rsreset +BATTLEANIMSTRUCT_INDEX rb +BATTLEANIMSTRUCT_OAMFLAGS rb +BATTLEANIMSTRUCT_FIX_Y rb +BATTLEANIMSTRUCT_FRAMESET_ID rb +BATTLEANIMSTRUCT_FUNCTION rb +BATTLEANIMSTRUCT_PALETTE rb +BATTLEANIMSTRUCT_TILEID rb +BATTLEANIMOBJ_LENGTH EQU _RS - 1 ; discount BATTLEANIMSTRUCT_INDEX +BATTLEANIMSTRUCT_XCOORD rb +BATTLEANIMSTRUCT_YCOORD rb +BATTLEANIMSTRUCT_XOFFSET rb +BATTLEANIMSTRUCT_YOFFSET rb +BATTLEANIMSTRUCT_PARAM rb +BATTLEANIMSTRUCT_DURATION rb +BATTLEANIMSTRUCT_FRAME rb +BATTLEANIMSTRUCT_JUMPTABLE_INDEX rb +BATTLEANIMSTRUCT_VAR1 rb +BATTLEANIMSTRUCT_VAR2 rb + rb_skip 7 +BATTLEANIMSTRUCT_LENGTH EQU _RS NUM_ANIM_OBJECTS EQU 10 ; see wActiveAnimObjects ; wBattleAnimTileDict size (see wram.asm) @@ -217,6 +218,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const ANIM_OBJ_PLAYERHEAD_1ROW const ANIM_OBJ_ENEMYFEET_2ROW const ANIM_OBJ_PLAYERHEAD_2ROW +NUM_ANIM_OBJS EQU const_value ; DoBattleAnimFrame arguments (see engine/battle_anims/functions.asm) const_def @@ -300,6 +302,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const BATTLEANIMFUNC_ANCIENT_POWER const BATTLEANIMFUNC_ROCK_SMASH const BATTLEANIMFUNC_COTTON +NUM_BATTLEANIMFUNCS EQU const_value ; BattleAnimFrameData indexes (see data/battle_anims/framesets.asm) const_def @@ -488,6 +491,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const BATTLEANIMFRAMESET_B6 const BATTLEANIMFRAMESET_B7 const BATTLEANIMFRAMESET_B8 +NUM_BATTLEANIMFRAMESETS EQU const_value ; BattleAnimOAMData indexes (see data/battle_anims/oam.asm) const_def @@ -707,6 +711,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const BATTLEANIMOAMSET_D5 const BATTLEANIMOAMSET_D6 const BATTLEANIMOAMSET_D7 +NUM_BATTLEANIMOAMSETS EQU const_value ; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm) const_def 1 @@ -763,6 +768,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const ANIM_BG_VIBRATE_MON const ANIM_BG_WOBBLE_PLAYER const ANIM_BG_WOBBLE_SCREEN +NUM_ANIM_BGS EQU const_value - 1 ; wBattleAnimTileDict keys (see wram.asm) ; AnimObjGFX indexes (see data/battle_anims/object_gfx.asm) @@ -808,14 +814,15 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture const ANIM_GFX_AEROBLAST const ANIM_GFX_PLAYERHEAD const ANIM_GFX_ENEMYFEET +NUM_ANIM_GFX EQU const_value - 1 ; battle_bg_effect struct members (see macros/wram.asm) - const_def - const BG_EFFECT_STRUCT_FUNCTION - const BG_EFFECT_STRUCT_JT_INDEX - const BG_EFFECT_STRUCT_BATTLE_TURN - const BG_EFFECT_STRUCT_PARAM -BG_EFFECT_STRUCT_LENGTH EQU const_value +rsreset +BG_EFFECT_STRUCT_FUNCTION rb +BG_EFFECT_STRUCT_JT_INDEX rb +BG_EFFECT_STRUCT_BATTLE_TURN rb +BG_EFFECT_STRUCT_PARAM rb +BG_EFFECT_STRUCT_LENGTH EQU _RS NUM_BG_EFFECTS EQU 5 ; see wActiveBGEffects ; anim_bgeffect battle turn values for some effects diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm index d66778a55..d8d1a3a84 100644 --- a/constants/battle_constants.asm +++ b/constants/battle_constants.asm @@ -120,6 +120,7 @@ SPDSPCDV_SHINY EQU $AA const BATTLE_VARS_LAST_COUNTER_MOVE_OPP const BATTLE_VARS_LAST_MOVE const BATTLE_VARS_LAST_MOVE_OPP +NUM_BATTLE_VARS EQU const_value ; BattleVarLocations indexes (see home/battle.asm) const_def @@ -149,6 +150,8 @@ SPDSPCDV_SHINY EQU $AA const ENEMY_COUNTER_MOVE const PLAYER_LAST_MOVE const ENEMY_LAST_MOVE +assert const_value % 2 == 0 +NUM_BATTLE_VAR_LOCATION_PAIRS EQU const_value / 2 ; status condition bit flags SLP EQU %111 ; 0-7 turns diff --git a/constants/battle_tower_constants.asm b/constants/battle_tower_constants.asm index 419d364c7..82d5bf448 100644 --- a/constants/battle_tower_constants.asm +++ b/constants/battle_tower_constants.asm @@ -5,7 +5,7 @@ BATTLETOWER_NUM_UNIQUE_MON EQU 21 BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70 BATTLETOWER_TRAINERDATALENGTH EQU $24 -BATTLE_TOWER_STRUCT_LENGTH EQUS "(NAME_LENGTH + BATTLETOWER_PARTY_LENGTH * NICKNAMED_MON_STRUCT_LENGTH + BATTLETOWER_TRAINERDATALENGTH)" +BATTLE_TOWER_STRUCT_LENGTH EQU NAME_LENGTH + BATTLETOWER_PARTY_LENGTH * NICKNAMED_MON_STRUCT_LENGTH + BATTLETOWER_TRAINERDATALENGTH ; BattleTowerAction setval arguments (see engine/events/battle_tower/battle_tower.asm) const_def diff --git a/constants/credits_constants.asm b/constants/credits_constants.asm index a3d20eb46..8be909a85 100644 --- a/constants/credits_constants.asm +++ b/constants/credits_constants.asm @@ -103,6 +103,7 @@ const US_COORDINATION const TEXT_TRANSLATION const PAAD_TESTING +NUM_CREDITS_STRINGS EQU const_value ; CreditsScript indexes (see data/credits_script.asm) const_def -1, -1 diff --git a/constants/cry_constants.asm b/constants/cry_constants.asm index 654aac523..94db303a6 100644 --- a/constants/cry_constants.asm +++ b/constants/cry_constants.asm @@ -72,3 +72,5 @@ const CRY_AIPOM const CRY_DUNSPARCE const CRY_DONPHAN + +NUM_CRIES EQU const_value diff --git a/constants/deco_constants.asm b/constants/deco_constants.asm index 29aea301e..27fa09f2c 100644 --- a/constants/deco_constants.asm +++ b/constants/deco_constants.asm @@ -1,3 +1,12 @@ +; decoration attributes +rsreset +DECOATTR_TYPE rb +DECOATTR_NAME rb +DECOATTR_ACTION rb +DECOATTR_EVENT_FLAG rw +DECOATTR_SPRITE rb +DECOATTR_STRUCT_LENGTH EQU _RS + ; decoration types const_def 1 const DECO_PLANT @@ -6,6 +15,7 @@ const DECO_POSTER const DECO_DOLL const DECO_BIGDOLL +NUM_DECO_TYPES EQU const_value - 1 ; DecorationNames indexes (see data/decorations/names.asm) const_def 1 @@ -51,8 +61,7 @@ const PUT_AWAY_BIG_DOLL const SET_UP_DOLL const PUT_AWAY_DOLL - const SET_UP_ORNAMENT - const PUT_AWAY_ORNAMENT +NUM_DECO_ACTIONS EQU const_value - 1 __deco_value__ = 0 @@ -127,3 +136,4 @@ NUM_NON_TROPHY_DECOS EQU __deco_value__ deco GOLD_TROPHY_DOLL deco SILVER_TROPHY_DOLL NUM_DECOS EQU __deco_value__ +NUM_DECO_CATEGORIES EQU const_value - 1 - NUM_DECOS diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index 5e7391458..09d2d4868 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -6,7 +6,7 @@ NUM_PAL_COLORS EQU 4 PAL_COLOR_SIZE EQU 2 PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE -PALRGB_WHITE EQUS "palred 31 + palgreen 31 + palblue 31" ; $7fff +PALRGB_WHITE EQU palred 31 + palgreen 31 + palblue 31 ; $7fff SCREEN_WIDTH EQU 20 ; tiles SCREEN_HEIGHT EQU 18 ; tiles @@ -34,12 +34,12 @@ HP_YELLOW EQU 1 HP_RED EQU 2 ; sprite_oam_struct members (see macros/wram.asm) - const_def - const SPRITEOAMSTRUCT_YCOORD ; 0 - const SPRITEOAMSTRUCT_XCOORD ; 1 - const SPRITEOAMSTRUCT_TILE_ID ; 2 - const SPRITEOAMSTRUCT_ATTRIBUTES ; 3 -SPRITEOAMSTRUCT_LENGTH EQU const_value +rsreset +SPRITEOAMSTRUCT_YCOORD rb ; 0 +SPRITEOAMSTRUCT_XCOORD rb ; 1 +SPRITEOAMSTRUCT_TILE_ID rb ; 2 +SPRITEOAMSTRUCT_ATTRIBUTES rb ; 3 +SPRITEOAMSTRUCT_LENGTH EQU _RS NUM_SPRITE_OAM_STRUCTS EQU 40 ; see wVirtualOAM SPRITE_GFX_LIST_CAPACITY EQU 32 ; see wUsedSprites diff --git a/constants/icon_constants.asm b/constants/icon_constants.asm index 870175f45..d4fbf28c0 100644 --- a/constants/icon_constants.asm +++ b/constants/icon_constants.asm @@ -39,6 +39,7 @@ const ICON_SLOWPOKE const ICON_SUDOWOODO const ICON_BIGMON +NUM_ICONS EQU const_value - 1 ; LoadMenuMonIcon.Jumptable indexes (see engine/gfx/mon_icons.asm) const_def diff --git a/constants/item_constants.asm b/constants/item_constants.asm index 2a4d8ee25..fc24deb05 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -196,6 +196,7 @@ const MUSIC_MAIL ; bc const MIRAGE_MAIL ; bd const ITEM_BE ; be +NUM_ITEMS EQU const_value - 1 __tmhm_value__ = 1 diff --git a/constants/item_data_constants.asm b/constants/item_data_constants.asm index f6d6384ce..4c2d761cd 100644 --- a/constants/item_data_constants.asm +++ b/constants/item_data_constants.asm @@ -1,13 +1,15 @@ ; item_attributes struct members (see data/items/attributes.asm) - const_def - const ITEMATTR_PRICE_LO - const ITEMATTR_PRICE_HI - const ITEMATTR_EFFECT - const ITEMATTR_PARAM - const ITEMATTR_PERMISSIONS - const ITEMATTR_POCKET - const ITEMATTR_HELP -ITEMATTR_STRUCT_LENGTH EQU const_value +rsreset +ITEMATTR_PRICE rw +rsset ITEMATTR_PRICE +ITEMATTR_PRICE_LO rb +ITEMATTR_PRICE_HI rb +ITEMATTR_EFFECT rb +ITEMATTR_PARAM rb +ITEMATTR_PERMISSIONS rb +ITEMATTR_POCKET rb +ITEMATTR_HELP rb +ITEMATTR_STRUCT_LENGTH EQU _RS ; item types const_def 1 diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm index 9b562288c..18461cdb1 100644 --- a/constants/landmark_constants.asm +++ b/constants/landmark_constants.asm @@ -1,6 +1,5 @@ ; Landmarks indexes (see data/maps/landmarks.asm) const_def - ; Johto landmarks const LANDMARK_SPECIAL ; 00 const LANDMARK_NEW_BARK_TOWN ; 01 @@ -49,7 +48,6 @@ const LANDMARK_DARK_CAVE ; 2c const LANDMARK_ROUTE_46 ; 2d const LANDMARK_SILVER_CAVE ; 2e - KANTO_LANDMARK EQU const_value const LANDMARK_PALLET_TOWN ; 2f const LANDMARK_ROUTE_1 ; 30 @@ -100,6 +98,7 @@ KANTO_LANDMARK EQU const_value const LANDMARK_TOHJO_FALLS ; 5d const LANDMARK_ROUTE_28 ; 5e const LANDMARK_FAST_SHIP ; 5f +NUM_LANDMARKS EQU const_value ; used in CaughtData const_def $7f, -1 diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm index 533157101..5e16e65ae 100644 --- a/constants/map_data_constants.asm +++ b/constants/map_data_constants.asm @@ -50,6 +50,7 @@ NUM_MAP_PALETTES EQU const_value const FISHGROUP_QWILFISH const FISHGROUP_REMORAID const FISHGROUP_QWILFISH_NO_SWARM +NUM_FISHGROUPS EQU const_value - 1 ; connection directions (see data/maps/data.asm) const_def @@ -66,8 +67,7 @@ NUM_MAP_PALETTES EQU const_value shift_const NORTH ; SpawnPoints indexes (see data/maps/spawn_points.asm) - const_def -1 - const SPAWN_N_A + const_def const SPAWN_HOME const SPAWN_DEBUG ; kanto @@ -100,6 +100,8 @@ NUM_MAP_PALETTES EQU const_value const SPAWN_FAST_SHIP NUM_SPAWNS EQU const_value +SPAWN_N_A EQU -1 + ; Flypoints indexes (see data/maps/flypoints.asm) const_def ; johto diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index 59a98bce5..a128ae414 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -1,40 +1,40 @@ ; object_struct members (see macros/wram.asm) - const_def - const OBJECT_SPRITE ; 00 - const OBJECT_MAP_OBJECT_INDEX ; 01 - const OBJECT_SPRITE_TILE ; 02 - const OBJECT_MOVEMENTTYPE ; 03 - const OBJECT_FLAGS1 ; 04 - const OBJECT_FLAGS2 ; 05 - const OBJECT_PALETTE ; 06 - const OBJECT_DIRECTION_WALKING ; 07 - const OBJECT_FACING ; 08 - const OBJECT_STEP_TYPE ; 09 - const OBJECT_STEP_DURATION ; 0a - const OBJECT_ACTION ; 0b - const OBJECT_STEP_FRAME ; 0c - const OBJECT_FACING_STEP ; 0d - const OBJECT_NEXT_TILE ; 0e - const OBJECT_STANDING_TILE ; 0f - const OBJECT_NEXT_MAP_X ; 10 - const OBJECT_NEXT_MAP_Y ; 11 - const OBJECT_MAP_X ; 12 - const OBJECT_MAP_Y ; 13 - const OBJECT_INIT_X ; 14 - const OBJECT_INIT_Y ; 15 - const OBJECT_RADIUS ; 16 - const OBJECT_SPRITE_X ; 17 - const OBJECT_SPRITE_Y ; 18 - const OBJECT_SPRITE_X_OFFSET ; 19 - const OBJECT_SPRITE_Y_OFFSET ; 1a - const OBJECT_MOVEMENT_BYTE_INDEX ; 1b - const OBJECT_1C ; 1c - const OBJECT_1D ; 1d - const OBJECT_1E ; 1e - const OBJECT_1F ; 1f - const OBJECT_RANGE ; 20 - const_skip 7 -OBJECT_LENGTH EQU const_value +rsreset +OBJECT_SPRITE rb ; 00 +OBJECT_MAP_OBJECT_INDEX rb ; 01 +OBJECT_SPRITE_TILE rb ; 02 +OBJECT_MOVEMENTTYPE rb ; 03 +OBJECT_FLAGS1 rb ; 04 +OBJECT_FLAGS2 rb ; 05 +OBJECT_PALETTE rb ; 06 +OBJECT_DIRECTION_WALKING rb ; 07 +OBJECT_FACING rb ; 08 +OBJECT_STEP_TYPE rb ; 09 +OBJECT_STEP_DURATION rb ; 0a +OBJECT_ACTION rb ; 0b +OBJECT_STEP_FRAME rb ; 0c +OBJECT_FACING_STEP rb ; 0d +OBJECT_NEXT_TILE rb ; 0e +OBJECT_STANDING_TILE rb ; 0f +OBJECT_NEXT_MAP_X rb ; 10 +OBJECT_NEXT_MAP_Y rb ; 11 +OBJECT_MAP_X rb ; 12 +OBJECT_MAP_Y rb ; 13 +OBJECT_INIT_X rb ; 14 +OBJECT_INIT_Y rb ; 15 +OBJECT_RADIUS rb ; 16 +OBJECT_SPRITE_X rb ; 17 +OBJECT_SPRITE_Y rb ; 18 +OBJECT_SPRITE_X_OFFSET rb ; 19 +OBJECT_SPRITE_Y_OFFSET rb ; 1a +OBJECT_MOVEMENT_BYTE_INDEX rb ; 1b +OBJECT_1C rb ; 1c +OBJECT_1D rb ; 1d +OBJECT_1E rb ; 1e +OBJECT_1F rb ; 1f +OBJECT_RANGE rb ; 20 + rb_skip 7 +OBJECT_LENGTH EQU _RS NUM_OBJECT_STRUCTS EQU 13 ; see wObjectStructs ; object_struct OBJECT_FACING values @@ -97,33 +97,31 @@ RELATIVE_ATTRIBUTES EQU 1 << RELATIVE_ATTRIBUTES_F ABSOLUTE_TILE_ID EQU 1 << ABSOLUTE_TILE_ID_F ; map_object struct members (see macros/wram.asm) - const_def - const MAPOBJECT_OBJECT_STRUCT_ID ; 0 - const MAPOBJECT_SPRITE ; 1 - const MAPOBJECT_Y_COORD ; 2 - const MAPOBJECT_X_COORD ; 3 - const MAPOBJECT_MOVEMENT ; 4 - const MAPOBJECT_RADIUS ; 5 - const MAPOBJECT_HOUR ; 6 - const MAPOBJECT_TIMEOFDAY ; 7 - const MAPOBJECT_COLOR ; 8 - const MAPOBJECT_RANGE ; 9 - const MAPOBJECT_SCRIPT_POINTER ; a - const_skip ; high MAPOBJECT_SCRIPT_POINTER byte - const MAPOBJECT_EVENT_FLAG ; c - const_skip ; high MAPOBJECT_EVENT_FLAG byte - const_skip 2 ; unused -MAPOBJECT_LENGTH EQU const_value +rsreset +MAPOBJECT_OBJECT_STRUCT_ID rb ; 0 +MAPOBJECT_SPRITE rb ; 1 +MAPOBJECT_Y_COORD rb ; 2 +MAPOBJECT_X_COORD rb ; 3 +MAPOBJECT_MOVEMENT rb ; 4 +MAPOBJECT_RADIUS rb ; 5 +MAPOBJECT_HOUR rb ; 6 +MAPOBJECT_TIMEOFDAY rb ; 7 +MAPOBJECT_COLOR rb ; 8 +MAPOBJECT_RANGE rb ; 9 +MAPOBJECT_SCRIPT_POINTER rw ; a +MAPOBJECT_EVENT_FLAG rw ; c + rb_skip 2 +MAPOBJECT_LENGTH EQU _RS ; SpriteMovementData struct members (see data/sprites/map_objects.asm) - const_def - const SPRITEMOVEATTR_MOVEMENT ; 0 - const SPRITEMOVEATTR_FACING ; 1 - const SPRITEMOVEATTR_ACTION ; 2 - const SPRITEMOVEATTR_FLAGS1 ; 3 - const SPRITEMOVEATTR_FLAGS2 ; 4 - const SPRITEMOVEATTR_PALFLAGS ; 5 -NUM_SPRITEMOVEDATA_FIELDS EQU const_value +rsreset +SPRITEMOVEATTR_MOVEMENT rb ; 0 +SPRITEMOVEATTR_FACING rb ; 1 +SPRITEMOVEATTR_ACTION rb ; 2 +SPRITEMOVEATTR_FLAGS1 rb ; 3 +SPRITEMOVEATTR_FLAGS2 rb ; 4 +SPRITEMOVEATTR_PALFLAGS rb ; 5 +NUM_SPRITEMOVEDATA_FIELDS EQU _RS MAPOBJECT_SCREEN_WIDTH EQU (SCREEN_WIDTH / 2) + 2 MAPOBJECT_SCREEN_HEIGHT EQU (SCREEN_HEIGHT / 2) + 2 @@ -199,6 +197,7 @@ NUM_SPRITEMOVEDATA EQU const_value const SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE ; 19 const SPRITEMOVEFN_BOULDERDUST ; 1a const SPRITEMOVEFN_GRASS ; 1b +NUM_SPRITEMOVEFN EQU const_value ; StepTypesJumptable indexes (see engine/overworld/map_objects.asm) const_def @@ -228,6 +227,7 @@ NUM_SPRITEMOVEDATA EQU const_value const STEP_TYPE_17 ; 17 const STEP_TYPE_DELETE ; 18 const STEP_TYPE_SKYFALL_TOP ; 19 +NUM_STEP_TYPES EQU const_value ; ObjectActionPairPointers indexes (see engine/overworld/map_object_action.asm) const_def @@ -248,6 +248,7 @@ NUM_SPRITEMOVEDATA EQU const_value const OBJECT_ACTION_BOULDER_DUST ; 0e const OBJECT_ACTION_GRASS_SHAKE ; 0f const OBJECT_ACTION_SKYFALL ; 10 +NUM_OBJECT_ACTIONS EQU const_value ; Facings indexes (see data/sprites/facings.asm) const_def @@ -283,6 +284,7 @@ NUM_SPRITEMOVEDATA EQU const_value const FACING_BOULDER_DUST_2 ; 1d const FACING_GRASS_1 ; 1e const FACING_GRASS_2 ; 1f +NUM_FACINGS EQU const_value ; DoPlayerMovement.DoStep arguments (see engine/overworld/player_movement.asm) const_def @@ -294,3 +296,4 @@ NUM_SPRITEMOVEDATA EQU const_value const STEP_TURN ; 5 const STEP_BACK_LEDGE ; 6 const STEP_WALK_IN_PLACE ; 7 +NUM_STEPS EQU const_value diff --git a/constants/menu_constants.asm b/constants/menu_constants.asm index 031a5e2bf..060bfc453 100644 --- a/constants/menu_constants.asm +++ b/constants/menu_constants.asm @@ -63,6 +63,7 @@ const MONMENUITEM_MOVE ; 19 const MONMENUITEM_MAIL ; 20 const MONMENUITEM_ERROR ; 21 +NUM_MONMENUITEMS EQU const_value - 1 ; MonMenuOptions categories MONMENU_FIELD_MOVE EQU 0 @@ -86,6 +87,7 @@ HMENURETURN_ASM EQU %11111111 const PARTYMENUACTION_GIVE_MON_FEMALE ; unused const PARTYMENUACTION_GIVE_ITEM const PARTYMENUACTION_MOBILE ; mobile +NUM_PARTYMENUACTIONS EQU const_value ; PrintPartyMenuActionText arguments (see engine/pokemon/party_menu.asm) const_next $f0 const PARTYMENUTEXT_HEAL_PSN diff --git a/constants/move_constants.asm b/constants/move_constants.asm index 1a3d4f1ae..5f6bff0cb 100644 --- a/constants/move_constants.asm +++ b/constants/move_constants.asm @@ -285,6 +285,7 @@ NUM_ATTACKS EQU const_value - 1 const ANIM_WOBBLE ; 113 const ANIM_SHAKE ; 114 const ANIM_HIT_CONFUSION ; 115 +NUM_BATTLE_ANIMS EQU const_value - 1 ; wNumHits uses offsets from ANIM_MISS const_def diff --git a/constants/move_effect_constants.asm b/constants/move_effect_constants.asm index 0ca97f380..79babcf74 100644 --- a/constants/move_effect_constants.asm +++ b/constants/move_effect_constants.asm @@ -157,3 +157,4 @@ const EFFECT_BEAT_UP const EFFECT_FLY const EFFECT_DEFENSE_CURL +NUM_MOVE_EFECTS EQU const_value diff --git a/constants/music_constants.asm b/constants/music_constants.asm index 83085ef0c..941cb2bfb 100644 --- a/constants/music_constants.asm +++ b/constants/music_constants.asm @@ -107,6 +107,7 @@ const MUSIC_SUICUNE_BATTLE ; 64 const MUSIC_BATTLE_TOWER_LOBBY ; 65 const MUSIC_MOBILE_CENTER ; 66 +NUM_MUSIC_SONGS EQU const_value ; GetMapMusic picks music for this value (see home/map.asm) MUSIC_MAHOGANY_MART EQU $64 diff --git a/constants/npc_trade_constants.asm b/constants/npc_trade_constants.asm index f84db5df4..e0218e1d5 100644 --- a/constants/npc_trade_constants.asm +++ b/constants/npc_trade_constants.asm @@ -1,14 +1,16 @@ ; npctrade struct members (see data/events/npc_trades.asm) -NPCTRADE_DIALOG EQU 0 ; db -NPCTRADE_GIVEMON EQU 1 ; db -NPCTRADE_GETMON EQU 2 ; db -NPCTRADE_NICK EQU 3 ; ds MON_NAME_LENGTH -NPCTRADE_DVS EQU 14 ; dw -NPCTRADE_ITEM EQU 16 ; db -NPCTRADE_OT_ID EQU 17 ; dw -NPCTRADE_OT_NAME EQU 19 ; ds NAME_LENGTH -NPCTRADE_GENDER EQU 30 ; db -NPCTRADE_PADDING EQU 31 ; db +rsreset +NPCTRADE_DIALOG rb +NPCTRADE_GIVEMON rb +NPCTRADE_GETMON rb +NPCTRADE_NICK rb MON_NAME_LENGTH +NPCTRADE_DVS rw +NPCTRADE_ITEM rb +NPCTRADE_OT_ID rw +NPCTRADE_OT_NAME rb NAME_LENGTH +NPCTRADE_GENDER rb +NPCTRADE_PADDING rb +NPCTRADE_STRUCT_LENGTH EQU _RS ; NPCTrades indexes (see data/events/npc_trades.asm) const_def diff --git a/constants/phone_constants.asm b/constants/phone_constants.asm index 273044c4d..4c318dbbd 100644 --- a/constants/phone_constants.asm +++ b/constants/phone_constants.asm @@ -38,6 +38,7 @@ const PHONE_HIKER_PARRY const PHONE_PICNICKER_ERIN const PHONE_BUENA +NUM_PHONE_CONTACTS EQU const_value - 1 ; SpecialPhoneCallList indexes (see data/phone/special_calls.asm) const_def @@ -50,6 +51,8 @@ const SPECIALCALL_BIKESHOP const SPECIALCALL_WORRIED const SPECIALCALL_MASTERBALL +NUM_SPECIALCALLS EQU const_value - 1 +SPECIALCALL_SIZE EQU 6 ; phone struct members const_def diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm index 328a6a6fa..138a32414 100644 --- a/constants/pokemon_data_constants.asm +++ b/constants/pokemon_data_constants.asm @@ -1,30 +1,35 @@ ; base data struct members (see data/pokemon/base_stats/*.asm) -BASE_DEX_NO EQUS "(wBaseDexNo - wCurBaseData)" -BASE_STATS EQUS "(wBaseStats - wCurBaseData)" -BASE_HP EQUS "(wBaseHP - wCurBaseData)" -BASE_ATK EQUS "(wBaseAttack - wCurBaseData)" -BASE_SPD EQUS "(wBaseSpeed - wCurBaseData)" -BASE_SAT EQUS "(wBaseSpecialAttack - wCurBaseData)" -BASE_SDF EQUS "(wBaseSpecialDefense - wCurBaseData)" -BASE_TYPES EQUS "(wBaseType - wCurBaseData)" -BASE_TYPE_1 EQUS "(wBaseType1 - wCurBaseData)" -BASE_TYPE_2 EQUS "(wBaseType2 - wCurBaseData)" -BASE_CATCH_RATE EQUS "(wBaseCatchRate - wCurBaseData)" -BASE_EXP EQUS "(wBaseExp - wCurBaseData)" -BASE_ITEMS EQUS "(wBaseItems - wCurBaseData)" -BASE_ITEM_1 EQUS "(wBaseItem1 - wCurBaseData)" -BASE_ITEM_2 EQUS "(wBaseItem2 - wCurBaseData)" -BASE_GENDER EQUS "(wBaseGender - wCurBaseData)" -BASE_UNKNOWN_1 EQUS "(wBaseUnknown1 - wCurBaseData)" -BASE_EGG_STEPS EQUS "(wBaseEggSteps - wCurBaseData)" -BASE_UNKNOWN_2 EQUS "(wBaseUnknown2 - wCurBaseData)" -BASE_PIC_SIZE EQUS "(wBasePicSize - wCurBaseData)" -BASE_FRONTPIC EQUS "(wBaseUnusedFrontpic - wCurBaseData)" -BASE_BACKPIC EQUS "(wBaseUnusedBackpic - wCurBaseData)" -BASE_GROWTH_RATE EQUS "(wBaseGrowthRate - wCurBaseData)" -BASE_EGG_GROUPS EQUS "(wBaseEggGroups - wCurBaseData)" -BASE_TMHM EQUS "(wBaseTMHM - wCurBaseData)" -BASE_DATA_SIZE EQUS "(wCurBaseDataEnd - wCurBaseData)" +rsreset +BASE_DEX_NO rb +BASE_STATS rb NUM_STATS +rsset BASE_STATS +BASE_HP rb +BASE_ATK rb +BASE_DEF rb +BASE_SPD rb +BASE_SAT rb +BASE_SDF rb +BASE_TYPES rw +rsset BASE_TYPES +BASE_TYPE_1 rb +BASE_TYPE_2 rb +BASE_CATCH_RATE rb +BASE_EXP rb +BASE_ITEMS rw +rsset BASE_ITEMS +BASE_ITEM_1 rb +BASE_ITEM_2 rb +BASE_GENDER rb + rb_skip +BASE_EGG_STEPS rb + rb_skip +BASE_PIC_SIZE rb +BASE_FRONTPIC rw +BASE_BACKPIC rw +BASE_GROWTH_RATE rb +BASE_EGG_GROUPS rb +BASE_TMHM rb (NUM_TM_HM_TUTOR + 7) / 8 +BASE_DATA_SIZE EQU _RS ; gender ratio constants GENDER_F0 EQU 0 percent @@ -67,39 +72,44 @@ GENDER_UNKNOWN EQU -1 NUM_DEX_ENTRY_BANKS EQU 4 ; party_struct members (see macros/wram.asm) -MON_SPECIES EQUS "(wPartyMon1Species - wPartyMon1)" -MON_ITEM EQUS "(wPartyMon1Item - wPartyMon1)" -MON_MOVES EQUS "(wPartyMon1Moves - wPartyMon1)" -MON_ID EQUS "(wPartyMon1ID - wPartyMon1)" -MON_EXP EQUS "(wPartyMon1Exp - wPartyMon1)" -MON_STAT_EXP EQUS "(wPartyMon1StatExp - wPartyMon1)" -MON_HP_EXP EQUS "(wPartyMon1HPExp - wPartyMon1)" -MON_ATK_EXP EQUS "(wPartyMon1AtkExp - wPartyMon1)" -MON_DEF_EXP EQUS "(wPartyMon1DefExp - wPartyMon1)" -MON_SPD_EXP EQUS "(wPartyMon1SpdExp - wPartyMon1)" -MON_SPC_EXP EQUS "(wPartyMon1SpcExp - wPartyMon1)" -MON_DVS EQUS "(wPartyMon1DVs - wPartyMon1)" -MON_PP EQUS "(wPartyMon1PP - wPartyMon1)" -MON_HAPPINESS EQUS "(wPartyMon1Happiness - wPartyMon1)" -MON_PKRUS EQUS "(wPartyMon1PokerusStatus - wPartyMon1)" -MON_CAUGHTDATA EQUS "(wPartyMon1CaughtData - wPartyMon1)" -MON_CAUGHTLEVEL EQUS "(wPartyMon1CaughtLevel - wPartyMon1)" -MON_CAUGHTTIME EQUS "(wPartyMon1CaughtTime - wPartyMon1)" -MON_CAUGHTGENDER EQUS "(wPartyMon1CaughtGender - wPartyMon1)" -MON_CAUGHTLOCATION EQUS "(wPartyMon1CaughtLocation - wPartyMon1)" -MON_LEVEL EQUS "(wPartyMon1Level - wPartyMon1)" -MON_STATUS EQUS "(wPartyMon1Status - wPartyMon1)" -MON_HP EQUS "(wPartyMon1HP - wPartyMon1)" -MON_MAXHP EQUS "(wPartyMon1MaxHP - wPartyMon1)" -MON_ATK EQUS "(wPartyMon1Attack - wPartyMon1)" -MON_DEF EQUS "(wPartyMon1Defense - wPartyMon1)" -MON_SPD EQUS "(wPartyMon1Speed - wPartyMon1)" -MON_SAT EQUS "(wPartyMon1SpclAtk - wPartyMon1)" -MON_SDF EQUS "(wPartyMon1SpclDef - wPartyMon1)" -BOXMON_STRUCT_LENGTH EQUS "(wPartyMon1BoxEnd - wPartyMon1)" -PARTYMON_STRUCT_LENGTH EQUS "(wPartyMon1StructEnd - wPartyMon1)" - -NICKNAMED_MON_STRUCT_LENGTH EQUS "(PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH)" +rsreset +MON_SPECIES rb +MON_ITEM rb +MON_MOVES rb NUM_MOVES +MON_ID rw +MON_EXP rb 3 +MON_STAT_EXP rw NUM_EXP_STATS +rsset MON_STAT_EXP +MON_HP_EXP rw +MON_ATK_EXP rw +MON_DEF_EXP rw +MON_SPD_EXP rw +MON_SPC_EXP rw +MON_DVS rw +MON_PP rb NUM_MOVES +MON_HAPPINESS rb +MON_PKRUS rb +MON_CAUGHTDATA rw +rsset MON_CAUGHTDATA +MON_CAUGHTTIME rb +MON_CAUGHTGENDER rb +rsset MON_CAUGHTDATA +MON_CAUGHTLEVEL rb +MON_CAUGHTLOCATION rb +MON_LEVEL rb +BOXMON_STRUCT_LENGTH EQU _RS +MON_STATUS rb + rb_skip +MON_HP rw +MON_MAXHP rw +MON_ATK rw +MON_DEF rw +MON_SPD rw +MON_SAT rw +MON_SDF rw +PARTYMON_STRUCT_LENGTH EQU _RS + +NICKNAMED_MON_STRUCT_LENGTH EQU PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH REDMON_STRUCT_LENGTH EQU 44 ; caught data @@ -116,6 +126,8 @@ CAUGHT_BY_BOY EQU 2 CAUGHT_EGG_LEVEL EQU 1 +MON_CRY_LENGTH EQU 6 + ; maximum number of party pokemon PARTY_LENGTH EQU 6 @@ -199,6 +211,7 @@ NUM_TREEMON_SETS EQU const_value const HAPPINESS_REVIVALHERB ; 11 const HAPPINESS_GROOMING ; 12 const HAPPINESS_GAINLEVELATHOME ; 13 +NUM_HAPPINESS_CHANGES EQU const_value - 1 ; significant happiness values BASE_HAPPINESS EQU 70 diff --git a/constants/radio_constants.asm b/constants/radio_constants.asm index 11143f6ee..f8f32588f 100644 --- a/constants/radio_constants.asm +++ b/constants/radio_constants.asm @@ -15,6 +15,7 @@ const POKE_FLUTE_RADIO ; 08 const UNOWN_RADIO ; 09 const EVOLUTION_RADIO ; 0a +NUM_RADIO_CHANNELS EQU const_value ; internal indexes for channel segments const OAKS_POKEMON_TALK_2 ; 0b const OAKS_POKEMON_TALK_3 ; 0c @@ -93,6 +94,7 @@ const POKEDEX_SHOW_6 ; 55 const POKEDEX_SHOW_7 ; 56 const POKEDEX_SHOW_8 ; 57 +NUM_RADIO_SEGMENTS EQU const_value ; PlayRadio.StationPointers indexes (see engine/pokegear/pokegear.asm) const_def @@ -106,9 +108,6 @@ const MAPRADIO_LETS_ALL_SING const MAPRADIO_ROCKET -; OaksPKMNTalkRoutes size (see data/radio/oaks_pkmn_talk_routes.asm) -NUM_OAKS_POKEMON_TALK_ROUTES EQU 15 - ; These tables in engine/pokegear/radio.asm are all sized to a power of 2 ; so there's no need for a rejection sampling loop NUM_OAKS_POKEMON_TALK_ADVERBS EQU 16 ; OaksPKMNTalk8.Adverbs diff --git a/constants/script_constants.asm b/constants/script_constants.asm index fe5d2d7c4..7c9881988 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -175,6 +175,7 @@ NUM_CMDQUEUE_TYPES EQU const_value const FLOOR_10F const FLOOR_11F const FLOOR_ROOF +NUM_FLOORS EQU const_value ; showemote arguments ; Emotes indexes (see data/sprites/emotes.asm) @@ -191,7 +192,9 @@ NUM_CMDQUEUE_TYPES EQU const_value const EMOTE_ROD ; 9 const EMOTE_BOULDER_DUST ; 10 const EMOTE_GRASS_RUSTLE ; 11 +NUM_EMOTES EQU const_value EMOTE_FROM_MEM EQU -1 +EMOTE_LENGTH EQU 6 ; fruittree arguments ; FruitTreeItems indexes (see data/items/fruit_trees.asm) @@ -236,6 +239,7 @@ NUM_FRUIT_TREES EQU const_value - 1 const DECODESC_RIGHT_DOLL ; 2 const DECODESC_BIG_DOLL ; 3 const DECODESC_CONSOLE ; 4 +NUM_DECODESCS EQU const_value ; swarm arguments ; StoreSwarmMapIndices arguments diff --git a/constants/sfx_constants.asm b/constants/sfx_constants.asm index 113cf5f39..ed2f6eb4c 100644 --- a/constants/sfx_constants.asm +++ b/constants/sfx_constants.asm @@ -210,3 +210,5 @@ const SFX_TWO_PC_BEEPS ; cc const SFX_4_NOTE_DITTY ; cd const SFX_TWINKLE ; ce + +NUM_SFX EQU const_value diff --git a/constants/sprite_anim_constants.asm b/constants/sprite_anim_constants.asm index 474f2a23f..1d47a2fd0 100644 --- a/constants/sprite_anim_constants.asm +++ b/constants/sprite_anim_constants.asm @@ -1,22 +1,22 @@ ; sprite_anim_struct members (see macros/wram.asm) - const_def - const SPRITEANIMSTRUCT_INDEX ; 0 - const SPRITEANIMSTRUCT_FRAMESET_ID ; 1 - const SPRITEANIMSTRUCT_ANIM_SEQ_ID ; 2 - const SPRITEANIMSTRUCT_TILE_ID ; 3 - const SPRITEANIMSTRUCT_XCOORD ; 4 - const SPRITEANIMSTRUCT_YCOORD ; 5 - const SPRITEANIMSTRUCT_XOFFSET ; 6 - const SPRITEANIMSTRUCT_YOFFSET ; 7 - const SPRITEANIMSTRUCT_DURATION ; 8 - const SPRITEANIMSTRUCT_DURATIONOFFSET ; 9 - const SPRITEANIMSTRUCT_FRAME ; a - const SPRITEANIMSTRUCT_JUMPTABLE_INDEX ; b - const SPRITEANIMSTRUCT_VAR1 ; c - const SPRITEANIMSTRUCT_VAR2 ; d - const SPRITEANIMSTRUCT_VAR3 ; e - const SPRITEANIMSTRUCT_VAR4 ; f -SPRITEANIMSTRUCT_LENGTH EQU const_value +rsreset +SPRITEANIMSTRUCT_INDEX rb ; 0 +SPRITEANIMSTRUCT_FRAMESET_ID rb ; 1 +SPRITEANIMSTRUCT_ANIM_SEQ_ID rb ; 2 +SPRITEANIMSTRUCT_TILE_ID rb ; 3 +SPRITEANIMSTRUCT_XCOORD rb ; 4 +SPRITEANIMSTRUCT_YCOORD rb ; 5 +SPRITEANIMSTRUCT_XOFFSET rb ; 6 +SPRITEANIMSTRUCT_YOFFSET rb ; 7 +SPRITEANIMSTRUCT_DURATION rb ; 8 +SPRITEANIMSTRUCT_DURATIONOFFSET rb ; 9 +SPRITEANIMSTRUCT_FRAME rb ; a +SPRITEANIMSTRUCT_JUMPTABLE_INDEX rb ; b +SPRITEANIMSTRUCT_VAR1 rb ; c +SPRITEANIMSTRUCT_VAR2 rb ; d +SPRITEANIMSTRUCT_VAR3 rb ; e +SPRITEANIMSTRUCT_VAR4 rb ; f +SPRITEANIMSTRUCT_LENGTH EQU _RS NUM_SPRITE_ANIM_STRUCTS EQU 10 ; see wSpriteAnimationStructs ; wSpriteAnimDict keys (see wram.asm) @@ -79,6 +79,7 @@ NUM_SPRITEANIMDICT_ENTRIES EQU 10 const SPRITE_ANIM_INDEX_INTRO_UNOWN_F ; 2a const SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY ; 2b const SPRITE_ANIM_INDEX_CELEBI ; 2c +NUM_SPRITE_ANIM_INDEXES EQU const_value ; DoAnimFrame.Jumptable indexes (see engine/gfx/sprite_anims.asm) const_def @@ -117,6 +118,7 @@ NUM_SPRITEANIMDICT_ENTRIES EQU 10 const SPRITE_ANIM_SEQ_INTRO_UNOWN ; 20 const SPRITE_ANIM_SEQ_INTRO_UNOWN_F ; 21 const SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY ; 22 +NUM_SPRITE_ANIM_SEQS EQU const_value ; SpriteAnimFrameData indexes (see data/sprite_anims/framesets.asm) const_def @@ -186,6 +188,7 @@ NUM_SPRITEANIMDICT_ENTRIES EQU 10 const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F ; 3f const SPRITE_ANIM_FRAMESET_CELEBI_LEFT ; 40 const SPRITE_ANIM_FRAMESET_CELEBI_RIGHT ; 41 +NUM_SPRITE_ANIM_FRAMESETS EQU const_value ; SpriteAnimOAMData indexes (see data/sprite_anims/oam.asm) const_def @@ -329,3 +332,4 @@ NUM_SPRITEANIMDICT_ENTRIES EQU 10 const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9 ; 89 const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10 ; 8a const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11 ; 8b +NUM_SPRITE_ANIM_OAMSETS EQU const_value diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm index 0909aef25..288f2e9a8 100644 --- a/constants/sprite_constants.asm +++ b/constants/sprite_constants.asm @@ -104,6 +104,7 @@ const SPRITE_ENTEI ; 64 const SPRITE_RAIKOU ; 65 const SPRITE_STANDING_YOUNGSTER ; 66 +NUM_OVERWORLD_SPRITES EQU const_value - 1 ; SpriteMons indexes (see data/sprites/sprite_mons.asm) const_next $80 @@ -143,6 +144,7 @@ SPRITE_POKEMON EQU const_value const SPRITE_GYARADOS ; a0 const SPRITE_LUGIA ; a1 const SPRITE_HO_OH ; a2 +NUM_POKEMON_SPRITES EQU const_value - SPRITE_POKEMON ; special GetMonSprite values (see engine/overworld/overworld.asm) const_next $e0 diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm index 79be4ad57..a77b26587 100644 --- a/constants/tileset_constants.asm +++ b/constants/tileset_constants.asm @@ -36,6 +36,13 @@ const TILESET_KABUTO_WORD_ROOM ; 22 const TILESET_OMANYTE_WORD_ROOM ; 23 const TILESET_AERODACTYL_WORD_ROOM ; 24 +NUM_TILESETS EQU const_value - 1 + +; wTileset struct size +TILESET_LENGTH EQU 15 + +; roof length (see gfx/tilesets/roofs) +ROOF_LENGTH EQU 9 ; bg palette values (see gfx/tilesets/*_palette_map.asm) ; TilesetBGPalette indexes (see gfx/tilesets/bg_tiles.pal) diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm index 80231fb67..d71df38e1 100644 --- a/constants/trainer_constants.asm +++ b/constants/trainer_constants.asm @@ -25,6 +25,7 @@ CHRIS EQU __trainer_class__ const PHONECONTACT_BILL const PHONECONTACT_ELM const PHONECONTACT_BUENA +NUM_NONTRAINER_PHONECONTACTS EQU const_value - 1 KRIS EQU __trainer_class__ trainerclass FALKNER ; 1 @@ -702,4 +703,4 @@ KRIS EQU __trainer_class__ trainerclass MYSTICALMAN ; 43 const EUSINE -NUM_TRAINER_CLASSES EQU __trainer_class__ +NUM_TRAINER_CLASSES EQU __trainer_class__ - 1 diff --git a/constants/type_constants.asm b/constants/type_constants.asm index c18d71c73..5bce009d5 100644 --- a/constants/type_constants.asm +++ b/constants/type_constants.asm @@ -34,4 +34,6 @@ SPECIAL EQU const_value const DARK TYPES_END EQU const_value -NUM_TYPES EQU TYPES_END + UNUSED_TYPES - UNUSED_TYPES_END +NUM_TYPES EQU TYPES_END + UNUSED_TYPES - UNUSED_TYPES_END - 1 ; discount BIRD + +POKEDEX_TYPE_STRING_LENGTH EQU 9 |