Fix region text when looking at map in frlg (#9347)

This commit is contained in:
FosterProgramming 2026-02-25 15:19:09 +01:00 committed by GitHub
parent 34d40b9ce5
commit 91a1278934
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 21 additions and 3 deletions

View File

@ -350,6 +350,7 @@ ARCHIE = FD 0A
MAXIE = FD 0B
KYOGRE = FD 0C
GROUDON = FD 0D
REGION = FD 0E
@ battle string placeholders

View File

@ -294,7 +294,7 @@ PlayersHouse_2F_Text_Notebook:
Common_Text_LookCloserAtMap:
.string "{PLAYER} took a closer look at the\n"
.string "HOENN region map.$"
.string "{REGION} region map.$"
PlayersHouse_2F_Text_ItsAGameCube:
.string "It's a Nintendo GameCube.\p"

View File

@ -268,6 +268,7 @@
#define PLACEHOLDER_ID_MAXIE 0xB
#define PLACEHOLDER_ID_KYOGRE 0xC
#define PLACEHOLDER_ID_GROUDON 0xD
#define PLACEHOLDER_ID_REGION 0xE
// battle placeholders are located in battle_message.h

View File

@ -111,6 +111,7 @@ extern const u8 gText_Decorate[];
extern const u8 gText_PutAway[];
extern const u8 gText_Toss2[];
extern const u8 gText_Hoenn[];
extern const u8 gText_Kanto[];
extern const u8 gText_Ferry[];
extern const u8 gText_SecretBase[];
extern const u8 gText_Hideout[];

View File

@ -231,7 +231,12 @@ static void PrintRegionMapSecName(void)
static void PrintTitleWindowText(void)
{
static const u8 FlyPromptText[] = _("{R_BUTTON} FLY");
u32 hoennOffset = GetStringCenterAlignXOffset(FONT_NORMAL, gText_Hoenn, 0x38);
const u8 *region;
if (IS_FRLG)
region = gText_Kanto;
else
region = gText_Hoenn;
u32 hoennOffset = GetStringCenterAlignXOffset(FONT_NORMAL, region, 0x38);
u32 flyOffset = GetStringCenterAlignXOffset(FONT_NORMAL, FlyPromptText, 0x38);
FillWindowPixelBuffer(WIN_TITLE, PIXEL_FILL(1));
@ -244,7 +249,7 @@ static void PrintTitleWindowText(void)
}
else
{
AddTextPrinterParameterized(WIN_TITLE, FONT_NORMAL, gText_Hoenn, hoennOffset, 1, 0, NULL);
AddTextPrinterParameterized(WIN_TITLE, FONT_NORMAL, region, hoennOffset, 1, 0, NULL);
CopyWindowToVram(WIN_TITLE, COPYWIN_FULL);
}
}

View File

@ -525,6 +525,14 @@ static const u8 *ExpandPlaceholder_Groudon(void)
return gText_ExpandedPlaceholder_Groudon;
}
static const u8 *ExpandPlaceholder_Region(void)
{
if (IS_FRLG)
return gText_Kanto;
else
return gText_Hoenn;
}
const u8 *GetExpandedPlaceholder(u32 id)
{
typedef const u8 *(*ExpandPlaceholderFunc)(void);
@ -545,6 +553,7 @@ const u8 *GetExpandedPlaceholder(u32 id)
[PLACEHOLDER_ID_MAXIE] = ExpandPlaceholder_Maxie,
[PLACEHOLDER_ID_KYOGRE] = ExpandPlaceholder_Kyogre,
[PLACEHOLDER_ID_GROUDON] = ExpandPlaceholder_Groudon,
[PLACEHOLDER_ID_REGION] = ExpandPlaceholder_Region,
};
if (id >= ARRAY_COUNT(funcs))

View File

@ -1007,6 +1007,7 @@ const u8 gText_PokedexDiploma[] = _("PLAYER: {CLEAR 0x10}{COLOR RED}{SHADOW LIGH
const u8 gJPText_GameFreak[] = _("{COLOR RED}{SHADOW LIGHT_RED}ゲ-ムフリ-ク"); // Unused
const u8 gText_DiplomaEmpty[] = _("{COLOR RED}{SHADOW LIGHT_RED}"); // Unused
const u8 gText_Hoenn[] = _("HOENN");
const u8 gText_Kanto[] = _("KANTO");
const u8 gText_XWillBeSentToY[] = _("{STR_VAR_2} will be\nsent to {STR_VAR_1}.");
const u8 gText_ByeByeVar1[] = _("Bye-bye, {STR_VAR_2}!");
const u8 gText_XSentOverY[] = _("{STR_VAR_1} sent over {STR_VAR_3}.");