From 347a17340220d68165a905a74e88cea2e72a0f5d Mon Sep 17 00:00:00 2001 From: Katelyn Gigante Date: Fri, 22 Oct 2021 10:36:55 +1100 Subject: [PATCH 1/2] Prevent text glitch if a pokemon has an unspecified custom evolution --- include/strings.h | 1 + src/pokedex.c | 3 +++ src/strings.c | 1 + 3 files changed, 5 insertions(+) diff --git a/include/strings.h b/include/strings.h index 032370e5b7..a1d0cd3ccb 100644 --- a/include/strings.h +++ b/include/strings.h @@ -638,6 +638,7 @@ extern const u8 gText_EVO_SPECIFIC_MON_IN_PARTY[]; extern const u8 gText_EVO_LEVEL_DARK_TYPE_MON_IN_PARTY[]; extern const u8 gText_EVO_TRADE_SPECIFIC_MON[]; extern const u8 gText_EVO_SPECIFIC_MAP[]; +extern const u8 gText_EVO_UNKNOWN[]; extern const u8 gText_EVO_NONE[]; extern const u8 gText_FORMS_Buttons_PE[]; diff --git a/src/pokedex.c b/src/pokedex.c index 43385e22de..1753427cd2 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -7771,6 +7771,9 @@ static u8 PrintEvolutionTargetSpeciesAndMethod(u8 taskId, u16 species, u8 depth, StringExpandPlaceholders(gStringVar4, gText_EVO_SPECIFIC_MAP ); break; #endif + default: + StringExpandPlaceholders(gStringVar4, gText_EVO_UNKNOWN ); + break; }//Switch end PrintInfoScreenTextSmall(gStringVar4, base_x + depth_x*depth+base_x_offset, base_y + base_y_offset*base_i); //Print actual instructions diff --git a/src/strings.c b/src/strings.c index 678e187c6c..237ebb9d9a 100644 --- a/src/strings.c +++ b/src/strings.c @@ -1924,6 +1924,7 @@ const u8 gText_EVO_SPECIFIC_MON_IN_PARTY[] = _("LvlUp with {STR_VAR_2} const u8 gText_EVO_LEVEL_DARK_TYPE_MON_IN_PARTY[] = _("LvlUp with dark type in party"); const u8 gText_EVO_TRADE_SPECIFIC_MON[] = _("Traded for {STR_VAR_2}"); const u8 gText_EVO_SPECIFIC_MAP[] = _("LvlUp on {STR_VAR_2}"); +const u8 gText_EVO_UNKNOWN[] = _("Method unknown"); const u8 gText_EVO_NONE[] = _("{STR_VAR_1} has no evolution."); const u8 gText_FORMS_Buttons_PE[] = _("{A_BUTTON}EVOLUTIONS"); From d3911128f0f327d5b78369dd828444ad765e7758 Mon Sep 17 00:00:00 2001 From: Katelyn Gigante Date: Mon, 25 Oct 2021 13:25:56 +1100 Subject: [PATCH 2/2] Better compatibility --- src/pokedex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pokedex.c b/src/pokedex.c index 1753427cd2..eea6cd88bd 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -387,10 +387,10 @@ static void Task_SwitchScreensFromFormsScreen(u8 taskId); static void Task_ExitFormsScreen(u8 taskId); #endif -//COMPATIBILITY, delete if you are using a newer version +#ifndef TEXT_COLOR_LIGHT_GRAY // COMPATIBILITY #define TEXT_COLOR_LIGHT_GRAY TEXT_COLOR_LIGHT_GREY #define TEXT_COLOR_DARK_GRAY TEXT_COLOR_DARK_GREY -//COMPATIBILITY end +#endif //HGSS_UI Physical Special Split icon for BattleEngine (rhh) #ifdef BATTLE_ENGINE