From 3debf0442dc88b948899c73a3b98a0d76b1f45f7 Mon Sep 17 00:00:00 2001 From: TheXaman <48356183+TheXaman@users.noreply.github.com> Date: Tue, 30 Aug 2022 18:02:23 +0200 Subject: [PATCH] changed the locations of tx_debug_system related #defines to its own file 'constants/debug_config.h' --- include/constants/battle_config.h | 8 -------- include/constants/debug_config.h | 15 +++++++++++++++ include/constants/global.h | 1 + include/debug.h | 5 +---- 4 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 include/constants/debug_config.h diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 0b610211c5..89134daf91 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -194,14 +194,6 @@ #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. -// Debugging, Replace the used flags with others or disable with a 0 #define B_ENABLE_DEBUG TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. -#define TX_DEBUG_FLAG_NO_COLLISION FLAG_UNUSED_0x020 // If this flag is set, the debug function in the Utility submenu to disable player collision can be used. -#define TX_DEBUG_FLAG_NO_ENCOUNTER FLAG_UNUSED_0x021 // If this flag is set, the debug function in the Utility submenu to disable wild encounters can be used. -#define TX_DEBUG_FLAG_NO_TRAINER_SEE FLAG_UNUSED_0x022 // If this flag is set, the debug function in the Utility submenu to disable battles with trainer can be used. -#define TX_DEBUG_FLAG_NO_BAG_USE FLAG_UNUSED_0x023 // If this flag is set, the debug function in the Utility submenu to disable the bag in battle can be used. -#define TX_DEBUG_FLAG_NO_CATCHING FLAG_UNUSED_0x024 // If this flag is set, the debug function in the Utility submenu to disable catching of wild Pokémon can be used. -#define TX_DEBUG_FLAG_PC_FROM_DEBUG_MENU FLAG_UNUSED_0x025 // If this flag is set, the debug function in debug menu to access the player PC works. - #endif // GUARD_CONSTANTS_BATTLE_CONFIG_H diff --git a/include/constants/debug_config.h b/include/constants/debug_config.h new file mode 100644 index 0000000000..847288d64e --- /dev/null +++ b/include/constants/debug_config.h @@ -0,0 +1,15 @@ +#ifndef GUARD_CONSTANTS_DEBUG_CONFIG_H +#define GUARD_CONSTANTS_DEBUG_CONFIG_H + +#define TX_DEBUG_SYSTEM TRUE // Enables a overworld debug menu for changing flags, variables, giving pokemon and more, accessed by pressing R plus START. +#define TX_DEBUG_SYSTEM_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (replaces the exit entry). + +// Replace the used flags with others or disable with a 0 +#define TX_DEBUG_FLAG_NO_COLLISION FLAG_UNUSED_0x020 // If this flag is set, the debug function in the Utility submenu to disable player collision can be used. +#define TX_DEBUG_FLAG_NO_ENCOUNTER FLAG_UNUSED_0x021 // If this flag is set, the debug function in the Utility submenu to disable wild encounters can be used. +#define TX_DEBUG_FLAG_NO_TRAINER_SEE FLAG_UNUSED_0x022 // If this flag is set, the debug function in the Utility submenu to disable battles with trainer can be used. +#define TX_DEBUG_FLAG_NO_BAG_USE FLAG_UNUSED_0x023 // If this flag is set, the debug function in the Utility submenu to disable the bag in battle can be used. +#define TX_DEBUG_FLAG_NO_CATCHING FLAG_UNUSED_0x024 // If this flag is set, the debug function in the Utility submenu to disable catching of wild Pokémon can be used. +#define TX_DEBUG_FLAG_PC_FROM_DEBUG_MENU FLAG_UNUSED_0x025 // If this flag is set, the debug function in debug menu to access the player PC works. + +#endif // GUARD_CONSTANTS_DEBUG_CONFIG_H diff --git a/include/constants/global.h b/include/constants/global.h index 2a773dbb95..b80bcd402a 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -2,6 +2,7 @@ #define GUARD_CONSTANTS_GLOBAL_H #include "constants/battle_config.h" +#include "constants/debug_config.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/debug.h b/include/debug.h index bfc072ee3b..c5bdc224cc 100644 --- a/include/debug.h +++ b/include/debug.h @@ -1,11 +1,8 @@ #ifndef GUARD_DEBUG_H #define GUARD_DEBUG_H -#define TX_DEBUG_SYSTEM TRUE // Enables a overworld debug menu for changing flags, variables, giving pokemon and more, accessed by pressing R plus START. -#define TX_DEBUG_SYSTEM_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (replaces the exit entry). - +#include "constants/debug_config.h" void Debug_ShowMainMenu(void); - #endif // GUARD_DEBUG_H