From 68630e39cf04d6674540a66c61b9213b62afe260 Mon Sep 17 00:00:00 2001 From: khbsd Date: Sun, 19 Jan 2025 15:58:24 -0600 Subject: [PATCH] added summary_screen.h config and renamed P_FLAG_IV_EV_INFO --- include/config/pokemon.h | 26 ++------------------------ include/config/summary_screen.h | 30 ++++++++++++++++++++++++++++++ include/constants/global.h | 1 + include/pokemon_summary_screen.h | 1 + src/pokemon_summary_screen.c | 4 ++-- 5 files changed, 36 insertions(+), 26 deletions(-) create mode 100644 include/config/summary_screen.h diff --git a/include/config/pokemon.h b/include/config/pokemon.h index d9fbe22d91f..260750e1e98 100644 --- a/include/config/pokemon.h +++ b/include/config/pokemon.h @@ -62,27 +62,6 @@ #define P_SHOW_DYNAMIC_TYPES FALSE // If TRUE, all moves with dynamic type changes will be reflected as their current type in battle/summary screens instead of just select ones like in vanilla. // Summary screen settings -#define P_SUMMARY_SCREEN_MOVE_RELEARNER TRUE // If TRUE, shows an option for Pokémon to relearn moves on the summary screen moves page. -#define P_SUMMARY_MOVE_RELEARNER_FULL_PP TRUE // If TRUE, the move relearner in the summary screen restores relearned moves' PP to full. -#define P_SUMMARY_SCREEN_RENAME TRUE // If TRUE, an option to change Pokémon nicknames replaces the cancel prompt on the summary screen info page. -#define P_SUMMARY_SCREEN_IV_EV_INFO FALSE // If TRUE, will allow player to cycle through the Stats, IVs, and EVs in the summary screen skills page. -#define P_SUMMARY_SCREEN_IV_EV_BOX_ONLY FALSE // If TRUE, will allow player to cycle through the Stats, IVs, and EVs in the summary screen skills page, but only in the PC storage box. -#define P_SUMMARY_SCREEN_IV_EV_TILESET FALSE // If TRUE, loads an alternate tileset to allow changing the "STATS" label in the summary screen skills page. Note: if it's still loading the alternate tileset after changing this and recompiling, you may need a `make clean` before compilation. -#define P_SUMMARY_SCREEN_IV_EV_VALUES FALSE // If TRUE, will show the actual IV value instead of the letter grade. -/* -LETTER GRADE GUIDE: - - F = 0 - D = 1 - 15 - C = 16 - 25 - B = 26 - 29 - A = 30 - S = 31 - -Info taken from https://bulbapedia.bulbagarden.net/wiki/Stats_judge. -*/ -#define P_SUMMARY_SCREEN_IV_ONLY FALSE // If TRUE, will only show IV info in the summary screen. -#define P_SUMMARY_SCREEN_EV_ONLY FALSE // If TRUE, will only show EV info in the summary screen. // Learnset helper toggles #define P_LEARNSET_HELPER_TEACHABLE TRUE // If TRUE, teachable_learnsets.h will be populated by tools/learnset_helpers/teachable.py using the included JSON files based on available TMs and tutors. @@ -90,9 +69,8 @@ Info taken from https://bulbapedia.bulbagarden.net/wiki/Stats_judge. // 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. -#define P_FLAG_IV_EV_INFO 0 // If this flag is set, will allow player to cycle through the Stats, IVs, and EVs in the summary screen skills page. Note: if P_SUMMARY_SCREEN_IV_EV_INFO is TRUE, this flag does nothing. +#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. // Go here if you want to disable specific families of Pokémon. #include "config/species_enabled.h" diff --git a/include/config/summary_screen.h b/include/config/summary_screen.h new file mode 100644 index 00000000000..e192686f078 --- /dev/null +++ b/include/config/summary_screen.h @@ -0,0 +1,30 @@ +#ifndef GUARD_CONFIG_SUMMARY_SCREEN_H +#define GUARD_CONFIG_SUMMARY_SCREEN_H + +// Settings +#define P_SUMMARY_SCREEN_MOVE_RELEARNER TRUE // If TRUE, shows an option for Pokémon to relearn moves on the summary screen moves page. +#define P_SUMMARY_MOVE_RELEARNER_FULL_PP TRUE // If TRUE, the move relearner in the summary screen restores relearned moves' PP to full. +#define P_SUMMARY_SCREEN_RENAME TRUE // If TRUE, an option to change Pokémon nicknames replaces the cancel prompt on the summary screen info page. +#define P_SUMMARY_SCREEN_IV_EV_INFO FALSE // If TRUE, will allow player to cycle through the Stats, IVs, and EVs in the summary screen skills page. +#define P_SUMMARY_SCREEN_IV_EV_BOX_ONLY FALSE // If TRUE, will allow player to cycle through the Stats, IVs, and EVs in the summary screen skills page, but only in the PC storage box. +#define P_SUMMARY_SCREEN_IV_EV_TILESET FALSE // If TRUE, loads an alternate tileset to allow changing the "STATS" label in the summary screen skills page. Note: if it's still loading the alternate tileset after changing this and recompiling, you may need a `make clean` before compilation. +#define P_SUMMARY_SCREEN_IV_EV_VALUES FALSE // If TRUE, will show the actual IV value instead of the letter grade. +/* +LETTER GRADE GUIDE: + + F = 0 + D = 1 - 15 + C = 16 - 25 + B = 26 - 29 + A = 30 + S = 31 + +Info taken from https://bulbapedia.bulbagarden.net/wiki/Stats_judge. +*/ +#define P_SUMMARY_SCREEN_IV_ONLY FALSE // If TRUE, will only show IV info in the summary screen. +#define P_SUMMARY_SCREEN_EV_ONLY FALSE // If TRUE, will only show EV info in the summary screen. + +// Flags +#define P_FLAG_SUMMARY_SCREEN_IV_EV_INFO 0 // If this flag is set, will allow player to cycle through the Stats, IVs, and EVs in the summary screen skills page. Note: if P_SUMMARY_SCREEN_IV_EV_INFO is TRUE, this flag does nothing. + +#endif // GUARD_CONFIG_SUMMARY_SCREEN_H \ No newline at end of file diff --git a/include/constants/global.h b/include/constants/global.h index 3476bd3680d..e999a80822a 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -9,6 +9,7 @@ #include "config/pokemon.h" #include "config/overworld.h" #include "config/dexnav.h" +#include "config/summary_screen.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/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index 7d928ac09eb..3aa8460a174 100755 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.h @@ -2,6 +2,7 @@ #define GUARD_POKEMON_SUMMARY_SCREEN_H #include "main.h" +#include "config/summary_screen.h" extern u8 gLastViewedMonIndex; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 8293e5951ec..3636d2f0aea 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -4667,12 +4667,12 @@ static inline bool32 ShouldShowIvEvPrompt(void) { if (P_SUMMARY_SCREEN_IV_EV_BOX_ONLY) { - return (P_SUMMARY_SCREEN_IV_EV_INFO || FlagGet(P_FLAG_IV_EV_INFO)) + return (P_SUMMARY_SCREEN_IV_EV_INFO || FlagGet(P_FLAG_SUMMARY_SCREEN_IV_EV_INFO)) && (sMonSummaryScreen->mode == SUMMARY_MODE_BOX|| sMonSummaryScreen->mode == SUMMARY_MODE_BOX_CURSOR); } else if (!P_SUMMARY_SCREEN_IV_EV_BOX_ONLY) { - return (P_SUMMARY_SCREEN_IV_EV_INFO || FlagGet(P_FLAG_IV_EV_INFO)); + return (P_SUMMARY_SCREEN_IV_EV_INFO || FlagGet(P_FLAG_SUMMARY_SCREEN_IV_EV_INFO)); } return FALSE; }