Skip to content

Commit

Permalink
Created COMPOUND_STRINGs for default player names (#5037)
Browse files Browse the repository at this point in the history
* Converted default names to COMPOUND_STRINGs

* Moved new game strings out to main_menu
  • Loading branch information
fdeblasio authored Aug 8, 2024
1 parent 355739d commit 754beee
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 162 deletions.
59 changes: 0 additions & 59 deletions include/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,19 +324,6 @@ extern const u8 gText_SelectorArrow3[];
extern const u8 gText_YesNo[];

// main menu/birch speech text
extern const u8 gText_SaveFileErased[];
extern const u8 gText_SaveFileCorrupted[];
extern const u8 gJPText_No1MSubCircuit[];
extern const u8 gText_BatteryRunDry[];
extern const u8 gText_MainMenuNewGame[];
extern const u8 gText_MainMenuOption[];
extern const u8 gText_MainMenuContinue[];
extern const u8 gText_MainMenuMysteryGift2[];
extern const u8 gText_MainMenuMysteryEvents[];
extern const u8 gText_MainMenuMysteryGift[];
extern const u8 gText_WirelessNotConnected[];
extern const u8 gText_MysteryGiftCantUse[];
extern const u8 gText_MysteryEventsCantUse[];
extern const u8 gText_Birch_Welcome[];
extern const u8 gText_ThisIsAPokemon[];
extern const u8 gText_Birch_MainSpeech[];
Expand All @@ -346,52 +333,6 @@ extern const u8 gText_Birch_WhatsYourName[];
extern const u8 gText_Birch_SoItsPlayer[];
extern const u8 gText_Birch_YourePlayer[];
extern const u8 gText_Birch_AreYouReady[];
extern const u8 gText_ContinueMenuPlayer[];
extern const u8 gText_ContinueMenuTime[];
extern const u8 gText_ContinueMenuPokedex[];
extern const u8 gText_ContinueMenuBadges[];
extern const u8 gText_BirchBoy[];
extern const u8 gText_BirchGirl[];
extern const u8 gText_DefaultNameStu[];
extern const u8 gText_DefaultNameMilton[];
extern const u8 gText_DefaultNameTom[];
extern const u8 gText_DefaultNameKenny[];
extern const u8 gText_DefaultNameReid[];
extern const u8 gText_DefaultNameJude[];
extern const u8 gText_DefaultNameJaxson[];
extern const u8 gText_DefaultNameEaston[];
extern const u8 gText_DefaultNameWalker[];
extern const u8 gText_DefaultNameTeru[];
extern const u8 gText_DefaultNameJohnny[];
extern const u8 gText_DefaultNameBrett[];
extern const u8 gText_DefaultNameSeth[];
extern const u8 gText_DefaultNameTerry[];
extern const u8 gText_DefaultNameCasey[];
extern const u8 gText_DefaultNameDarren[];
extern const u8 gText_DefaultNameLandon[];
extern const u8 gText_DefaultNameCollin[];
extern const u8 gText_DefaultNameStanley[];
extern const u8 gText_DefaultNameQuincy[];
extern const u8 gText_DefaultNameKimmy[];
extern const u8 gText_DefaultNameTiara[];
extern const u8 gText_DefaultNameBella[];
extern const u8 gText_DefaultNameJayla[];
extern const u8 gText_DefaultNameAllie[];
extern const u8 gText_DefaultNameLianna[];
extern const u8 gText_DefaultNameSara[];
extern const u8 gText_DefaultNameMonica[];
extern const u8 gText_DefaultNameCamila[];
extern const u8 gText_DefaultNameAubree[];
extern const u8 gText_DefaultNameRuthie[];
extern const u8 gText_DefaultNameHazel[];
extern const u8 gText_DefaultNameNadine[];
extern const u8 gText_DefaultNameTanja[];
extern const u8 gText_DefaultNameYasmin[];
extern const u8 gText_DefaultNameNicola[];
extern const u8 gText_DefaultNameLillie[];
extern const u8 gText_DefaultNameTerra[];
extern const u8 gText_DefaultNameLucy[];
extern const u8 gText_DefaultNameHalie[];

extern const u8 gText_BirchInTrouble[];
extern const u8 gText_ConfirmStarterChoice[];
Expand Down
104 changes: 62 additions & 42 deletions src/main_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,26 @@ static const u32 sBirchSpeechBgMap[] = INCBIN_U32("graphics/birch_speech/map.bin
static const u16 sBirchSpeechBgGradientPal[] = INCBIN_U16("graphics/birch_speech/bg2.gbapal");
static const u16 sBirchSpeechPlatformBlackPal[] = {RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK, RGB_BLACK};

static const u8 gText_SaveFileCorrupted[] = _("The save file is corrupted. The\nprevious save file will be loaded.");
static const u8 gText_SaveFileErased[] = _("The save file has been erased\ndue to corruption or damage.");
static const u8 gJPText_No1MSubCircuit[] = _("1Mサブきばんが ささっていません!");
static const u8 gText_BatteryRunDry[] = _("The internal battery has run dry.\nThe game can be played.\pHowever, clock-based events will\nno longer occur.");

static const u8 gText_MainMenuNewGame[] = _("NEW GAME");
static const u8 gText_MainMenuContinue[] = _("CONTINUE");
static const u8 gText_MainMenuOption[] = _("OPTION");
static const u8 gText_MainMenuMysteryGift[] = _("MYSTERY GIFT");
static const u8 gText_MainMenuMysteryGift2[] = _("MYSTERY GIFT");
static const u8 gText_MainMenuMysteryEvents[] = _("MYSTERY EVENTS");
static const u8 gText_WirelessNotConnected[] = _("The Wireless Adapter is not\nconnected.");
static const u8 gText_MysteryGiftCantUse[] = _("MYSTERY GIFT can't be used while\nthe Wireless Adapter is attached.");
static const u8 gText_MysteryEventsCantUse[] = _("MYSTERY EVENTS can't be used while\nthe Wireless Adapter is attached.");

static const u8 gText_ContinueMenuPlayer[] = _("PLAYER");
static const u8 gText_ContinueMenuTime[] = _("TIME");
static const u8 gText_ContinueMenuPokedex[] = _("POKéDEX");
static const u8 gText_ContinueMenuBadges[] = _("BADGES");

#define MENU_LEFT 2
#define MENU_TOP_WIN0 1
#define MENU_TOP_WIN1 5
Expand Down Expand Up @@ -454,54 +474,54 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_PlayerShrink[] =
};

static const struct MenuAction sMenuActions_Gender[] = {
{gText_BirchBoy, {NULL}},
{gText_BirchGirl, {NULL}}
{COMPOUND_STRING("BOY"), {NULL}},
{COMPOUND_STRING("GIRL"), {NULL}}
};

static const u8 *const sMalePresetNames[] = {
gText_DefaultNameStu,
gText_DefaultNameMilton,
gText_DefaultNameTom,
gText_DefaultNameKenny,
gText_DefaultNameReid,
gText_DefaultNameJude,
gText_DefaultNameJaxson,
gText_DefaultNameEaston,
gText_DefaultNameWalker,
gText_DefaultNameTeru,
gText_DefaultNameJohnny,
gText_DefaultNameBrett,
gText_DefaultNameSeth,
gText_DefaultNameTerry,
gText_DefaultNameCasey,
gText_DefaultNameDarren,
gText_DefaultNameLandon,
gText_DefaultNameCollin,
gText_DefaultNameStanley,
gText_DefaultNameQuincy
COMPOUND_STRING("STU"),
COMPOUND_STRING("MILTON"),
COMPOUND_STRING("TOM"),
COMPOUND_STRING("KENNY"),
COMPOUND_STRING("REID"),
COMPOUND_STRING("JUDE"),
COMPOUND_STRING("JAXSON"),
COMPOUND_STRING("EASTON"),
COMPOUND_STRING("WALKER"),
COMPOUND_STRING("TERU"),
COMPOUND_STRING("JOHNNY"),
COMPOUND_STRING("BRETT"),
COMPOUND_STRING("SETH"),
COMPOUND_STRING("TERRY"),
COMPOUND_STRING("CASEY"),
COMPOUND_STRING("DARREN"),
COMPOUND_STRING("LANDON"),
COMPOUND_STRING("COLLIN"),
COMPOUND_STRING("STANLEY"),
COMPOUND_STRING("QUINCY")
};

static const u8 *const sFemalePresetNames[] = {
gText_DefaultNameKimmy,
gText_DefaultNameTiara,
gText_DefaultNameBella,
gText_DefaultNameJayla,
gText_DefaultNameAllie,
gText_DefaultNameLianna,
gText_DefaultNameSara,
gText_DefaultNameMonica,
gText_DefaultNameCamila,
gText_DefaultNameAubree,
gText_DefaultNameRuthie,
gText_DefaultNameHazel,
gText_DefaultNameNadine,
gText_DefaultNameTanja,
gText_DefaultNameYasmin,
gText_DefaultNameNicola,
gText_DefaultNameLillie,
gText_DefaultNameTerra,
gText_DefaultNameLucy,
gText_DefaultNameHalie
COMPOUND_STRING("KIMMY"),
COMPOUND_STRING("TIARA"),
COMPOUND_STRING("BELLA"),
COMPOUND_STRING("JAYLA"),
COMPOUND_STRING("ALLIE"),
COMPOUND_STRING("LIANNA"),
COMPOUND_STRING("SARA"),
COMPOUND_STRING("MONICA"),
COMPOUND_STRING("CAMILA"),
COMPOUND_STRING("AUBREE"),
COMPOUND_STRING("RUTHIE"),
COMPOUND_STRING("HAZEL"),
COMPOUND_STRING("NADINE"),
COMPOUND_STRING("TANJA"),
COMPOUND_STRING("YASMIN"),
COMPOUND_STRING("NICOLA"),
COMPOUND_STRING("LILLIE"),
COMPOUND_STRING("TERRA"),
COMPOUND_STRING("LUCY"),
COMPOUND_STRING("HALIE")
};

// The number of male vs. female names is assumed to be the same.
Expand Down
61 changes: 0 additions & 61 deletions src/strings.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,6 @@ const u8 gText_ExpandedPlaceholder_May[] = _("MAY");
const u8 gText_EggNickname[] = _("EGG");
const u8 gText_Pokemon[] = _("POKéMON");
const u8 gText_ProfBirchMatchCallName[] = _("PROF. BIRCH");
const u8 gText_MainMenuNewGame[] = _("NEW GAME");
const u8 gText_MainMenuContinue[] = _("CONTINUE");
const u8 gText_MainMenuOption[] = _("OPTION");
const u8 gText_MainMenuMysteryGift[] = _("MYSTERY GIFT");
const u8 gText_MainMenuMysteryGift2[] = _("MYSTERY GIFT");
const u8 gText_MainMenuMysteryEvents[] = _("MYSTERY EVENTS");
const u8 gText_WirelessNotConnected[] = _("The Wireless Adapter is not\nconnected.");
const u8 gText_MysteryGiftCantUse[] = _("MYSTERY GIFT can't be used while\nthe Wireless Adapter is attached.");
const u8 gText_MysteryEventsCantUse[] = _("MYSTERY EVENTS can't be used while\nthe Wireless Adapter is attached.");
const u8 gText_UpdatingSaveExternalData[] = _("Updating save file using external\ndata. Please wait."); // Unused
const u8 gText_SaveFileUpdated[] = _("The save file has been updated."); // Unused
const u8 gText_SaveFileCorrupted[] = _("The save file is corrupted. The\nprevious save file will be loaded.");
const u8 gText_SaveFileErased[] = _("The save file has been erased\ndue to corruption or damage.");
const u8 gJPText_No1MSubCircuit[] = _("1Mサブきばんが ささっていません!");
const u8 gText_BatteryRunDry[] = _("The internal battery has run dry.\nThe game can be played.\pHowever, clock-based events will\nno longer occur.");
const u8 gText_Player[] = _("PLAYER"); // Unused
const u8 gText_Pokedex[] = _("POKéDEX"); // Unused
const u8 gText_Time[] = _("TIME");
Expand All @@ -55,48 +40,6 @@ ALIGNED(4) const u8 gText_NextBack[] = _("{A_BUTTON}NEXT {B_BUTTON}BACK"); // Un
ALIGNED(4) const u8 gText_PickNextCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}NEXT {B_BUTTON}CANCEL");
ALIGNED(4) const u8 gText_PickCancel[] = _("{DPAD_UPDOWN}PICK {A_BUTTON}{B_BUTTON}CANCEL");
ALIGNED(4) const u8 gText_AButtonExit[] = _("{A_BUTTON}EXIT");
const u8 gText_BirchBoy[] = _("BOY");
const u8 gText_BirchGirl[] = _("GIRL");
const u8 gText_DefaultNameStu[] = _("STU");
const u8 gText_DefaultNameMilton[] = _("MILTON");
const u8 gText_DefaultNameTom[] = _("TOM");
const u8 gText_DefaultNameKenny[] = _("KENNY");
const u8 gText_DefaultNameReid[] = _("REID");
const u8 gText_DefaultNameJude[] = _("JUDE");
const u8 gText_DefaultNameJaxson[] = _("JAXSON");
const u8 gText_DefaultNameEaston[] = _("EASTON");
const u8 gText_DefaultNameWalker[] = _("WALKER");
const u8 gText_DefaultNameTeru[] = _("TERU");
const u8 gText_DefaultNameJohnny[] = _("JOHNNY");
const u8 gText_DefaultNameBrett[] = _("BRETT");
const u8 gText_DefaultNameSeth[] = _("SETH");
const u8 gText_DefaultNameTerry[] = _("TERRY");
const u8 gText_DefaultNameCasey[] = _("CASEY");
const u8 gText_DefaultNameDarren[] = _("DARREN");
const u8 gText_DefaultNameLandon[] = _("LANDON");
const u8 gText_DefaultNameCollin[] = _("COLLIN");
const u8 gText_DefaultNameStanley[] = _("STANLEY");
const u8 gText_DefaultNameQuincy[] = _("QUINCY");
const u8 gText_DefaultNameKimmy[] = _("KIMMY");
const u8 gText_DefaultNameTiara[] = _("TIARA");
const u8 gText_DefaultNameBella[] = _("BELLA");
const u8 gText_DefaultNameJayla[] = _("JAYLA");
const u8 gText_DefaultNameAllie[] = _("ALLIE");
const u8 gText_DefaultNameLianna[] = _("LIANNA");
const u8 gText_DefaultNameSara[] = _("SARA");
const u8 gText_DefaultNameMonica[] = _("MONICA");
const u8 gText_DefaultNameCamila[] = _("CAMILA");
const u8 gText_DefaultNameAubree[] = _("AUBREE");
const u8 gText_DefaultNameRuthie[] = _("RUTHIE");
const u8 gText_DefaultNameHazel[] = _("HAZEL");
const u8 gText_DefaultNameNadine[] = _("NADINE");
const u8 gText_DefaultNameTanja[] = _("TANJA");
const u8 gText_DefaultNameYasmin[] = _("YASMIN");
const u8 gText_DefaultNameNicola[] = _("NICOLA");
const u8 gText_DefaultNameLillie[] = _("LILLIE");
const u8 gText_DefaultNameTerra[] = _("TERRA");
const u8 gText_DefaultNameLucy[] = _("LUCY");
const u8 gText_DefaultNameHalie[] = _("HALIE");
const u8 gText_ThisIsAPokemon[] = _("This is what we call a “POKéMON.”{PAUSE 96}\p");
const u8 gText_5MarksPokemon[] = _("????? POKéMON");
const u8 gText_UnkHeight[] = _("{CLEAR_TO 0x0C}??'??”");
Expand Down Expand Up @@ -1378,10 +1321,6 @@ const u8 gText_BattleArenaDesc[] = _("Win battles with teamed-up POKéMON!\nYour
const u8 gText_BattleFactoryDesc[] = _("Aim for victory using rental POKéMON!\nYour knowledge will be tested.");
const u8 gText_BattlePikeDesc[] = _("Select one of three paths to battle!\nYour luck will be tested.");
const u8 gText_BattlePyramidDesc[] = _("Aim for the top with exploration!\nYour bravery will be tested.");
const u8 gText_ContinueMenuPlayer[] = _("PLAYER");
const u8 gText_ContinueMenuTime[] = _("TIME");
const u8 gText_ContinueMenuPokedex[] = _("POKéDEX");
const u8 gText_ContinueMenuBadges[] = _("BADGES");
const u8 gText_Powder[] = _("POWDER");
const u8 gText_BerryPickingRecords[] = _("DODRIO BERRY-PICKING RECORDS");
const u8 gText_BerriesPicked[] = _("BERRIES picked:");
Expand Down

0 comments on commit 754beee

Please sign in to comment.