diff options
Diffstat (limited to 'constants')
27 files changed, 188 insertions, 117 deletions
diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm index f5895dd9..88d31892 100644 --- a/constants/audio_constants.asm +++ b/constants/audio_constants.asm @@ -30,44 +30,45 @@ 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 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 2 +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 2 +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 2 +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..8c013829 100644 --- a/constants/battle_anim_constants.asm +++ b/constants/battle_anim_constants.asm @@ -7,6 +7,7 @@ const BATTLEANIMSTRUCT_FUNCTION const BATTLEANIMSTRUCT_PALETTE const BATTLEANIMSTRUCT_TILEID +BATTLEANIMOBJ_LENGTH EQU const_value - 1 ; discount BATTLEANIMSTRUCT_INDEX const BATTLEANIMSTRUCT_XCOORD const BATTLEANIMSTRUCT_YCOORD const BATTLEANIMSTRUCT_XOFFSET @@ -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,6 +813,7 @@ 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 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..a0084927 100644 --- a/constants/deco_constants.asm +++ b/constants/deco_constants.asm @@ -1,3 +1,13 @@ +; decoration attributes + const_def + const DECOATTR_TYPE + const DECOATTR_NAME + const DECOATTR_ACTION + const DECOATTR_EVENT_FLAG + const_skip ; high DECOATTR_EVENT_FLAG byte + const DECOATTR_SPRITE +DECOATTR_STRUCT_LENGTH EQU const_value + ; decoration types const_def 1 const DECO_PLANT @@ -6,6 +16,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 +62,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 +137,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..4f9f06e5 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 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/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..5ce308ee 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -199,6 +199,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 +228,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 +248,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 +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 @@ -292,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 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..c953216e 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 +BASE_UNKNOWN_1 rb +BASE_EGG_STEPS rb +BASE_UNKNOWN_2 rb +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,40 @@ 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 3 +MON_LEVEL rb +BOXMON_STRUCT_LENGTH EQU _RS +MON_STATUS rb 2 +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 +158,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 +188,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..8a372f4e 100644 --- a/constants/sprite_anim_constants.asm +++ b/constants/sprite_anim_constants.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 |