Clean up Lilycove Lady

This commit is contained in:
GriffinR 2021-09-09 15:24:34 -04:00
parent 4dbaca9dc6
commit cbf8863e5b
5 changed files with 116 additions and 159 deletions

View file

@ -86,6 +86,7 @@
#define EASY_CHAT_BATTLE_WORDS_COUNT 6 #define EASY_CHAT_BATTLE_WORDS_COUNT 6
#define MOVE_NAME_LENGTH 12 #define MOVE_NAME_LENGTH 12
#define NUM_QUESTIONNAIRE_WORDS 4 #define NUM_QUESTIONNAIRE_WORDS 4
#define QUIZ_QUESTION_LEN 9
#define MALE 0 #define MALE 0
#define FEMALE 1 #define FEMALE 1

View file

@ -21,8 +21,6 @@
#define QUIZ_AUTHOR_NAME_PLAYER 1 #define QUIZ_AUTHOR_NAME_PLAYER 1
#define QUIZ_AUTHOR_NAME_OTHER_PLAYER 2 #define QUIZ_AUTHOR_NAME_OTHER_PLAYER 2
#define QUIZ_QUESTION_LEN 9
// Constants for how many good Pokéblocks the Contest Lady was given // Constants for how many good Pokéblocks the Contest Lady was given
// This determines how her performance is described when her TV show comes on // This determines how her performance is described when her TV show comes on
#define CONTEST_LADY_NORMAL 0 #define CONTEST_LADY_NORMAL 0

View file

@ -761,7 +761,7 @@ struct LilycoveLadyQuiz
{ {
/*0x000*/ u8 id; /*0x000*/ u8 id;
/*0x001*/ u8 state; /*0x001*/ u8 state;
/*0x002*/ u16 question[9]; /*0x002*/ u16 question[QUIZ_QUESTION_LEN];
/*0x014*/ u16 correctAnswer; /*0x014*/ u16 correctAnswer;
/*0x016*/ u16 playerAnswer; /*0x016*/ u16 playerAnswer;
/*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; /*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1];

View file

@ -20,7 +20,7 @@ static const u16 sLilycoveLadyGfxId[] =
}; };
// Quiz Lady data // Quiz Lady data
static const u16 sQuizLadyQuestion1[] = static const u16 sQuizLadyQuestion1[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_STORES, EC_WORD_STORES,
@ -33,7 +33,7 @@ static const u16 sQuizLadyQuestion1[] =
EC_WORD_POKENAV EC_WORD_POKENAV
}; };
static const u16 sQuizLadyQuestion2[] = static const u16 sQuizLadyQuestion2[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_ISN_T, EC_WORD_ISN_T,
@ -46,7 +46,7 @@ static const u16 sQuizLadyQuestion2[] =
EC_WORD_DARK EC_WORD_DARK
}; };
static const u16 sQuizLadyQuestion3[] = static const u16 sQuizLadyQuestion3[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_HOW, EC_WORD_HOW,
EC_WORD_DO, EC_WORD_DO,
@ -59,7 +59,7 @@ static const u16 sQuizLadyQuestion3[] =
EC_WORD_CUTE_CHARM EC_WORD_CUTE_CHARM
}; };
static const u16 sQuizLadyQuestion4[] = static const u16 sQuizLadyQuestion4[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_IS, EC_WORD_IS,
@ -72,7 +72,7 @@ static const u16 sQuizLadyQuestion4[] =
EC_WORD_MACHINE EC_WORD_MACHINE
}; };
static const u16 sQuizLadyQuestion5[] = static const u16 sQuizLadyQuestion5[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_ITEM, EC_WORD_ITEM,
@ -85,7 +85,7 @@ static const u16 sQuizLadyQuestion5[] =
EC_WORD_PHONE EC_WORD_PHONE
}; };
static const u16 sQuizLadyQuestion6[] = static const u16 sQuizLadyQuestion6[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_WILL, EC_WORD_WILL,
@ -98,7 +98,7 @@ static const u16 sQuizLadyQuestion6[] =
EC_WORD_SWIFT_SWIM EC_WORD_SWIFT_SWIM
}; };
static const u16 sQuizLadyQuestion7[] = static const u16 sQuizLadyQuestion7[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_OF, EC_WORD_OF,
@ -111,7 +111,7 @@ static const u16 sQuizLadyQuestion7[] =
EC_WORD_ROCK EC_WORD_ROCK
}; };
static const u16 sQuizLadyQuestion8[] = static const u16 sQuizLadyQuestion8[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_WILL, EC_WORD_WILL,
@ -124,7 +124,7 @@ static const u16 sQuizLadyQuestion8[] =
EC_WORD_WONDER_GUARD EC_WORD_WONDER_GUARD
}; };
static const u16 sQuizLadyQuestion9[] = static const u16 sQuizLadyQuestion9[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_WILL, EC_WORD_WILL,
@ -137,7 +137,7 @@ static const u16 sQuizLadyQuestion9[] =
EC_WORD_SHED_SKIN EC_WORD_SHED_SKIN
}; };
static const u16 sQuizLadyQuestion10[] = static const u16 sQuizLadyQuestion10[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_GOES, EC_WORD_GOES,
@ -150,7 +150,7 @@ static const u16 sQuizLadyQuestion10[] =
EC_WORD_POKENAV EC_WORD_POKENAV
}; };
static const u16 sQuizLadyQuestion11[] = static const u16 sQuizLadyQuestion11[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_STORES, EC_WORD_STORES,
@ -163,7 +163,7 @@ static const u16 sQuizLadyQuestion11[] =
EC_WORD_TELEVISION EC_WORD_TELEVISION
}; };
static const u16 sQuizLadyQuestion12[] = static const u16 sQuizLadyQuestion12[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_WHICH, EC_WORD_WHICH,
EC_WORD_MACHINE, EC_WORD_MACHINE,
@ -176,7 +176,7 @@ static const u16 sQuizLadyQuestion12[] =
EC_WORD_TELEVISION EC_WORD_TELEVISION
}; };
static const u16 sQuizLadyQuestion13[] = static const u16 sQuizLadyQuestion13[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_A, EC_WORD_A,
EC_WORD_POKEMON, EC_WORD_POKEMON,
@ -189,7 +189,7 @@ static const u16 sQuizLadyQuestion13[] =
EC_WORD_LETTER EC_WORD_LETTER
}; };
static const u16 sQuizLadyQuestion14[] = static const u16 sQuizLadyQuestion14[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_STEEL, EC_WORD_STEEL,
EC_WORD_IS, EC_WORD_IS,
@ -202,7 +202,7 @@ static const u16 sQuizLadyQuestion14[] =
EC_EMPTY_WORD EC_EMPTY_WORD
}; };
static const u16 sQuizLadyQuestion15[] = static const u16 sQuizLadyQuestion15[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_DARK, EC_WORD_DARK,
EC_WORD_IS, EC_WORD_IS,
@ -215,7 +215,7 @@ static const u16 sQuizLadyQuestion15[] =
EC_EMPTY_WORD EC_EMPTY_WORD
}; };
static const u16 sQuizLadyQuestion16[] = static const u16 sQuizLadyQuestion16[QUIZ_QUESTION_LEN] =
{ {
EC_WORD_GHOST, EC_WORD_GHOST,
EC_WORD_IS, EC_WORD_IS,

View file

@ -119,10 +119,10 @@ void Script_GetLilycoveLadyId(void)
static u8 GetNumAcceptedItems(const u16 *itemsArray) static u8 GetNumAcceptedItems(const u16 *itemsArray)
{ {
u8 items; u8 numItems;
for (items = 0; *itemsArray != ITEM_NONE; items ++, itemsArray ++); for (numItems = 0; *itemsArray != ITEM_NONE; numItems++, itemsArray++);
return items; return numItems;
} }
static void FavorLadyPickFavorAndBestItem(void) static void FavorLadyPickFavorAndBestItem(void)
@ -160,18 +160,12 @@ u8 GetFavorLadyState(void)
{ {
sFavorLadyPtr = &gSaveBlock1Ptr->lilycoveLady.favor; sFavorLadyPtr = &gSaveBlock1Ptr->lilycoveLady.favor;
if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE) if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE)
{
return LILYCOVE_LADY_STATE_PRIZE; return LILYCOVE_LADY_STATE_PRIZE;
}
else if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED) else if (sFavorLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED)
{
return LILYCOVE_LADY_STATE_COMPLETED; return LILYCOVE_LADY_STATE_COMPLETED;
}
else else
{
return LILYCOVE_LADY_STATE_READY; return LILYCOVE_LADY_STATE_READY;
} }
}
static const u8 *GetFavorLadyRequest(u8 idx) static const u8 *GetFavorLadyRequest(u8 idx)
{ {
@ -209,7 +203,7 @@ void BufferFavorLadyItemName(void)
static void SetFavorLadyPlayerName(const u8 *src, u8 *dest) static void SetFavorLadyPlayerName(const u8 *src, u8 *dest)
{ {
memset(dest, 0xFF, 8); memset(dest, EOS, PLAYER_NAME_LENGTH + 1);
StringCopy7(dest, src); StringCopy7(dest, src);
} }
@ -254,9 +248,7 @@ static bool8 DoesFavorLadyLikeItem(u16 itemId)
sFavorLadyPtr->numItemsGiven++; sFavorLadyPtr->numItemsGiven++;
sFavorLadyPtr->likedItem = TRUE; sFavorLadyPtr->likedItem = TRUE;
if (sFavorLadyPtr->bestItem == itemId) if (sFavorLadyPtr->bestItem == itemId)
{
sFavorLadyPtr->numItemsGiven = LILYCOVE_LADY_GIFT_THRESHOLD; sFavorLadyPtr->numItemsGiven = LILYCOVE_LADY_GIFT_THRESHOLD;
}
break; break;
} }
sFavorLadyPtr->likedItem = FALSE; sFavorLadyPtr->likedItem = FALSE;
@ -312,9 +304,7 @@ static void QuizLadyPickQuestion(void)
questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions); questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions);
for (i = 0; i < QUIZ_QUESTION_LEN; i ++) for (i = 0; i < QUIZ_QUESTION_LEN; i ++)
{
sQuizLadyPtr->question[i] = sQuizLadyQuizQuestions[questionId][i]; sQuizLadyPtr->question[i] = sQuizLadyQuizQuestions[questionId][i];
}
sQuizLadyPtr->correctAnswer = sQuizLadyQuizAnswers[questionId]; sQuizLadyPtr->correctAnswer = sQuizLadyQuizAnswers[questionId];
sQuizLadyPtr->prize = sQuizLadyPrizes[questionId]; sQuizLadyPtr->prize = sQuizLadyPrizes[questionId];
sQuizLadyPtr->questionId = questionId; sQuizLadyPtr->questionId = questionId;
@ -328,16 +318,16 @@ static void InitLilycoveQuizLady(void)
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ; sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ;
sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY; sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY;
for (i = 0; i < QUIZ_QUESTION_LEN; i ++) for (i = 0; i < QUIZ_QUESTION_LEN; i ++)
{ sQuizLadyPtr->question[i] = EC_EMPTY_WORD;
sQuizLadyPtr->question[i] = -1;
} sQuizLadyPtr->correctAnswer = EC_EMPTY_WORD;
sQuizLadyPtr->correctAnswer = -1; sQuizLadyPtr->playerAnswer = EC_EMPTY_WORD;
sQuizLadyPtr->playerAnswer = -1;
for (i = 0; i < TRAINER_ID_LENGTH; i ++) for (i = 0; i < TRAINER_ID_LENGTH; i ++)
{
sQuizLadyPtr->playerTrainerId[i] = 0; sQuizLadyPtr->playerTrainerId[i] = 0;
}
sQuizLadyPtr->prize = ITEM_NONE; sQuizLadyPtr->prize = ITEM_NONE;
sQuizLadyPtr->waitingForChallenger = FALSE; sQuizLadyPtr->waitingForChallenger = FALSE;
sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions); sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions);
@ -351,48 +341,37 @@ static void ResetQuizLadyForRecordMix(void)
sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ; sQuizLadyPtr->id = LILYCOVE_LADY_QUIZ;
sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY; sQuizLadyPtr->state = LILYCOVE_LADY_STATE_READY;
sQuizLadyPtr->waitingForChallenger = FALSE; sQuizLadyPtr->waitingForChallenger = FALSE;
sQuizLadyPtr->playerAnswer = -1; sQuizLadyPtr->playerAnswer = EC_EMPTY_WORD;
} }
u8 GetQuizLadyState(void) u8 GetQuizLadyState(void)
{ {
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE) if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_PRIZE)
{
return LILYCOVE_LADY_STATE_PRIZE; return LILYCOVE_LADY_STATE_PRIZE;
}
else if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED) else if (sQuizLadyPtr->state == LILYCOVE_LADY_STATE_COMPLETED)
{
return LILYCOVE_LADY_STATE_COMPLETED; return LILYCOVE_LADY_STATE_COMPLETED;
}
else else
{
return LILYCOVE_LADY_STATE_READY; return LILYCOVE_LADY_STATE_READY;
} }
}
u8 GetQuizAuthor(void) u8 GetQuizAuthor(void)
{ {
int i; s32 i, j;
int j;
u8 authorNameId; u8 authorNameId;
struct LilycoveLadyQuiz *quiz; struct LilycoveLadyQuiz *quiz = &gSaveBlock1Ptr->lilycoveLady.quiz;
quiz = &gSaveBlock1Ptr->lilycoveLady.quiz;
if (IsEasyChatAnswerUnlocked(quiz->correctAnswer) == FALSE) if (IsEasyChatAnswerUnlocked(quiz->correctAnswer) == FALSE)
{ {
i = quiz->questionId; i = quiz->questionId;
do do
{ {
if (++ i >= (int)(ARRAY_COUNT(sQuizLadyQuizQuestions))) if (++i >= (int)ARRAY_COUNT(sQuizLadyQuizQuestions))
{
i = 0; i = 0;
}
} while (IsEasyChatAnswerUnlocked(sQuizLadyQuizAnswers[i]) == FALSE); } while (IsEasyChatAnswerUnlocked(sQuizLadyQuizAnswers[i]) == FALSE);
for (j = 0; j < QUIZ_QUESTION_LEN; j++) for (j = 0; j < QUIZ_QUESTION_LEN; j++)
{
quiz->question[j] = sQuizLadyQuizQuestions[i][j]; quiz->question[j] = sQuizLadyQuizQuestions[i][j];
}
quiz->correctAnswer = sQuizLadyQuizAnswers[i]; quiz->correctAnswer = sQuizLadyQuizAnswers[i];
quiz->prize = sQuizLadyPrizes[i]; quiz->prize = sQuizLadyPrizes[i];
quiz->questionId = i; quiz->questionId = i;
@ -400,18 +379,12 @@ u8 GetQuizAuthor(void)
} }
authorNameId = BufferQuizAuthorName(); authorNameId = BufferQuizAuthorName();
if (authorNameId == QUIZ_AUTHOR_NAME_LADY) if (authorNameId == QUIZ_AUTHOR_NAME_LADY)
{
return QUIZ_AUTHOR_LADY; return QUIZ_AUTHOR_LADY;
}
else if (authorNameId == QUIZ_AUTHOR_NAME_OTHER_PLAYER || IsQuizTrainerIdNotPlayer()) else if (authorNameId == QUIZ_AUTHOR_NAME_OTHER_PLAYER || IsQuizTrainerIdNotPlayer())
{
return QUIZ_AUTHOR_OTHER_PLAYER; return QUIZ_AUTHOR_OTHER_PLAYER;
}
else else
{
return QUIZ_AUTHOR_PLAYER; return QUIZ_AUTHOR_PLAYER;
} }
}
static u8 BufferQuizAuthorName(void) static u8 BufferQuizAuthorName(void)
{ {
@ -532,7 +505,7 @@ void SetQuizLadyState_GivePrize(void)
void ClearQuizLadyPlayerAnswer(void) void ClearQuizLadyPlayerAnswer(void)
{ {
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
sQuizLadyPtr->playerAnswer = -1; sQuizLadyPtr->playerAnswer = EC_EMPTY_WORD;
} }
void Script_QuizLadyOpenBagMenu(void) void Script_QuizLadyOpenBagMenu(void)
@ -544,13 +517,9 @@ void QuizLadyPickNewQuestion(void)
{ {
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
if (BufferQuizAuthorNameAndCheckIfLady()) if (BufferQuizAuthorNameAndCheckIfLady())
{
sQuizLadyPtr->prevQuestionId = sQuizLadyPtr->questionId; sQuizLadyPtr->prevQuestionId = sQuizLadyPtr->questionId;
}
else else
{
sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions); sQuizLadyPtr->prevQuestionId = ARRAY_COUNT(sQuizLadyQuizQuestions);
}
QuizLadyPickQuestion(); QuizLadyPickQuestion();
} }
@ -560,10 +529,8 @@ void ClearQuizLadyQuestionAndAnswer(void)
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
for (i = 0; i < QUIZ_QUESTION_LEN; i++) for (i = 0; i < QUIZ_QUESTION_LEN; i++)
{ sQuizLadyPtr->question[i] = EC_EMPTY_WORD;
sQuizLadyPtr->question[i] = -1; sQuizLadyPtr->correctAnswer = EC_EMPTY_WORD;
}
sQuizLadyPtr->correctAnswer = -1;
} }
void QuizLadySetCustomQuestion(void) void QuizLadySetCustomQuestion(void)
@ -584,9 +551,7 @@ void QuizLadyRecordCustomQuizData(void)
sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz; sQuizLadyPtr = &gSaveBlock1Ptr->lilycoveLady.quiz;
sQuizLadyPtr->prize = gSpecialVar_ItemId; sQuizLadyPtr->prize = gSpecialVar_ItemId;
for (i = 0; i < TRAINER_ID_LENGTH; i++) for (i = 0; i < TRAINER_ID_LENGTH; i++)
{
sQuizLadyPtr->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; sQuizLadyPtr->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
}
StringCopy7(sQuizLadyPtr->playerName, gSaveBlock2Ptr->playerName); StringCopy7(sQuizLadyPtr->playerName, gSaveBlock2Ptr->playerName);
sQuizLadyPtr->language = gGameLanguage; sQuizLadyPtr->language = gGameLanguage;
} }
@ -620,15 +585,12 @@ void QuizLadyClearQuestionForRecordMix(const LilycoveLady *lilycoveLady)
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
if (lilycoveLady->quiz.prevQuestionId != sQuizLadyPtr->questionId) if (lilycoveLady->quiz.prevQuestionId != sQuizLadyPtr->questionId)
{
break; break;
}
sQuizLadyPtr->questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions); sQuizLadyPtr->questionId = Random() % ARRAY_COUNT(sQuizLadyQuizQuestions);
} }
if (lilycoveLady->quiz.prevQuestionId == sQuizLadyPtr->questionId) if (lilycoveLady->quiz.prevQuestionId == sQuizLadyPtr->questionId)
{ sQuizLadyPtr->questionId = (sQuizLadyPtr->questionId + 1) % (int)ARRAY_COUNT(sQuizLadyQuizQuestions);
sQuizLadyPtr->questionId = (sQuizLadyPtr->questionId + 1) % (int)(ARRAY_COUNT(sQuizLadyQuizQuestions));
}
sQuizLadyPtr->prevQuestionId = lilycoveLady->quiz.prevQuestionId; sQuizLadyPtr->prevQuestionId = lilycoveLady->quiz.prevQuestionId;
} }
} }
@ -656,12 +618,11 @@ static void ResetContestLadyForRecordMix(void)
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
sContestLadyPtr->id = LILYCOVE_LADY_CONTEST; sContestLadyPtr->id = LILYCOVE_LADY_CONTEST;
sContestLadyPtr->givenPokeblock = FALSE; sContestLadyPtr->givenPokeblock = FALSE;
if (sContestLadyPtr->numGoodPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD if (sContestLadyPtr->numGoodPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD
|| sContestLadyPtr->numOtherPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD) || sContestLadyPtr->numOtherPokeblocksGiven == LILYCOVE_LADY_GIFT_THRESHOLD)
{
ResetContestLadyContestData(); ResetContestLadyContestData();
} }
}
static void ContestLadySavePlayerNameIfHighSheen(u8 sheen) static void ContestLadySavePlayerNameIfHighSheen(u8 sheen)
{ {
@ -731,18 +692,18 @@ bool8 GivePokeblockToContestLady(struct Pokeblock *pokeblock)
return correctFlavor; return correctFlavor;
} }
static void BufferContestLadyCategoryAndMonName(u8 *dest1, u8 *dest2) static void BufferContestLadyCategoryAndMonName(u8 *category, u8 *nickname)
{ {
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
StringCopy(dest1, sContestLadyCategoryNames[sContestLadyPtr->category]); StringCopy(category, sContestLadyCategoryNames[sContestLadyPtr->category]);
StringCopy10(dest2, sContestLadyMonNames[sContestLadyPtr->category]); StringCopy10(nickname, sContestLadyMonNames[sContestLadyPtr->category]);
} }
void BufferContestLadyMonName(u8 *dest1, u8 *dest2) void BufferContestLadyMonName(u8 *category, u8 *nickname)
{ {
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
*dest1 = sContestLadyPtr->category; *category = sContestLadyPtr->category;
StringCopy(dest2, sContestLadyMonNames[sContestLadyPtr->category]); StringCopy(nickname, sContestLadyMonNames[sContestLadyPtr->category]);
} }
void BufferContestLadyPlayerName(u8 *dest) void BufferContestLadyPlayerName(u8 *dest)
@ -779,9 +740,7 @@ bool8 HasPlayerGivenContestLadyPokeblock(void)
{ {
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
if (sContestLadyPtr->givenPokeblock == TRUE) if (sContestLadyPtr->givenPokeblock == TRUE)
{
return TRUE; return TRUE;
}
return FALSE; return FALSE;
} }
@ -792,9 +751,8 @@ bool8 ShouldContestLadyShowGoOnAir(void)
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
if (sContestLadyPtr->numGoodPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD if (sContestLadyPtr->numGoodPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD
|| sContestLadyPtr->numOtherPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD) || sContestLadyPtr->numOtherPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD)
{
putOnAir = TRUE; putOnAir = TRUE;
}
return putOnAir; return putOnAir;
} }