diff --git a/asm/macros/scrcmd.inc b/asm/macros/scrcmd.inc index a424111416..f477419ec4 100644 --- a/asm/macros/scrcmd.inc +++ b/asm/macros/scrcmd.inc @@ -7,6 +7,10 @@ #include "generated/journal_location_events.h" #include "generated/journal_online_events.h" #include "generated/map_headers.h" +#include "generated/mart_decor_id.h" +#include "generated/mart_frontier_id.h" +#include "generated/mart_seal_id.h" +#include "generated/mart_specialties_id.h" #include "generated/moves.h" #include "generated/npc_trades.h" #include "generated/poketch_apps.h" diff --git a/generated/mart_decor_id.txt b/generated/mart_decor_id.txt new file mode 100644 index 0000000000..dca9aa1e0b --- /dev/null +++ b/generated/mart_decor_id.txt @@ -0,0 +1,2 @@ +MART_DECOR_ID_VEILSTONE_4F_UP +MART_DECOR_ID_VEILSTONE_4F_DOWN diff --git a/generated/mart_frontier_id.txt b/generated/mart_frontier_id.txt new file mode 100644 index 0000000000..23dd30f49c --- /dev/null +++ b/generated/mart_frontier_id.txt @@ -0,0 +1,2 @@ +MART_FRONTIER_ID_EXCHANGE_SERVICE_CORNER_UP +MART_FRONTIER_ID_EXCHANGE_SERVICE_CORNER_DOWN diff --git a/generated/mart_seal_id.txt b/generated/mart_seal_id.txt new file mode 100644 index 0000000000..c1d9093a9b --- /dev/null +++ b/generated/mart_seal_id.txt @@ -0,0 +1,7 @@ +MART_SEAL_ID_SUNYSHORE_MONDAY +MART_SEAL_ID_SUNYSHORE_TUESDAY +MART_SEAL_ID_SUNYSHORE_WEDNESDAY +MART_SEAL_ID_SUNYSHORE_THURSDAY +MART_SEAL_ID_SUNYSHORE_FRIDAY +MART_SEAL_ID_SUNYSHORE_SATURDAY +MART_SEAL_ID_SUNYSHORE_SUNDAY diff --git a/generated/mart_specialties_id.txt b/generated/mart_specialties_id.txt new file mode 100644 index 0000000000..662e757b9b --- /dev/null +++ b/generated/mart_specialties_id.txt @@ -0,0 +1,20 @@ +MART_SPECIALTIES_ID_JUBILIFE +MART_SPECIALTIES_ID_OREBURGH +MART_SPECIALTIES_ID_FLOAROMA +MART_SPECIALTIES_ID_ETERNA_MART +MART_SPECIALTIES_ID_ETERNA_HOUSE +MART_SPECIALTIES_ID_HEARTHOME +MART_SPECIALTIES_ID_SOLACEON +MART_SPECIALTIES_ID_PASTORIA +MART_SPECIALTIES_ID_VEILSTONE_1F_RIGHT +MART_SPECIALTIES_ID_VEILSTONE_1F_LEFT +MART_SPECIALTIES_ID_VEILSTONE_2F_UP +MART_SPECIALTIES_ID_VEILSTONE_2F_MID +MART_SPECIALTIES_ID_VEILSTONE_3F_UP +MART_SPECIALTIES_ID_VEILSTONE_3F_DOWN +MART_SPECIALTIES_ID_CELESTIC +MART_SPECIALTIES_ID_SNOWPOINT +MART_SPECIALTIES_ID_CANALAVE +MART_SPECIALTIES_ID_SUNYSHORE +MART_SPECIALTIES_ID_POKEMON_LEAGUE +MART_SPECIALTIES_ID_VEILSTONE_B1F diff --git a/generated/meson.build b/generated/meson.build index e6c47f3505..a24f55060d 100644 --- a/generated/meson.build +++ b/generated/meson.build @@ -85,7 +85,11 @@ metang_generators = { 'trainer_score_events': { 'type': 'enum', 'tag': 'TrainerScoreEvent' }, 'trainer_types': { 'type': 'enum', 'tag': 'TrainerType' }, 'tutor_locations': {'type': 'enum', 'tag': 'TutorLocation'}, - 'villa_furnitures': {'type': 'enum', 'tag': 'VillaFurniture'} + 'villa_furnitures': {'type': 'enum', 'tag': 'VillaFurniture'}, + 'mart_specialties_id': {'type': 'enum', 'tag': 'MartSpecialtiesID'}, + 'mart_decor_id': {'type': 'enum', 'tag': 'MartDecorID'}, + 'mart_seal_id': {'type': 'enum', 'tag': 'MartSealID'}, + 'mart_frontier_id': {'type': 'enum', 'tag': 'MartFrontierId'}, } c_consts_generators = [] diff --git a/include/constants/items.h b/include/constants/items.h index b8aee3164a..18b42091a7 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -96,5 +96,6 @@ #define PLUCK_EFFECT_TEMP_ACC_UP 23 #define ITEM_RETURN_ID 0xFFFF +#define SHOP_ITEM_END (ITEM_RETURN_ID) #endif // POKEPLATINUM_CONSTANTS_ITEMS_H diff --git a/include/data/mart_items.h b/include/data/mart_items.h index b694b4c2a5..1ec0fe1909 100644 --- a/include/data/mart_items.h +++ b/include/data/mart_items.h @@ -1,5 +1,9 @@ #include "constants/items.h" #include "constants/seals.h" +#include "generated/mart_decor_id.h" +#include "generated/mart_frontier_id.h" +#include "generated/mart_seal_id.h" +#include "generated/mart_specialties_id.h" typedef struct { u16 itemID; @@ -31,21 +35,21 @@ const PokeMartCommonItem PokeMartCommonItems[] = { const u16 JubilifeMartSpecialties[] = { ITEM_AIR_MAIL, ITEM_HEAL_BALL, - 0xffff + SHOP_ITEM_END }; const u16 OreburghMartSpecialties[] = { ITEM_TUNNEL_MAIL, ITEM_HEAL_BALL, ITEM_NET_BALL, - 0xffff + SHOP_ITEM_END }; const u16 FloaromaMartSpecialties[] = { ITEM_BLOOM_MAIL, ITEM_HEAL_BALL, ITEM_NET_BALL, - 0xffff + SHOP_ITEM_END }; const u16 EternaMartSpecialties[] = { @@ -53,7 +57,7 @@ const u16 EternaMartSpecialties[] = { ITEM_HEAL_BALL, ITEM_NET_BALL, ITEM_NEST_BALL, - 0xffff + SHOP_ITEM_END }; const u16 EternaHerbShopStock[] = { @@ -61,7 +65,7 @@ const u16 EternaHerbShopStock[] = { ITEM_ENERGYPOWDER, ITEM_ENERGY_ROOT, ITEM_REVIVAL_HERB, - 0xffff + SHOP_ITEM_END }; const u16 HearthomeMartSpecialties[] = { @@ -69,7 +73,7 @@ const u16 HearthomeMartSpecialties[] = { ITEM_HEAL_BALL, ITEM_NET_BALL, ITEM_NEST_BALL, - 0xffff + SHOP_ITEM_END }; const u16 SolaceonMartSpecialties[] = { @@ -77,7 +81,7 @@ const u16 SolaceonMartSpecialties[] = { ITEM_NET_BALL, ITEM_NEST_BALL, ITEM_DUSK_BALL, - 0xffff + SHOP_ITEM_END }; const u16 PastoriaMartSpecialties[] = { @@ -85,7 +89,7 @@ const u16 PastoriaMartSpecialties[] = { ITEM_NEST_BALL, ITEM_DUSK_BALL, ITEM_QUICK_BALL, - 0xffff + SHOP_ITEM_END }; const u16 VeilstoneDeptStoreStock_1F_RIGHT[] = { @@ -100,7 +104,7 @@ const u16 VeilstoneDeptStoreStock_1F_RIGHT[] = { ITEM_ICE_HEAL, ITEM_AWAKENING, ITEM_FULL_HEAL, - 0xffff + SHOP_ITEM_END }; const u16 VeilstoneDeptStoreStock_1F_LEFT[] = { @@ -116,7 +120,7 @@ const u16 VeilstoneDeptStoreStock_1F_LEFT[] = { ITEM_FLAME_MAIL, ITEM_BUBBLE_MAIL, ITEM_SPACE_MAIL, - 0xffff + SHOP_ITEM_END }; const u16 VeilstoneDeptStoreStock_2F_UP[] = { @@ -128,7 +132,7 @@ const u16 VeilstoneDeptStoreStock_2F_UP[] = { ITEM_X_ACCURACY, ITEM_X_SPECIAL, ITEM_X_SP__DEF, - 0xffff + SHOP_ITEM_END }; const u16 VeilstoneDeptStoreStock_2F_MID[] = { @@ -138,7 +142,7 @@ const u16 VeilstoneDeptStoreStock_2F_MID[] = { ITEM_ZINC, ITEM_CARBOS, ITEM_HP_UP, - 0xffff + SHOP_ITEM_END }; const u16 VeilstoneDeptStoreStock_3F_UP[] = { @@ -149,7 +153,7 @@ const u16 VeilstoneDeptStoreStock_3F_UP[] = { ITEM_TM33, ITEM_TM16, ITEM_TM70, - 0xffff + SHOP_ITEM_END }; const u16 VeilstoneDeptStoreStock_3F_DOWN[] = { @@ -159,7 +163,7 @@ const u16 VeilstoneDeptStoreStock_3F_DOWN[] = { ITEM_TM22, ITEM_TM52, ITEM_TM15, - 0xffff + SHOP_ITEM_END }; const u16 CelesticMartSpecialties[] = { @@ -167,7 +171,7 @@ const u16 CelesticMartSpecialties[] = { ITEM_DUSK_BALL, ITEM_QUICK_BALL, ITEM_TIMER_BALL, - 0xffff + SHOP_ITEM_END }; const u16 SnowpointMartSpecialties[] = { @@ -175,7 +179,7 @@ const u16 SnowpointMartSpecialties[] = { ITEM_DUSK_BALL, ITEM_QUICK_BALL, ITEM_TIMER_BALL, - 0xffff + SHOP_ITEM_END }; const u16 CanalaveMartSpecialties[] = { @@ -183,13 +187,13 @@ const u16 CanalaveMartSpecialties[] = { ITEM_QUICK_BALL, ITEM_TIMER_BALL, ITEM_REPEAT_BALL, - 0xffff + SHOP_ITEM_END }; const u16 SunyshoreMartSpecialties[] = { ITEM_STEEL_MAIL, ITEM_LUXURY_BALL, - 0xffff + SHOP_ITEM_END }; const u16 PokemonLeagueMartSpecialties[] = { @@ -201,7 +205,7 @@ const u16 PokemonLeagueMartSpecialties[] = { ITEM_TIMER_BALL, ITEM_REPEAT_BALL, ITEM_LUXURY_BALL, - 0xffff + SHOP_ITEM_END }; const u16 VeilstoneDeptStoreStock_B1F_DOWN_LEFT[] = { @@ -210,30 +214,30 @@ const u16 VeilstoneDeptStoreStock_B1F_DOWN_LEFT[] = { ITEM_MAGO_BERRY, ITEM_AGUAV_BERRY, ITEM_IAPAPA_BERRY, - 0xffff + SHOP_ITEM_END }; const u16 *PokeMartSpecialties[] = { - JubilifeMartSpecialties, - OreburghMartSpecialties, - FloaromaMartSpecialties, - EternaMartSpecialties, - EternaHerbShopStock, - HearthomeMartSpecialties, - SolaceonMartSpecialties, - PastoriaMartSpecialties, - VeilstoneDeptStoreStock_1F_RIGHT, - VeilstoneDeptStoreStock_1F_LEFT, - VeilstoneDeptStoreStock_2F_UP, - VeilstoneDeptStoreStock_2F_MID, - VeilstoneDeptStoreStock_3F_UP, - VeilstoneDeptStoreStock_3F_DOWN, - CelesticMartSpecialties, - SnowpointMartSpecialties, - CanalaveMartSpecialties, - SunyshoreMartSpecialties, - PokemonLeagueMartSpecialties, - VeilstoneDeptStoreStock_B1F_DOWN_LEFT + [MART_SPECIALTIES_ID_JUBILIFE] = JubilifeMartSpecialties, + [MART_SPECIALTIES_ID_OREBURGH] = OreburghMartSpecialties, + [MART_SPECIALTIES_ID_FLOAROMA] = FloaromaMartSpecialties, + [MART_SPECIALTIES_ID_ETERNA_MART] = EternaMartSpecialties, + [MART_SPECIALTIES_ID_ETERNA_HOUSE] = EternaHerbShopStock, + [MART_SPECIALTIES_ID_HEARTHOME] = HearthomeMartSpecialties, + [MART_SPECIALTIES_ID_SOLACEON] = SolaceonMartSpecialties, + [MART_SPECIALTIES_ID_PASTORIA] = PastoriaMartSpecialties, + [MART_SPECIALTIES_ID_VEILSTONE_1F_RIGHT] = VeilstoneDeptStoreStock_1F_RIGHT, + [MART_SPECIALTIES_ID_VEILSTONE_1F_LEFT] = VeilstoneDeptStoreStock_1F_LEFT, + [MART_SPECIALTIES_ID_VEILSTONE_2F_UP] = VeilstoneDeptStoreStock_2F_UP, + [MART_SPECIALTIES_ID_VEILSTONE_2F_MID] = VeilstoneDeptStoreStock_2F_MID, + [MART_SPECIALTIES_ID_VEILSTONE_3F_UP] = VeilstoneDeptStoreStock_3F_UP, + [MART_SPECIALTIES_ID_VEILSTONE_3F_DOWN] = VeilstoneDeptStoreStock_3F_DOWN, + [MART_SPECIALTIES_ID_CELESTIC] = CelesticMartSpecialties, + [MART_SPECIALTIES_ID_SNOWPOINT] = SnowpointMartSpecialties, + [MART_SPECIALTIES_ID_CANALAVE] = CanalaveMartSpecialties, + [MART_SPECIALTIES_ID_SUNYSHORE] = SunyshoreMartSpecialties, + [MART_SPECIALTIES_ID_POKEMON_LEAGUE] = PokemonLeagueMartSpecialties, + [MART_SPECIALTIES_ID_VEILSTONE_B1F] = VeilstoneDeptStoreStock_B1F_DOWN_LEFT }; const u16 VeilstoneDeptStoreStock_4F_UP[] = { @@ -242,7 +246,7 @@ const u16 VeilstoneDeptStoreStock_4F_UP[] = { 0x19, 0x1A, 0x1B, - 0xffff + SHOP_ITEM_END }; const u16 VeilstoneDeptStoreStock_4F_DOWN[] = { @@ -252,12 +256,12 @@ const u16 VeilstoneDeptStoreStock_4F_DOWN[] = { 0x77, 0x78, 0x79, - 0xffff + SHOP_ITEM_END }; const u16 *VeilstoneDeptStoreDecorationStocks[] = { - VeilstoneDeptStoreStock_4F_UP, - VeilstoneDeptStoreStock_4F_DOWN + [MART_DECOR_ID_VEILSTONE_4F_UP] = VeilstoneDeptStoreStock_4F_UP, + [MART_DECOR_ID_VEILSTONE_4F_DOWN] = VeilstoneDeptStoreStock_4F_DOWN }; const u16 SunyshoreMarketStockMonday[] = { @@ -268,7 +272,7 @@ const u16 SunyshoreMarketStockMonday[] = { LINE_SEAL_C, ELE_SEAL_B, PARTY_SEAL_D, - 0xffff + SHOP_ITEM_END }; const u16 SunyshoreMarketStockTuesday[] = { @@ -279,7 +283,7 @@ const u16 SunyshoreMarketStockTuesday[] = { SONG_SEAL_B, LINE_SEAL_D, ELE_SEAL_C, - 0xffff + SHOP_ITEM_END }; const u16 SunyshoreMarketStockWednesday[] = { @@ -290,7 +294,7 @@ const u16 SunyshoreMarketStockWednesday[] = { SONG_SEAL_C, SMOKE_SEAL_A, ELE_SEAL_D, - 0xffff + SHOP_ITEM_END }; const u16 SunyshoreMarketStockThursday[] = { @@ -301,7 +305,7 @@ const u16 SunyshoreMarketStockThursday[] = { SONG_SEAL_D, STAR_SEAL_E, SMOKE_SEAL_B, - 0xffff + SHOP_ITEM_END }; const u16 SunyshoreMarketStockFriday[] = { @@ -312,7 +316,7 @@ const u16 SunyshoreMarketStockFriday[] = { HEART_SEAL_E, STAR_SEAL_F, SMOKE_SEAL_C, - 0xffff + SHOP_ITEM_END }; const u16 SunyshoreMarketStockSaturday[] = { @@ -323,7 +327,7 @@ const u16 SunyshoreMarketStockSaturday[] = { HEART_SEAL_F, LINE_SEAL_A, SMOKE_SEAL_D, - 0xffff + SHOP_ITEM_END }; const u16 SunyshoreMarketStockSunday[] = { @@ -334,15 +338,15 @@ const u16 SunyshoreMarketStockSunday[] = { LINE_SEAL_B, ELE_SEAL_A, PARTY_SEAL_C, - 0xffff + SHOP_ITEM_END }; const u16 *SunyshoreMarketDailyStocks[] = { - SunyshoreMarketStockMonday, - SunyshoreMarketStockTuesday, - SunyshoreMarketStockWednesday, - SunyshoreMarketStockThursday, - SunyshoreMarketStockFriday, - SunyshoreMarketStockSaturday, - SunyshoreMarketStockSunday + [MART_SEAL_ID_SUNYSHORE_MONDAY] = SunyshoreMarketStockMonday, + [MART_SEAL_ID_SUNYSHORE_TUESDAY] = SunyshoreMarketStockTuesday, + [MART_SEAL_ID_SUNYSHORE_WEDNESDAY] = SunyshoreMarketStockWednesday, + [MART_SEAL_ID_SUNYSHORE_THURSDAY] = SunyshoreMarketStockThursday, + [MART_SEAL_ID_SUNYSHORE_FRIDAY] = SunyshoreMarketStockFriday, + [MART_SEAL_ID_SUNYSHORE_SATURDAY] = SunyshoreMarketStockSaturday, + [MART_SEAL_ID_SUNYSHORE_SUNDAY] = SunyshoreMarketStockSunday }; diff --git a/res/field/scripts/scripts_battle_frontier.s b/res/field/scripts/scripts_battle_frontier.s index 4c10f4bf81..71aeb480b7 100644 --- a/res/field/scripts/scripts_battle_frontier.s +++ b/res/field/scripts/scripts_battle_frontier.s @@ -274,7 +274,7 @@ _026A: FacePlayer Message 21 ScrCmd_035 - PokeMartFrontier 1 + PokeMartFrontier MART_FRONTIER_ID_EXCHANGE_SERVICE_CORNER_DOWN ReleaseAll End @@ -297,7 +297,7 @@ _02A6: FacePlayer Message 23 ScrCmd_035 - PokeMartFrontier 0 + PokeMartFrontier MART_FRONTIER_ID_EXCHANGE_SERVICE_CORNER_UP ReleaseAll End diff --git a/res/field/scripts/scripts_battle_park_exchange_service_corner.s b/res/field/scripts/scripts_battle_park_exchange_service_corner.s index 8ab4d5038e..25b44079d6 100644 --- a/res/field/scripts/scripts_battle_park_exchange_service_corner.s +++ b/res/field/scripts/scripts_battle_park_exchange_service_corner.s @@ -25,7 +25,7 @@ _0030: FacePlayer Message 15 ScrCmd_035 - PokeMartFrontier 0 + PokeMartFrontier MART_FRONTIER_ID_EXCHANGE_SERVICE_CORNER_UP ReleaseAll End @@ -35,7 +35,7 @@ _0044: FacePlayer Message 15 ScrCmd_035 - PokeMartFrontier 1 + PokeMartFrontier MART_FRONTIER_ID_EXCHANGE_SERVICE_CORNER_DOWN ReleaseAll End diff --git a/res/field/scripts/scripts_canalave_city_mart.s b/res/field/scripts/scripts_canalave_city_mart.s index e9e82b784e..5fc27b52cb 100644 --- a/res/field/scripts/scripts_canalave_city_mart.s +++ b/res/field/scripts/scripts_canalave_city_mart.s @@ -25,7 +25,7 @@ _0028: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 16 + PokeMartSpecialties MART_SPECIALTIES_ID_CANALAVE ReleaseAll End diff --git a/res/field/scripts/scripts_celestic_town_northwest_house.s b/res/field/scripts/scripts_celestic_town_northwest_house.s index af6114ce09..52def7c33a 100644 --- a/res/field/scripts/scripts_celestic_town_northwest_house.s +++ b/res/field/scripts/scripts_celestic_town_northwest_house.s @@ -36,7 +36,7 @@ _0041: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 14 + PokeMartSpecialties MART_SPECIALTIES_ID_CELESTIC ReleaseAll End diff --git a/res/field/scripts/scripts_eterna_city_mart.s b/res/field/scripts/scripts_eterna_city_mart.s index a7e0c38fa7..2643720978 100644 --- a/res/field/scripts/scripts_eterna_city_mart.s +++ b/res/field/scripts/scripts_eterna_city_mart.s @@ -25,7 +25,7 @@ _0028: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 3 + PokeMartSpecialties MART_SPECIALTIES_ID_ETERNA_MART ReleaseAll End diff --git a/res/field/scripts/scripts_eterna_city_north_house.s b/res/field/scripts/scripts_eterna_city_north_house.s index 734cc55b79..d0c89efffb 100644 --- a/res/field/scripts/scripts_eterna_city_north_house.s +++ b/res/field/scripts/scripts_eterna_city_north_house.s @@ -14,7 +14,7 @@ _000E: FacePlayer Message 0 ScrCmd_035 - PokeMartSpecialties 4 + PokeMartSpecialties MART_SPECIALTIES_ID_ETERNA_HOUSE ReleaseAll End diff --git a/res/field/scripts/scripts_floaroma_town_mart.s b/res/field/scripts/scripts_floaroma_town_mart.s index e0d4227009..eb4329a6bd 100644 --- a/res/field/scripts/scripts_floaroma_town_mart.s +++ b/res/field/scripts/scripts_floaroma_town_mart.s @@ -25,7 +25,7 @@ _0028: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 2 + PokeMartSpecialties MART_SPECIALTIES_ID_FLOAROMA ReleaseAll End diff --git a/res/field/scripts/scripts_hearthome_city_mart.s b/res/field/scripts/scripts_hearthome_city_mart.s index 0f0ca1503f..40f3682207 100644 --- a/res/field/scripts/scripts_hearthome_city_mart.s +++ b/res/field/scripts/scripts_hearthome_city_mart.s @@ -25,7 +25,7 @@ _0028: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 5 + PokeMartSpecialties MART_SPECIALTIES_ID_HEARTHOME ReleaseAll End diff --git a/res/field/scripts/scripts_jubilife_city_mart.s b/res/field/scripts/scripts_jubilife_city_mart.s index 349bcdd65c..f2b50cecb1 100644 --- a/res/field/scripts/scripts_jubilife_city_mart.s +++ b/res/field/scripts/scripts_jubilife_city_mart.s @@ -26,7 +26,7 @@ _002C: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 0 + PokeMartSpecialties MART_SPECIALTIES_ID_JUBILIFE ReleaseAll End diff --git a/res/field/scripts/scripts_oreburgh_city_mart.s b/res/field/scripts/scripts_oreburgh_city_mart.s index cfa37ac7de..81865d07e9 100644 --- a/res/field/scripts/scripts_oreburgh_city_mart.s +++ b/res/field/scripts/scripts_oreburgh_city_mart.s @@ -25,7 +25,7 @@ _0028: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 1 + PokeMartSpecialties MART_SPECIALTIES_ID_OREBURGH ReleaseAll End diff --git a/res/field/scripts/scripts_pastoria_city_mart.s b/res/field/scripts/scripts_pastoria_city_mart.s index d416ecaad4..073854da32 100644 --- a/res/field/scripts/scripts_pastoria_city_mart.s +++ b/res/field/scripts/scripts_pastoria_city_mart.s @@ -26,7 +26,7 @@ _002C: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 7 + PokeMartSpecialties MART_SPECIALTIES_ID_PASTORIA ReleaseAll End diff --git a/res/field/scripts/scripts_pokemon_league_north_pokecenter_1f.s b/res/field/scripts/scripts_pokemon_league_north_pokecenter_1f.s index d9051bf38a..a065f4c17f 100644 --- a/res/field/scripts/scripts_pokemon_league_north_pokecenter_1f.s +++ b/res/field/scripts/scripts_pokemon_league_north_pokecenter_1f.s @@ -113,7 +113,7 @@ _013E: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 18 + PokeMartSpecialties MART_SPECIALTIES_ID_POKEMON_LEAGUE ReleaseAll End diff --git a/res/field/scripts/scripts_pokemon_league_south_pokecenter_1f.s b/res/field/scripts/scripts_pokemon_league_south_pokecenter_1f.s index 5fb5195430..24209f1604 100644 --- a/res/field/scripts/scripts_pokemon_league_south_pokecenter_1f.s +++ b/res/field/scripts/scripts_pokemon_league_south_pokecenter_1f.s @@ -36,7 +36,7 @@ _0042: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 18 + PokeMartSpecialties MART_SPECIALTIES_ID_POKEMON_LEAGUE ReleaseAll End diff --git a/res/field/scripts/scripts_snowpoint_city_mart.s b/res/field/scripts/scripts_snowpoint_city_mart.s index b3e00f693a..9571200eb9 100644 --- a/res/field/scripts/scripts_snowpoint_city_mart.s +++ b/res/field/scripts/scripts_snowpoint_city_mart.s @@ -25,7 +25,7 @@ _0028: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 15 + PokeMartSpecialties MART_SPECIALTIES_ID_SNOWPOINT ReleaseAll End diff --git a/res/field/scripts/scripts_solaceon_town_mart.s b/res/field/scripts/scripts_solaceon_town_mart.s index 54c306504c..c40cde29a3 100644 --- a/res/field/scripts/scripts_solaceon_town_mart.s +++ b/res/field/scripts/scripts_solaceon_town_mart.s @@ -25,7 +25,7 @@ _0028: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 6 + PokeMartSpecialties MART_SPECIALTIES_ID_SOLACEON ReleaseAll End diff --git a/res/field/scripts/scripts_sunyshore_city.s b/res/field/scripts/scripts_sunyshore_city.s index a54e3a7560..8fac41b9b7 100644 --- a/res/field/scripts/scripts_sunyshore_city.s +++ b/res/field/scripts/scripts_sunyshore_city.s @@ -653,31 +653,31 @@ _0791: End _0806: - PokeMartSeal 0 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_MONDAY GoTo _084C _0810: - PokeMartSeal 1 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_TUESDAY GoTo _084C _081A: - PokeMartSeal 2 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_WEDNESDAY GoTo _084C _0824: - PokeMartSeal 3 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_THURSDAY GoTo _084C _082E: - PokeMartSeal 4 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_FRIDAY GoTo _084C _0838: - PokeMartSeal 5 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_SATURDAY GoTo _084C _0842: - PokeMartSeal 6 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_SUNDAY GoTo _084C _084C: diff --git a/res/field/scripts/scripts_sunyshore_city_mart.s b/res/field/scripts/scripts_sunyshore_city_mart.s index d3558bfdae..a563d8da8f 100644 --- a/res/field/scripts/scripts_sunyshore_city_mart.s +++ b/res/field/scripts/scripts_sunyshore_city_mart.s @@ -25,7 +25,7 @@ _0028: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 17 + PokeMartSpecialties MART_SPECIALTIES_ID_SUNYSHORE ReleaseAll End diff --git a/res/field/scripts/scripts_sunyshore_market.s b/res/field/scripts/scripts_sunyshore_market.s index 508bf723e3..1c5605f5bb 100644 --- a/res/field/scripts/scripts_sunyshore_market.s +++ b/res/field/scripts/scripts_sunyshore_market.s @@ -95,31 +95,31 @@ _00E4: End _014B: - PokeMartSeal 0 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_MONDAY Return _0151: - PokeMartSeal 1 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_TUESDAY Return _0157: - PokeMartSeal 2 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_WEDNESDAY Return _015D: - PokeMartSeal 3 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_THURSDAY Return _0163: - PokeMartSeal 4 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_FRIDAY Return _0169: - PokeMartSeal 5 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_SATURDAY Return _016F: - PokeMartSeal 6 + PokeMartSeal MART_SEAL_ID_SUNYSHORE_SUNDAY Return _0175: diff --git a/res/field/scripts/scripts_unk_1087.s b/res/field/scripts/scripts_unk_1087.s index 27831a2e99..2b9db350ca 100644 --- a/res/field/scripts/scripts_unk_1087.s +++ b/res/field/scripts/scripts_unk_1087.s @@ -22,7 +22,7 @@ _0020: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 14 + PokeMartSpecialties MART_SPECIALTIES_ID_CELESTIC ReleaseAll End diff --git a/res/field/scripts/scripts_veilstone_store_1f.s b/res/field/scripts/scripts_veilstone_store_1f.s index a38917b8a8..b6e4196340 100644 --- a/res/field/scripts/scripts_veilstone_store_1f.s +++ b/res/field/scripts/scripts_veilstone_store_1f.s @@ -49,7 +49,7 @@ _005B: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 8 + PokeMartSpecialties MART_SPECIALTIES_ID_VEILSTONE_1F_RIGHT ReleaseAll End @@ -59,7 +59,7 @@ _0071: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 9 + PokeMartSpecialties MART_SPECIALTIES_ID_VEILSTONE_1F_LEFT ReleaseAll End diff --git a/res/field/scripts/scripts_veilstone_store_2f.s b/res/field/scripts/scripts_veilstone_store_2f.s index cbace8c0b5..af4b053f68 100644 --- a/res/field/scripts/scripts_veilstone_store_2f.s +++ b/res/field/scripts/scripts_veilstone_store_2f.s @@ -163,7 +163,7 @@ _0198: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 10 + PokeMartSpecialties MART_SPECIALTIES_ID_VEILSTONE_2F_UP ReleaseAll End @@ -173,7 +173,7 @@ _01AE: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 11 + PokeMartSpecialties MART_SPECIALTIES_ID_VEILSTONE_2F_MID ReleaseAll End diff --git a/res/field/scripts/scripts_veilstone_store_3f.s b/res/field/scripts/scripts_veilstone_store_3f.s index 11a3dea5a7..00752694d3 100644 --- a/res/field/scripts/scripts_veilstone_store_3f.s +++ b/res/field/scripts/scripts_veilstone_store_3f.s @@ -111,7 +111,7 @@ _0127: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 12 + PokeMartSpecialties MART_SPECIALTIES_ID_VEILSTONE_3F_UP ReleaseAll End @@ -121,7 +121,7 @@ _013D: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 13 + PokeMartSpecialties MART_SPECIALTIES_ID_VEILSTONE_3F_DOWN ReleaseAll End diff --git a/res/field/scripts/scripts_veilstone_store_4f.s b/res/field/scripts/scripts_veilstone_store_4f.s index 9e32ed9730..2496d3ea0a 100644 --- a/res/field/scripts/scripts_veilstone_store_4f.s +++ b/res/field/scripts/scripts_veilstone_store_4f.s @@ -111,7 +111,7 @@ _0127: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartDecor 0 + PokeMartDecor MART_DECOR_ID_VEILSTONE_4F_UP ReleaseAll End @@ -121,7 +121,7 @@ _013D: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartDecor 1 + PokeMartDecor MART_DECOR_ID_VEILSTONE_4F_DOWN ReleaseAll End diff --git a/res/field/scripts/scripts_veilstone_store_b1f.s b/res/field/scripts/scripts_veilstone_store_b1f.s index 96e7c02ce6..602b139232 100644 --- a/res/field/scripts/scripts_veilstone_store_b1f.s +++ b/res/field/scripts/scripts_veilstone_store_b1f.s @@ -109,7 +109,7 @@ _00E8: FacePlayer CallCommonScript 0x7E3 ScrCmd_035 - PokeMartSpecialties 19 + PokeMartSpecialties MART_SPECIALTIES_ID_VEILSTONE_B1F ReleaseAll End diff --git a/src/scrcmd_shop.c b/src/scrcmd_shop.c index 94c36087c4..28aaeb1a40 100644 --- a/src/scrcmd_shop.c +++ b/src/scrcmd_shop.c @@ -4,6 +4,10 @@ #include #include "generated/badges.h" +#include "generated/mart_decor_id.h" +#include "generated/mart_frontier_id.h" +#include "generated/mart_seal_id.h" +#include "generated/mart_specialties_id.h" #include "data/mart_items.h" #include "overlay007/shop_menu.h" @@ -64,7 +68,7 @@ BOOL ScrCmd_PokeMartCommon(ScriptContext *ctx) } } - shopItems[i] = ITEM_RETURN_ID; + shopItems[i] = SHOP_ITEM_END; Shop_Start(ctx->task, ctx->fieldSystem, shopItems, MART_TYPE_NORMAL, FALSE); return TRUE; @@ -75,7 +79,10 @@ BOOL ScrCmd_PokeMartSpecialties(ScriptContext *ctx) u16 martID = ScriptContext_GetVar(ctx); BOOL incBuyCount; - if ((martID == 8) || (martID == 9) || (martID == 10) || (martID == 11) || (martID == 12) || (martID == 13) || (martID == 19)) { + if ((martID == MART_SPECIALTIES_ID_VEILSTONE_1F_RIGHT) || (martID == MART_SPECIALTIES_ID_VEILSTONE_1F_LEFT) + || (martID == MART_SPECIALTIES_ID_VEILSTONE_2F_UP) || (martID == MART_SPECIALTIES_ID_VEILSTONE_2F_MID) + || (martID == MART_SPECIALTIES_ID_VEILSTONE_3F_UP) || (martID == MART_SPECIALTIES_ID_VEILSTONE_3F_DOWN) + || (martID == MART_SPECIALTIES_ID_VEILSTONE_B1F)) { incBuyCount = TRUE; } else { incBuyCount = FALSE; @@ -91,11 +98,11 @@ BOOL ScrCmd_PokeMartDecor(ScriptContext *ctx) u16 martID = ScriptContext_GetVar(ctx); BOOL incBuyCount; - if ((martID == 0) || (martID == 1)) { + if ((martID == MART_DECOR_ID_VEILSTONE_4F_UP) || (martID == MART_DECOR_ID_VEILSTONE_4F_DOWN)) { incBuyCount = TRUE; } else { - // never reached as the only two instances of - // this command only sets martID to 0 and 1 + // never reached as the only two instances of this command only ever sets the + // martID to either MART_DECOR_ID_VEILSTONE_4F_UP or MART_DECOR_ID_VEILSTONE_4F_DOWN // respectively. incBuyCount = FALSE; }