diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index ff407c0c46..cf400b9cd9 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1,4 +1,5 @@ #include "config.h" +#include "config/battle.h" #include "constants/battle.h" #include "constants/battle_anim.h" #include "constants/rgb.h" @@ -7,7 +8,6 @@ #include "constants/moves.h" #include "constants/pokemon.h" #include "constants/items.h" -#include "constants/battle_config.h" .include "asm/macros.inc" .include "asm/macros/battle_anim_script.inc" .include "constants/constants.inc" diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 63719e2b61..6b80677213 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -1,4 +1,5 @@ #include "config.h" +#include "config/battle.h" #include "constants/global.h" #include "constants/battle.h" #include "constants/pokemon.h" @@ -12,7 +13,6 @@ #include "constants/songs.h" #include "constants/game_stat.h" #include "constants/trainers.h" -#include "constants/battle_config.h" #include "constants/species.h" .include "asm/macros.inc" .include "asm/macros/battle_script.inc" diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index c1dfde61d8..9b26cbd0d7 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -1,8 +1,8 @@ +#include "config/battle.h" #include "constants/battle.h" #include "constants/battle_script_commands.h" #include "constants/battle_anim.h" #include "constants/battle_string_ids.h" -#include "constants/battle_config.h" #include "constants/items.h" #include "constants/songs.h" #include "constants/game_stat.h" diff --git a/data/event_scripts.s b/data/event_scripts.s index d77b9b9de5..35d0cae2f9 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1,8 +1,9 @@ +#include "config/battle.h" +#include "config/item.h" #include "constants/global.h" #include "constants/apprentice.h" #include "constants/battle.h" #include "constants/battle_arena.h" -#include "constants/battle_config.h" #include "constants/battle_dome.h" #include "constants/battle_factory.h" #include "constants/battle_frontier.h" @@ -30,7 +31,6 @@ #include "constants/frontier_util.h" #include "constants/game_stat.h" #include "constants/item.h" -#include "constants/item_config.h" #include "constants/items.h" #include "constants/heal_locations.h" #include "constants/layouts.h" diff --git a/data/sound_data.s b/data/sound_data.s index 1bc2995808..39bef4b332 100644 --- a/data/sound_data.s +++ b/data/sound_data.s @@ -2,7 +2,7 @@ .include "asm/macros/m4a.inc" .include "asm/macros/music_voice.inc" - .include "include/constants/pokemon_config.h" + .include "include/config/pokemon.h" .include "sound/voice_groups.inc" .include "sound/keysplit_tables.inc" .include "sound/programmable_wave_data.inc" diff --git a/include/battle_bg.h b/include/battle_bg.h index d0110efa2a..1b32c7395d 100644 --- a/include/battle_bg.h +++ b/include/battle_bg.h @@ -1,7 +1,6 @@ #ifndef GUARD_BATTLE_BG_H #define GUARD_BATTLE_BG_H -#if P_ENABLE_DEBUG == TRUE struct BattleBackground { const void *tileset; @@ -10,7 +9,6 @@ struct BattleBackground const void *entryTilemap; const void *palette; }; -#endif void BattleInitBgsAndWindows(void); void InitBattleBgsVideo(void); diff --git a/include/battle_message.h b/include/battle_message.h index 5cbf8f522b..9f6905abd3 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -1,8 +1,6 @@ #ifndef GUARD_BATTLE_MESSAGE_H #define GUARD_BATTLE_MESSAGE_H -#include "constants/battle_config.h" - #if B_EXPANDED_ABILITY_NAMES == TRUE #define TEXT_BUFF_ARRAY_COUNT 17 #else diff --git a/include/constants/battle_config.h b/include/config/battle.h similarity index 98% rename from include/constants/battle_config.h rename to include/config/battle.h index 956ee1601a..644f9955c1 100644 --- a/include/constants/battle_config.h +++ b/include/config/battle.h @@ -1,5 +1,5 @@ -#ifndef GUARD_CONSTANTS_BATTLE_CONFIG_H -#define GUARD_CONSTANTS_BATTLE_CONFIG_H +#ifndef GUARD_CONFIG_BATTLE_H +#define GUARD_CONFIG_BATTLE_H // Calculation settings #define B_CRIT_CHANCE GEN_LATEST // Chances of a critical hit landing. See CalcCritChanceStage. Gen6+ chances guarantee that Farfetch'd and Sirfetch'd always get critical hits while holding a Leek and using high-crit ratio moves. @@ -197,6 +197,4 @@ #define B_NEW_IMPACT_PALETTE FALSE // If set to TRUE, it updates the basic 'hit' palette. #define B_NEW_SURF_PARTICLE_PALETTE FALSE // If set to TRUE, it updates Surf's wave palette. -#define B_ENABLE_DEBUG TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. - -#endif // GUARD_CONSTANTS_BATTLE_CONFIG_H +#endif // GUARD_CONFIG_BATTLE_H diff --git a/include/config/debug.h b/include/config/debug.h new file mode 100644 index 0000000000..fe368958f3 --- /dev/null +++ b/include/config/debug.h @@ -0,0 +1,21 @@ +#ifndef GUARD_CONFIG_DEBUG_H +#define GUARD_CONFIG_DEBUG_H + +// Overworld Debug +#define DEBUG_OVERWORLD_MENU TRUE // Enables a overworld debug menu for changing flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default. +#define DEBUG_SYSTEM_HELD_KEYS (R_BUTTON) // The keys required to be held to open the debug menu. +#define DEBUG_SYSTEM_TRIGGER_EVENT pressedStartButton // The event that opens the menu when holding the key(s) defined in DEBUG_SYSTEM_HELD_KEYS. +#define DEBUG_SYSTEM_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (above Pokédex). + +// Debug Flags +// To use the following debug features, replace the 0s with the flag ID you're assigning it to. +// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature. +#define DEBUG_FLAG_NO_COLLISION 0 // If this flag is set, the debug function in the Utility submenu to disable player collision can be used. + +// Battle Debug Menu +#define DEBUG_BATTLE_MENU TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. + +// Pokémon Debug +#define DEBUG_POKEMON_MENU TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen. + +#endif // GUARD_CONFIG_DEBUG_H diff --git a/include/constants/item_config.h b/include/config/item.h similarity index 91% rename from include/constants/item_config.h rename to include/config/item.h index e645b301da..031af37241 100644 --- a/include/constants/item_config.h +++ b/include/config/item.h @@ -1,5 +1,5 @@ -#ifndef GUARD_CONSTANTS_ITEM_CONFIG_H -#define GUARD_CONSTANTS_ITEM_CONFIG_H +#ifndef GUARD_CONFIG_ITEM_H +#define GUARD_CONFIG_ITEM_H // Item config #define I_SHINY_CHARM_REROLLS 3 // Amount of re-rolls if the player has the Shiny Charm. Set to 0 to disable Shiny Charm's effects. @@ -14,4 +14,4 @@ #define VAR_LAST_REPEL_LURE_USED 0 // If this var has been assigned, last Repel/Lure used will be saved and the player will get prompted with the vanilla repel YES/NO option, unless I_REPEL_LURE_MENU is set to TRUE. #define I_REPEL_LURE_MENU TRUE // If TRUE, the player is able to choose which Repel/Lure to use once the previous one runs out. Cursor position is saved by VAR_LAST_REPEL_LURE_USED if not 0. -#endif // GUARD_CONSTANTS_ITEM_CONFIG_H +#endif // GUARD_CONFIG_ITEM_H diff --git a/include/config/overworld.h b/include/config/overworld.h new file mode 100644 index 0000000000..fb438431b3 --- /dev/null +++ b/include/config/overworld.h @@ -0,0 +1,13 @@ +#ifndef GUARD_CONFIG_OVERWORLD_H +#define GUARD_CONFIG_OVERWORLD_H + +// Movement config +#define OW_RUNNING_INDOORS GEN_LATEST // In Gen4+, players are allowed to run indoors. + +// Overworld flags +// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. +// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature. +#define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled. +#define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to. + +#endif // GUARD_CONFIG_OVERWORLD_H diff --git a/include/constants/pokemon_config.h b/include/config/pokemon.h similarity index 78% rename from include/constants/pokemon_config.h rename to include/config/pokemon.h index dd10ee2363..3d8d7fd482 100644 --- a/include/constants/pokemon_config.h +++ b/include/config/pokemon.h @@ -1,5 +1,5 @@ -#ifndef GUARD_CONSTANTS_POKEMON_CONFIG_H -#define GUARD_CONSTANTS_POKEMON_CONFIG_H +#ifndef GUARD_CONFIG_POKEMON_H +#define GUARD_CONFIG_POKEMON_H #define P_UPDATED_TYPES GEN_LATEST // Since Gen 6, several Pokémon were changed to be partially or fully Fairy type. #define P_UPDATED_STATS GEN_LATEST // Since Gen 6, Pokémon stats are updated with each passing generation. @@ -10,6 +10,12 @@ #define P_KADABRA_EVERSTONE GEN_LATEST // Since Gen 4, Kadabra can evolve even when holding an Everstone. #define P_NIDORAN_M_DITTO_BREED GEN_LATEST // Since Gen 5, when Nidoran♂ breeds with Ditto it can produce Nidoran♀ offspring. Before, it would only yield male offspring. This change also applies to Volbeat. +// Flag settings +// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to. +// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature. +#define P_FLAG_FORCE_SHINY 0 // If this flag is set, all wild and gift Pokémon will forced into being Shiny. +#define P_FLAG_FORCE_NO_SHINY 0 // If this flag is set, all wild and gift Pokémon will forced into NOT being Shiny. + // Modifying the latest generation WILL change the saveblock due to Dex flags and will require a new save file. // Forms are kept based on the base species, Eg: Meowth and Persian will keep all of their forms, but Perrserker will not be available if P_GEN_8_POKEMON is set to FALSE. // If you're disabling a generation previous to others (eg: Gen 5 but not Gen 6, 7 and 8), @@ -20,6 +26,4 @@ #define P_GEN_7_POKEMON TRUE // Generation 7 Pokémon (SM, USUM, LGPE) #define P_GEN_8_POKEMON TRUE // Generation 8 Pokémon (SwSh, BDSP, LA) -#define P_ENABLE_DEBUG TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen. - -#endif // GUARD_CONSTANTS_POKEMON_CONFIG_H +#endif // GUARD_CONFIG_POKEMON_H diff --git a/include/constants/global.h b/include/constants/global.h index 5870cf4163..2b8b27028d 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -1,8 +1,11 @@ #ifndef GUARD_CONSTANTS_GLOBAL_H #define GUARD_CONSTANTS_GLOBAL_H -#include "constants/battle_config.h" -#include "constants/overworld_config.h" +#include "config/battle.h" +#include "config/debug.h" +#include "config/item.h" +#include "config/pokemon.h" +#include "config/overworld.h" // Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen. // In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen. diff --git a/include/constants/overworld_config.h b/include/constants/overworld_config.h deleted file mode 100644 index 4a27ded832..0000000000 --- a/include/constants/overworld_config.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef GUARD_CONSTANTS_OVERWORLD_CONFIG_H -#define GUARD_CONSTANTS_OVERWORLD_CONFIG_H - -// Movement config -#define OW_RUNNING_INDOORS GEN_LATEST // In Gen4+, players are allowed to run indoors. - -// Overworld flags -#define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled. -#define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to. - -// Debug options -#define DEBUG_SYSTEM_ENABLE TRUE // Enables a overworld debug menu for changing flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default. -#define DEBUG_SYSTEM_HELD_KEYS (R_BUTTON) // The keys required to be held to open the debug menu. -#define DEBUG_SYSTEM_TRIGGER_EVENT pressedStartButton // The event that opens the menu when holding the key(s) defined in DEBUG_SYSTEM_HELD_KEYS. -#define DEBUG_SYSTEM_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (above Pokédex). - -// Replace the used flags with others or disable with a 0 -#define DEBUG_FLAG_NO_COLLISION 0 // If this flag is set, the debug function in the Utility submenu to disable player collision can be used. - -#endif // GUARD_CONSTANTS_OVERWORLD_CONFIG_H diff --git a/include/constants/pokedex.h b/include/constants/pokedex.h index 39c09c3129..ef939b9579 100644 --- a/include/constants/pokedex.h +++ b/include/constants/pokedex.h @@ -1,7 +1,6 @@ #ifndef GUARD_CONSTANTS_POKEDEX_H #define GUARD_CONSTANTS_POKEDEX_H -#include "constants/pokemon_config.h" // National Pokedex order. // These constants are NOT disabled by P_GEN_X_POKEMON to keep pokedex_orders.h clean. enum { diff --git a/include/constants/species.h b/include/constants/species.h index 18e3138ce6..5a46e856fb 100644 --- a/include/constants/species.h +++ b/include/constants/species.h @@ -1,8 +1,6 @@ #ifndef GUARD_CONSTANTS_SPECIES_H #define GUARD_CONSTANTS_SPECIES_H -#include "constants/pokemon_config.h" - #define SPECIES_NONE 0 #define SPECIES_BULBASAUR 1 #define SPECIES_IVYSAUR 2 diff --git a/include/debug.h b/include/debug.h index f56efbde34..88f5f66620 100644 --- a/include/debug.h +++ b/include/debug.h @@ -1,8 +1,6 @@ #ifndef GUARD_DEBUG_H #define GUARD_DEBUG_H -#include "constants/overworld_config.h" - void Debug_ShowMainMenu(void); #endif // GUARD_DEBUG_H diff --git a/include/item.h b/include/item.h index e02aeb6828..cf2209e0e6 100644 --- a/include/item.h +++ b/include/item.h @@ -2,7 +2,6 @@ #define GUARD_ITEM_H #include "constants/item.h" -#include "constants/item_config.h" typedef void (*ItemUseFunc)(u8); diff --git a/include/pokedex.h b/include/pokedex.h index 703b9ab8df..96cd02affb 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -3,10 +3,7 @@ extern u8 gUnusedPokedexU8; extern void (*gPokedexVBlankCB)(void); - -#if P_ENABLE_DEBUG == TRUE extern const u8 *const gMonFootprintTable[]; -#endif enum { diff --git a/include/pokemon.h b/include/pokemon.h index c4015d5621..0f0db7da93 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -3,7 +3,6 @@ #include "sprite.h" #include "constants/region_map_sections.h" -#include "constants/pokemon_config.h" #include "constants/map_groups.h" #define GET_BASE_SPECIES_ID(speciesId) (GetFormSpeciesId(speciesId, 0)) @@ -327,7 +326,6 @@ struct BaseStats u16 flags; }; -#include "constants/battle_config.h" struct BattleMove { u16 effect; diff --git a/src/battle_anim.c b/src/battle_anim.c index 509369789c..f949065f28 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -17,7 +17,6 @@ #include "sprite.h" #include "task.h" #include "constants/battle_anim.h" -#include "constants/battle_config.h" #include "constants/moves.h" /* diff --git a/src/battle_anim_mons.c b/src/battle_anim_mons.c index 104c778852..dfe2666a6f 100644 --- a/src/battle_anim_mons.c +++ b/src/battle_anim_mons.c @@ -36,11 +36,7 @@ static void CreateBattlerTrace(struct Task *task, u8 taskId); EWRAM_DATA static union AffineAnimCmd *sAnimTaskAffineAnim = NULL; -#if P_ENABLE_DEBUG == TRUE const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = -#else -static const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] = -#endif { { // Single battle { 72, 80 }, @@ -65,11 +61,7 @@ const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS] = [CASTFORM_ICE] = { .size = MON_COORDS_SIZE(64, 48), .y_offset = 8 }, }; -#if P_ENABLE_DEBUG == TRUE const u8 sCastformElevations[NUM_CASTFORM_FORMS] = -#else -static const u8 sCastformElevations[NUM_CASTFORM_FORMS] = -#endif { [CASTFORM_NORMAL] = 13, [CASTFORM_FIRE] = 14, diff --git a/src/battle_bg.c b/src/battle_bg.c index 5ea08c97cc..c2c17d9fab 100644 --- a/src/battle_bg.c +++ b/src/battle_bg.c @@ -26,17 +26,6 @@ #include "constants/trainers.h" #include "constants/battle_anim.h" -#if !P_ENABLE_DEBUG -struct BattleBackground -{ - const void *tileset; - const void *tilemap; - const void *entryTileset; - const void *entryTilemap; - const void *palette; -}; -#endif - // .rodata static const u16 sUnrefArray[] = {0x0300, 0x0000}; //OamData? @@ -602,11 +591,7 @@ const struct WindowTemplate * const gBattleWindowTemplates[] = [B_WIN_TYPE_ARENA] = sBattleArenaWindowTemplates, }; -#if P_ENABLE_DEBUG == TRUE const struct BattleBackground sBattleTerrainTable[] = -#else -static const struct BattleBackground sBattleTerrainTable[] = -#endif { [BATTLE_TERRAIN_GRASS] = { diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 4be3426402..83c3ddb748 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -30,7 +30,6 @@ #include "util.h" #include "window.h" #include "constants/battle_anim.h" -#include "constants/battle_config.h" #include "constants/items.h" #include "constants/moves.h" #include "constants/party_menu.h" @@ -330,7 +329,7 @@ static void HandleInputChooseAction(void) { SwapHpBarsWithHpText(); } -#if B_ENABLE_DEBUG == TRUE +#if DEBUG_BATTLE_MENU == TRUE else if (JOY_NEW(SELECT_BUTTON)) { BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_DEBUG, 0); diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 1b78ec11c1..0c26fdfda8 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -23,7 +23,6 @@ #include "palette.h" #include "contest.h" #include "constants/songs.h" -#include "constants/battle_config.h" #include "constants/rgb.h" #include "constants/battle_palace.h" @@ -78,11 +77,7 @@ static const struct CompressedSpriteSheet sSpriteSheets_HealthBar[MAX_BATTLERS_C {gBlankGfxCompressed, 0x0120, TAG_HEALTHBAR_OPPONENT2_TILE} }; -#if P_ENABLE_DEBUG == TRUE const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] = -#else -static const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] = -#endif { {gBattleInterface_BallStatusBarPal, TAG_HEALTHBOX_PAL}, {gBattleInterface_BallDisplayPal, TAG_HEALTHBAR_PAL} diff --git a/src/battle_interface.c b/src/battle_interface.c index 3039c65b67..0754b4ec98 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -31,7 +31,6 @@ #include "constants/battle_anim.h" #include "constants/rgb.h" #include "constants/songs.h" -#include "constants/battle_config.h" #include "constants/items.h" enum diff --git a/src/battle_main.c b/src/battle_main.c index 9790810a1b..fb581e1961 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -52,7 +52,6 @@ #include "wild_encounter.h" #include "window.h" #include "constants/abilities.h" -#include "constants/battle_config.h" #include "constants/battle_move_effects.h" #include "constants/battle_string_ids.h" #include "constants/hold_effects.h" diff --git a/src/battle_pike.c b/src/battle_pike.c index f863282427..eca5bd167c 100644 --- a/src/battle_pike.c +++ b/src/battle_pike.c @@ -17,7 +17,6 @@ #include "constants/battle_frontier.h" #include "constants/frontier_util.h" #include "constants/abilities.h" -#include "constants/battle_config.h" #include "constants/layouts.h" #include "constants/rgb.h" #include "constants/trainers.h" diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3e52aa618c..e0e803ecdf 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -37,7 +37,6 @@ #include "wild_encounter.h" #include "rtc.h" #include "party_menu.h" -#include "constants/battle_config.h" #include "battle_arena.h" #include "battle_pike.h" #include "battle_pyramid.h" diff --git a/src/battle_util.c b/src/battle_util.c index faf4cdb89a..dbb5c9989d 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -34,7 +34,6 @@ #include "field_weather.h" #include "constants/abilities.h" #include "constants/battle_anim.h" -#include "constants/battle_config.h" #include "constants/battle_move_effects.h" #include "constants/battle_script_commands.h" #include "constants/battle_string_ids.h" @@ -7975,7 +7974,7 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating) gPotentialItemEffectBattler = battlerId; -#if B_ENABLE_DEBUG == TRUE +#if DEBUG_BATTLE_MENU == TRUE if (gBattleStruct->debugHoldEffects[battlerId] != 0 && gBattleMons[battlerId].item) return gBattleStruct->debugHoldEffects[battlerId]; else @@ -9779,8 +9778,8 @@ bool32 CanMegaEvolve(u8 battlerId) // Check if there is an entry in the evolution table for regular Mega Evolution. if (GetMegaEvolutionSpecies(species, itemId) != SPECIES_NONE) { - #if B_ENABLE_DEBUG == TRUE - if (B_ENABLE_DEBUG && gBattleStruct->debugHoldEffects[battlerId]) + #if DEBUG_BATTLE_MENU == TRUE + if (gBattleStruct->debugHoldEffects[battlerId]) holdEffect = gBattleStruct->debugHoldEffects[battlerId]; else #endif diff --git a/src/battle_z_move.c b/src/battle_z_move.c index f0d62f7fe1..7161303a15 100644 --- a/src/battle_z_move.c +++ b/src/battle_z_move.c @@ -31,7 +31,6 @@ #include "constants/battle_anim.h" #include "constants/rgb.h" #include "battle_debug.h" -#include "constants/battle_config.h" #include "data.h" #include "pokemon_summary_screen.h" #include "constants/songs.h" @@ -187,7 +186,7 @@ bool32 IsViableZMove(u8 battlerId, u16 move) return FALSE; // Partner has mega evolved or is about to mega evolve } -#if B_ENABLE_DEBUG == TRUE +#if DEBUG_BATTLE_MENU == TRUE if (gBattleStruct->debugHoldEffects[battlerId]) holdEffect = gBattleStruct->debugHoldEffects[battlerId]; else diff --git a/src/debug.c b/src/debug.c index dd0aab732f..7aa21f6a7e 100644 --- a/src/debug.c +++ b/src/debug.c @@ -58,7 +58,7 @@ #include "constants/species.h" #include "constants/weather.h" -#if DEBUG_SYSTEM_ENABLE == TRUE +#if DEBUG_OVERWORLD_MENU == TRUE // ******************************* // Enums enum { // Main @@ -3515,4 +3515,4 @@ SOUND_LIST_SE }; #undef X -#endif //DEBUG_SYSTEM_ENABLE == TRUE +#endif //DEBUG_OVERWORLD_MENU == TRUE diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 057b6185af..a4039253c6 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -4643,7 +4643,7 @@ u8 GetCollisionAtCoords(struct ObjectEvent *objectEvent, s16 x, s16 y, u32 dir) { u8 direction = dir; -#if DEBUG_SYSTEM_ENABLE == TRUE +#if DEBUG_FLAG_NO_COLLISION != 0 if (FlagGet(DEBUG_FLAG_NO_COLLISION)) return COLLISION_NONE; #endif diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 5066eca3a0..f90ef6cb57 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -131,7 +131,7 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys) else if (heldKeys & DPAD_RIGHT) input->dpadDirection = DIR_EAST; -#if DEBUG_SYSTEM_ENABLE == TRUE && DEBUG_SYSTEM_IN_MENU == FALSE +#if DEBUG_OVERWORLD_MENU == TRUE && DEBUG_SYSTEM_IN_MENU == FALSE if ((heldKeys & DEBUG_SYSTEM_HELD_KEYS) && input->DEBUG_SYSTEM_TRIGGER_EVENT) { input->input_field_1_2 = TRUE; @@ -197,7 +197,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input) if (input->pressedSelectButton && UseRegisteredKeyItemOnField() == TRUE) return TRUE; -#if DEBUG_SYSTEM_ENABLE == TRUE && DEBUG_SYSTEM_IN_MENU == FALSE +#if DEBUG_OVERWORLD_MENU == TRUE && DEBUG_SYSTEM_IN_MENU == FALSE if (input->input_field_1_2) { PlaySE(SE_WIN_OPEN); diff --git a/src/pokemon.c b/src/pokemon.c index 9478e7bafd..5b5410a915 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -39,7 +39,6 @@ #include "trainer_hill.h" #include "util.h" #include "constants/abilities.h" -#include "constants/battle_config.h" #include "constants/battle_frontier.h" #include "constants/battle_move_effects.h" #include "constants/battle_script_commands.h" @@ -1962,11 +1961,7 @@ const s8 gNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] = #include "data/pokemon/form_change_table_pointers.h" // SPECIES_NONE are ignored in the following two tables, so decrement before accessing these arrays to get the right result -#if P_ENABLE_DEBUG == TRUE const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = -#else -static const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = -#endif { [SPECIES_BULBASAUR - 1] = ANIM_V_JUMPS_H_JUMPS, [SPECIES_IVYSAUR - 1] = ANIM_V_STRETCH, diff --git a/src/pokemon_debug.c b/src/pokemon_debug.c index 447590e280..99db435409 100644 --- a/src/pokemon_debug.c +++ b/src/pokemon_debug.c @@ -39,7 +39,7 @@ #include "constants/items.h" -#if P_ENABLE_DEBUG == TRUE +#if DEBUG_POKEMON_MENU == TRUE extern const struct BattleBackground sBattleTerrainTable[]; extern const struct CompressedSpriteSheet gSpriteSheet_EnemyShadow; extern const struct SpriteTemplate gSpriteTemplate_EnemyShadow; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 93f85de6ff..96eced57ed 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -41,7 +41,6 @@ #include "text.h" #include "tv.h" #include "window.h" -#include "constants/battle_config.h" #include "constants/battle_move_effects.h" #include "constants/items.h" #include "constants/moves.h" @@ -1640,7 +1639,7 @@ static void Task_HandleInput(u8 taskId) PlaySE(SE_SELECT); BeginCloseSummaryScreen(taskId); } - #if P_ENABLE_DEBUG == TRUE + #if DEBUG_POKEMON_MENU == TRUE else if (JOY_NEW(SELECT_BUTTON) && !gMain.inBattle) { sMonSummaryScreen->callback = CB2_Debug_Pokemon; @@ -1648,7 +1647,7 @@ static void Task_HandleInput(u8 taskId) PlaySE(SE_SELECT); CloseSummaryScreen(taskId); } - #endif + #endif } } diff --git a/src/start_menu.c b/src/start_menu.c index 3bf8824293..981e4ab937 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -286,7 +286,7 @@ static void BuildStartMenuActions(void) } else { - #if DEBUG_SYSTEM_ENABLE == TRUE && DEBUG_SYSTEM_IN_MENU == TRUE + #if DEBUG_OVERWORLD_MENU == TRUE && DEBUG_SYSTEM_IN_MENU == TRUE BuildDebugStartMenu(); #else BuildNormalStartMenu(); @@ -760,7 +760,7 @@ static bool8 StartMenuDebugCallback(void) RemoveExtraStartMenuWindows(); HideStartMenuDebug(); // Hide start menu without enabling movement -#if DEBUG_SYSTEM_ENABLE == TRUE +#if DEBUG_OVERWORLD_MENU == TRUE FreezeObjectEvents(); Debug_ShowMainMenu(); #endif diff --git a/src/wild_encounter.c b/src/wild_encounter.c index a7ea56b82f..596feeb57b 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -18,7 +18,6 @@ #include "battle_pike.h" #include "battle_pyramid.h" #include "constants/abilities.h" -#include "constants/battle_config.h" #include "constants/game_stat.h" #include "constants/item.h" #include "constants/items.h"