Skip to content

Commit

Permalink
added summary_screen.h config and renamed P_FLAG_IV_EV_INFO
Browse files Browse the repository at this point in the history
  • Loading branch information
khbsd committed Jan 19, 2025
1 parent 0d05b1e commit 68630e3
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 26 deletions.
26 changes: 2 additions & 24 deletions include/config/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,37 +62,15 @@
#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.

// 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"
Expand Down
30 changes: 30 additions & 0 deletions include/config/summary_screen.h
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions include/constants/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions include/pokemon_summary_screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define GUARD_POKEMON_SUMMARY_SCREEN_H

#include "main.h"
#include "config/summary_screen.h"

extern u8 gLastViewedMonIndex;

Expand Down
4 changes: 2 additions & 2 deletions src/pokemon_summary_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 68630e3

Please sign in to comment.