Consolidated Lilycove Contest Lady's values into one struct (#4951)

* Consolidated Lilycove Contest Lady's values into one struct

* Converted Lilycove Lady strings to COMPOUND_STRINGS
This commit is contained in:
Frank DeBlasio 2024-07-13 08:44:22 -04:00 committed by GitHub
parent edc883d038
commit d224db43c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 58 additions and 92 deletions

View file

@ -2950,25 +2950,6 @@ extern const u8 gText_NeatnessRankings[];
extern const u8 gText_CoopRankings[];
extern const u8 gText_PressingPowerRankings[];
// Lilycove Lady
extern const u8 gText_ContestLady_Handsome[];
extern const u8 gText_ContestLady_Vinny[];
extern const u8 gText_ContestLady_Moreme[];
extern const u8 gText_ContestLady_Ironhard[];
extern const u8 gText_ContestLady_Muscle[];
extern const u8 gText_ContestLady_Coolness[];
extern const u8 gText_ContestLady_Beauty[];
extern const u8 gText_ContestLady_Cuteness[];
extern const u8 gText_ContestLady_Smartness[];
extern const u8 gText_ContestLady_Toughness[];
extern const u8 gText_QuizLady_Lady[];
extern const u8 gText_FavorLady_Slippery[];
extern const u8 gText_FavorLady_Roundish[];
extern const u8 gText_FavorLady_Whamish[];
extern const u8 gText_FavorLady_Shiny[];
extern const u8 gText_FavorLady_Sticky[];
extern const u8 gText_FavorLady_Pointy[];
extern const u8 gText_CoolnessContest[];
extern const u8 gText_BeautyContest[];
extern const u8 gText_CutenessContest[];

View file

@ -2,13 +2,52 @@
#include "constants/items.h"
#include "constants/moves.h"
static const u16 sContestLadyMonGfxId[] =
struct LilycoveContestLadyValues
{
[CONTEST_CATEGORY_COOL] = OBJ_EVENT_GFX_ZIGZAGOON_1,
[CONTEST_CATEGORY_BEAUTY] = OBJ_EVENT_GFX_SKITTY,
[CONTEST_CATEGORY_CUTE] = OBJ_EVENT_GFX_POOCHYENA,
[CONTEST_CATEGORY_SMART] = OBJ_EVENT_GFX_KECLEON,
[CONTEST_CATEGORY_TOUGH] = OBJ_EVENT_GFX_PIKACHU
u16 monGfxId;
u16 monSpecies;
const u8 *monName;
const u8 *categoryName;
const u8 *contestName;
};
static const struct LilycoveContestLadyValues sContestLadyValues[] =
{
[CONTEST_CATEGORY_COOL] = {
.monGfxId = OBJ_EVENT_GFX_ZIGZAGOON_1,
.monSpecies = SPECIES_ZIGZAGOON,
.monName = COMPOUND_STRING("HANDSOME"),
.categoryName = COMPOUND_STRING("coolness"),
.contestName = gText_CoolnessContest,
},
[CONTEST_CATEGORY_BEAUTY] = {
.monGfxId = OBJ_EVENT_GFX_SKITTY,
.monSpecies = SPECIES_SKITTY,
.monName = COMPOUND_STRING("VINNY"),
.categoryName = COMPOUND_STRING("beauty"),
.contestName = gText_BeautyContest,
},
[CONTEST_CATEGORY_CUTE] = {
.monGfxId = OBJ_EVENT_GFX_POOCHYENA,
.monSpecies = SPECIES_POOCHYENA,
.monName = COMPOUND_STRING("MOREME"),
.categoryName = COMPOUND_STRING("cuteness"),
.contestName = gText_CutenessContest,
},
[CONTEST_CATEGORY_SMART] = {
.monGfxId = OBJ_EVENT_GFX_KECLEON,
.monSpecies = SPECIES_KECLEON,
.monName = COMPOUND_STRING("IRONHARD"),
.categoryName = COMPOUND_STRING("smartness"),
.contestName = gText_SmartnessContest,
},
[CONTEST_CATEGORY_TOUGH] = {
.monGfxId = OBJ_EVENT_GFX_PIKACHU,
.monSpecies = SPECIES_PIKACHU,
.monName = COMPOUND_STRING("MUSCLE"),
.categoryName = COMPOUND_STRING("toughness"),
.contestName = gText_ToughnessContest,
},
};
static const u16 sLilycoveLadyGfxId[] =
@ -290,12 +329,12 @@ static const u16 sQuizLadyPrizes[] =
// Favor Lady data
static const u8 *const sFavorLadyRequests[] =
{
gText_FavorLady_Slippery,
gText_FavorLady_Roundish,
gText_FavorLady_Whamish,
gText_FavorLady_Shiny,
gText_FavorLady_Sticky,
gText_FavorLady_Pointy
COMPOUND_STRING("slippery"),
COMPOUND_STRING("roundish"),
COMPOUND_STRING("wham-ish"),
COMPOUND_STRING("shiny"),
COMPOUND_STRING("sticky"),
COMPOUND_STRING("pointy"),
};
static const u16 sFavorLadyAcceptedItems_Slippery[] =
@ -429,40 +468,3 @@ static const u16 sFavorLadyPrizes[] =
ITEM_RARE_CANDY,
ITEM_PP_MAX
};
static const u8 *const sContestLadyMonNames[] =
{
[CONTEST_CATEGORY_COOL] = gText_ContestLady_Handsome,
[CONTEST_CATEGORY_BEAUTY] = gText_ContestLady_Vinny,
[CONTEST_CATEGORY_CUTE] = gText_ContestLady_Moreme,
[CONTEST_CATEGORY_SMART] = gText_ContestLady_Ironhard,
[CONTEST_CATEGORY_TOUGH] = gText_ContestLady_Muscle
};
static const u8 *const sContestLadyCategoryNames[] =
{
[CONTEST_CATEGORY_COOL] = gText_ContestLady_Coolness,
[CONTEST_CATEGORY_BEAUTY] = gText_ContestLady_Beauty,
[CONTEST_CATEGORY_CUTE] = gText_ContestLady_Cuteness,
[CONTEST_CATEGORY_SMART] = gText_ContestLady_Smartness,
[CONTEST_CATEGORY_TOUGH] = gText_ContestLady_Toughness
};
static const u8 *const sContestNames[] =
{
[CONTEST_CATEGORY_COOL] = gText_CoolnessContest,
[CONTEST_CATEGORY_BEAUTY] = gText_BeautyContest,
[CONTEST_CATEGORY_CUTE] = gText_CutenessContest,
[CONTEST_CATEGORY_SMART] = gText_SmartnessContest,
[CONTEST_CATEGORY_TOUGH] = gText_ToughnessContest
};
static const u16 sContestLadyMonSpecies[] =
{
[CONTEST_CATEGORY_COOL] = SPECIES_ZIGZAGOON,
[CONTEST_CATEGORY_BEAUTY] = SPECIES_SKITTY,
[CONTEST_CATEGORY_CUTE] = SPECIES_POOCHYENA,
[CONTEST_CATEGORY_SMART] = SPECIES_KECLEON,
[CONTEST_CATEGORY_TOUGH] = SPECIES_PIKACHU
};

View file

@ -49,7 +49,7 @@ void SetLilycoveLadyGfx(void)
if (GetLilycoveLadyId() == LILYCOVE_LADY_CONTEST)
{
lilycoveLady = &gSaveBlock1Ptr->lilycoveLady;
VarSet(VAR_OBJ_GFX_ID_1, sContestLadyMonGfxId[lilycoveLady->contest.category]);
VarSet(VAR_OBJ_GFX_ID_1, sContestLadyValues[lilycoveLady->contest.category].monGfxId);
gSpecialVar_Result = TRUE;
}
else
@ -396,7 +396,7 @@ static u8 BufferQuizAuthorName(void)
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
if (sQuizLadyPtr->playerName[0] == EOS)
{
StringCopy_PlayerName(gStringVar1, gText_QuizLady_Lady);
StringCopy_PlayerName(gStringVar1, COMPOUND_STRING("Lady"));
authorNameId = QUIZ_AUTHOR_NAME_LADY;
}
else
@ -695,15 +695,15 @@ bool8 GivePokeblockToContestLady(struct Pokeblock *pokeblock)
static void BufferContestLadyCategoryAndMonName(u8 *category, u8 *nickname)
{
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
StringCopy(category, sContestLadyCategoryNames[sContestLadyPtr->category]);
StringCopy_Nickname(nickname, sContestLadyMonNames[sContestLadyPtr->category]);
StringCopy(category, sContestLadyValues[sContestLadyPtr->category].categoryName);
StringCopy_Nickname(nickname, sContestLadyValues[sContestLadyPtr->category].monName);
}
void BufferContestLadyMonName(u8 *category, u8 *nickname)
{
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
*category = sContestLadyPtr->category;
StringCopy(nickname, sContestLadyMonNames[sContestLadyPtr->category]);
StringCopy(nickname, sContestLadyValues[sContestLadyPtr->category].monName);
}
void BufferContestLadyPlayerName(u8 *dest)
@ -720,7 +720,7 @@ void BufferContestLadyLanguage(u8 *dest)
void BufferContestName(u8 *dest, u8 category)
{
StringCopy(dest, sContestNames[category]);
StringCopy(dest, sContestLadyValues[category].contestName);
}
// Used by the Contest Lady's TV show to determine how well she performed
@ -775,7 +775,7 @@ void SetContestLadyGivenPokeblock(void)
void GetContestLadyMonSpecies(void)
{
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
gSpecialVar_0x8005 = sContestLadyMonSpecies[sContestLadyPtr->category];
gSpecialVar_0x8005 = sContestLadyValues[sContestLadyPtr->category].monSpecies;
}
u8 GetContestLadyCategory(void)

View file

@ -1609,23 +1609,6 @@ const u8 gText_PkmnsNickname[] = _("{STR_VAR_1}'s nickname?");
const u8 gText_TellHimTheWords[] = _("Tell him the words.");
const u8 gText_MoveOkBack[] = _("{DPAD_NONE}MOVE {A_BUTTON}OK {B_BUTTON}BACK");
const u8 gText_CallCantBeMadeHere[] = _("A call can't be made from here.");
const u8 gText_ContestLady_Handsome[] = _("HANDSOME");
const u8 gText_ContestLady_Vinny[] = _("VINNY");
const u8 gText_ContestLady_Moreme[] = _("MOREME");
const u8 gText_ContestLady_Ironhard[] = _("IRONHARD");
const u8 gText_ContestLady_Muscle[] = _("MUSCLE");
const u8 gText_ContestLady_Coolness[] = _("coolness");
const u8 gText_ContestLady_Beauty[] = _("beauty");
const u8 gText_ContestLady_Cuteness[] = _("cuteness");
const u8 gText_ContestLady_Smartness[] = _("smartness");
const u8 gText_ContestLady_Toughness[] = _("toughness");
const u8 gText_QuizLady_Lady[] = _("Lady");
const u8 gText_FavorLady_Slippery[] = _("slippery");
const u8 gText_FavorLady_Roundish[] = _("roundish");
const u8 gText_FavorLady_Whamish[] = _("wham-ish");
const u8 gText_FavorLady_Shiny[] = _("shiny");
const u8 gText_FavorLady_Sticky[] = _("sticky");
const u8 gText_FavorLady_Pointy[] = _("pointy");
const u8 gText_RentalPkmn2[] = _("RENTAL POKéMON");
const u8 gText_SelectFirstPkmn[] = _("Select the first POKéMON.");
const u8 gText_SelectSecondPkmn[] = _("Select the second POKéMON.");