diff options
Diffstat (limited to 'constants')
28 files changed, 313 insertions, 237 deletions
diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm index f5895dd9..640b1e8c 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 fa34f3ad..f1a966f7 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 @@ -762,6 +767,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) @@ -807,14 +813,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 2a4821a6..c7d3f155 100644 --- a/constants/battle_constants.asm +++ b/constants/battle_constants.asm @@ -118,6 +118,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 @@ -147,6 +148,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/credits_constants.asm b/constants/credits_constants.asm index b0dad230..5f48071e 100644 --- a/constants/credits_constants.asm +++ b/constants/credits_constants.asm @@ -76,6 +76,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 654aac52..94db303a 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 29aea301..27fa09f2 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 cd03d860..fe042b15 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 12 ; see wUsedSprites diff --git a/constants/icon_constants.asm b/constants/icon_constants.asm index 378ff072..e148c0aa 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 4763454e..84a00b98 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 f6d6384c..4c2d761c 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 a0746ec1..afece24e 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 @@ -48,7 +47,6 @@ const LANDMARK_DARK_CAVE ; 2b const LANDMARK_ROUTE_46 ; 2c const LANDMARK_SILVER_CAVE ; 2d - KANTO_LANDMARK EQU const_value const LANDMARK_PALLET_TOWN ; 2e const LANDMARK_ROUTE_1 ; 2f @@ -99,6 +97,7 @@ KANTO_LANDMARK EQU const_value const LANDMARK_TOHJO_FALLS ; 5c const LANDMARK_ROUTE_28 ; 5d const LANDMARK_FAST_SHIP ; 5e +NUM_LANDMARKS EQU const_value ; Regions const_def diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm index 1679e6cd..152f795f 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 5fffd403..e387c647 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 @@ -227,6 +226,7 @@ NUM_SPRITEMOVEDATA EQU const_value const STEP_TYPE_16 ; 16 const STEP_TYPE_17 ; 17 const STEP_TYPE_DELETE ; 18 +NUM_STEP_TYPES EQU const_value ; ObjectActionPairPointers indexes (see engine/overworld/map_object_action.asm) const_def @@ -246,6 +246,7 @@ NUM_SPRITEMOVEDATA EQU const_value const OBJECT_ACTION_BIG_DOLL ; 0d const OBJECT_ACTION_BOULDER_DUST ; 0e const OBJECT_ACTION_GRASS_SHAKE ; 0f +NUM_OBJECT_ACTIONS EQU const_value ; Facings indexes (see data/sprites/facings.asm) const_def @@ -281,6 +282,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 @@ -292,3 +294,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 69d3af36..6d7d9f85 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 @@ -85,6 +86,7 @@ HMENURETURN_ASM EQU %11111111 const PARTYMENUACTION_GIVE_MON const PARTYMENUACTION_GIVE_MON_FEMALE ; unused const PARTYMENUACTION_GIVE_ITEM +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 1a3d4f1a..5f6bff0c 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 0ca97f38..79babcf7 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 d225787c..2d1761ee 100644 --- a/constants/music_constants.asm +++ b/constants/music_constants.asm @@ -1,7 +1,6 @@ ; song ids ; Music indexes (see audio/music_pointers.asm) const_def - const MUSIC_NONE ; 00 const MUSIC_TITLE ; 01 const MUSIC_ROUTE_1 ; 02 @@ -95,6 +94,7 @@ const MUSIC_LAKE_OF_RAGE_ROCKET_RADIO ; 5a const MUSIC_PRINTER ; 5b const MUSIC_POST_CREDITS ; 5c +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 6e1d45c9..51431e8c 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 d4db60e9..48ae6e2d 100644 --- a/constants/phone_constants.asm +++ b/constants/phone_constants.asm @@ -37,6 +37,7 @@ const PHONE_BLACKBELT_KENJI const PHONE_HIKER_PARRY const PHONE_PICNICKER_ERIN +NUM_PHONE_CONTACTS EQU const_value - 1 ; SpecialPhoneCallList indexes (see data/phone/special_calls.asm) const_def @@ -49,6 +50,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 6946b692..a8612454 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 + 7) / 8 +BASE_DATA_SIZE EQU _RS ; gender ratio constants GENDER_F0 EQU 0 percent @@ -67,36 +72,42 @@ 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_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 + rb_skip 2 +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 +MON_CRY_LENGTH EQU 6 + ; maximum number of party pokemon PARTY_LENGTH EQU 6 @@ -149,7 +160,7 @@ NUM_ROAMMON_MAPS EQU 16 ; RoamMaps table size (see data/wild/roammon_maps.asm) const TREEMON_SET_CANYON const TREEMON_SET_ROCK NUM_TREEMON_SETS EQU const_value -; last 2 are unused/ignored +; last two are unused/ignored const TREEMON_SET_UNUSED const TREEMON_SET_CITY @@ -179,6 +190,7 @@ NUM_TREEMON_SETS EQU const_value const HAPPINESS_ENERGYROOT ; 10 const HAPPINESS_REVIVALHERB ; 11 const HAPPINESS_GROOMING ; 12 +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 557b7dde..0a6f5d49 100644 --- a/constants/radio_constants.asm +++ b/constants/radio_constants.asm @@ -14,6 +14,7 @@ const POKE_FLUTE_RADIO ; 07 const UNOWN_RADIO ; 08 const EVOLUTION_RADIO ; 09 +NUM_RADIO_CHANNELS EQU const_value ; internal indexes for channel segments const OAKS_POKEMON_TALK_2 ; 0a const OAKS_POKEMON_TALK_3 ; 0b @@ -72,6 +73,7 @@ const POKEDEX_SHOW_6 ; 40 const POKEDEX_SHOW_7 ; 41 const POKEDEX_SHOW_8 ; 42 +NUM_RADIO_SEGMENTS EQU const_value ; PlayRadio.StationPointers indexes (see engine/pokegear/pokegear.asm) const_def @@ -85,9 +87,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 e98a53b2..0b3de75c 100644 --- a/constants/script_constants.asm +++ b/constants/script_constants.asm @@ -171,6 +171,7 @@ MAX_XYCOMPARE_LENGTH EQU 32 const FLOOR_10F const FLOOR_11F const FLOOR_ROOF +NUM_FLOORS EQU const_value ; showemote arguments ; Emotes indexes (see data/sprites/emotes.asm) @@ -187,7 +188,9 @@ MAX_XYCOMPARE_LENGTH EQU 32 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) @@ -232,6 +235,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 ; ActivateFishingSwarm setval arguments const_def diff --git a/constants/sfx_constants.asm b/constants/sfx_constants.asm index 0cecccf4..1efdd789 100644 --- a/constants/sfx_constants.asm +++ b/constants/sfx_constants.asm @@ -1,6 +1,5 @@ ; SFX indexes (see audio/sfx_pointers.asm) const_def - const SFX_DEX_FANFARE_50_79 ; 00 const SFX_ITEM ; 01 const SFX_CAUGHT_MON ; 02 @@ -189,3 +188,4 @@ const SFX_TRAIN_ARRIVED ; b9 const SFX_STOP_SLOT ; ba const SFX_2_BOOPS ; bb +NUM_SFX EQU const_value diff --git a/constants/sprite_anim_constants.asm b/constants/sprite_anim_constants.asm index 8c99ebfe..a00303c0 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) @@ -83,6 +83,7 @@ NUM_SPRITEANIMDICT_ENTRIES EQU 10 const SPRITE_ANIM_INDEX_GS_INTRO_HO_OH_LUGIA ; 2c const SPRITE_ANIM_INDEX_HEADBUTT ; 2d const SPRITE_ANIM_INDEX_EGG_HATCH ; 2e +NUM_SPRITE_ANIM_INDEXES EQU const_value ; DoAnimFrame.Jumptable indexes (see engine/gfx/sprite_anims.asm) const_def @@ -128,6 +129,7 @@ NUM_SPRITEANIMDICT_ENTRIES EQU 10 const SPRITE_ANIM_SEQ_FLY_LEAF ; 27 const SPRITE_ANIM_SEQ_FLY_TO ; 28 const SPRITE_ANIM_SEQ_GS_INTRO_HO_OH_LUGIA ; 29 +NUM_SPRITE_ANIM_SEQS EQU const_value ; SpriteAnimFrameData indexes (see data/sprite_anims/framesets.asm) const_def @@ -187,6 +189,7 @@ NUM_SPRITEANIMDICT_ENTRIES EQU 10 const SPRITE_ANIM_FRAMESET_EGG_HATCH_4 ; 35 const SPRITE_ANIM_FRAMESET_GS_INTRO_HO_OH_LUGIA ; 36 const SPRITE_ANIM_FRAMESET_HEADBUTT ; 37 +NUM_SPRITE_ANIM_FRAMESETS EQU const_value ; SpriteAnimOAMData indexes (see data/sprite_anims/oam.asm) const_def @@ -282,3 +285,4 @@ NUM_SPRITEANIMDICT_ENTRIES EQU 10 const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_4 ; 59 const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_5 ; 5a const SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2 ; 5b +NUM_SPRITE_ANIM_OAMSETS EQU const_value diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm index f3815283..021e05fd 100644 --- a/constants/sprite_constants.asm +++ b/constants/sprite_constants.asm @@ -97,6 +97,7 @@ const SPRITE_FRUIT_TREE ; 5d const SPRITE_GOLD_TROPHY ; 5e const SPRITE_SILVER_TROPHY ; 5f +NUM_OVERWORLD_SPRITES EQU const_value - 1 ; SpriteMons indexes (see data/sprites/sprite_mons.asm) const_next $80 @@ -136,6 +137,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 e02393cb..527740d8 100644 --- a/constants/tileset_constants.asm +++ b/constants/tileset_constants.asm @@ -28,6 +28,13 @@ const TILESET_ICE_PATH ; 1a const TILESET_DARK_CAVE ; 1b const TILESET_FOREST ; 1c +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 f849f0d3..f9f56461 100644 --- a/constants/trainer_constants.asm +++ b/constants/trainer_constants.asm @@ -22,6 +22,7 @@ CHRIS EQU __trainer_class__ const PHONECONTACT_BIKESHOP const PHONECONTACT_BILL const PHONECONTACT_ELM +NUM_NONTRAINER_PHONECONTACTS EQU const_value - 1 trainerclass FALKNER ; 1 const FALKNER1 @@ -656,4 +657,4 @@ CHRIS EQU __trainer_class__ const GRUNTF_4 const GRUNTF_5 -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 c18d71c7..5bce009d 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 |