Label Trend Watcher TV show texts

This commit is contained in:
GriffinR
2021-03-31 16:29:42 -04:00
parent 86856098a3
commit 771a434730
5 changed files with 79 additions and 70 deletions

View File

@@ -43,13 +43,17 @@
new phrase submitted after the 1st submission.
## Saving trends ##
Each time a new trendy phrase is accepted, the previous Dewford Trend is saved
in gSaveBlock1Ptr->dewfordTrends[]. Up to SAVED_TRENDS_COUNT (5) trends may be
saved at one time. The trends in this array are kept in sorted order from most trendy
to least trendy. The current trendy phrase is always at gSaveBlock1Ptr->dewfordTrends[0].
If the player mixes records with another player, their own trends are replaced with
their mixing partner's, unless the phrase is the same, in which case the version with
a higher trendiness value is used (see ReceiveDewfordTrendData).
Each time a potential trendy phrase is submitted, it is saved in gSaveBlock1Ptr->dewfordTrends[].
Up to SAVED_TRENDS_COUNT (5) trends may be saved at one time. The trends in this array are kept
in sorted order from most trendy to least trendy. The current trendy phrase is always at
gSaveBlock1Ptr->dewfordTrends[0]. If the player mixes records with another player, their own
trends are replaced with their mixing partner's, unless the phrase is the same, in which case
the version with a higher trendiness value is used (see ReceiveDewfordTrendData).
## TV Show ##
If a submitted phrase is only trendier than 1 or none of the saved trends, it may trigger a
TV Show called Trend Watcher (see TryPutTrendWatcherOnAir) that, ironically, spends the
show talking about how the submitted phrase was not trendy.
*/
@@ -144,6 +148,8 @@ void UpdateDewfordTrendPerDay(u16 days)
// Returns TRUE if the current trendy phrase was successfully changed to the given phrase
// Returns FALSE otherwise
// Regardless of whether or not the current trendy phrase was changed, the submitted
// phrase is always saved in gSaveBlock1Ptr->dewfordTrends
bool8 TrySetTrendyPhrase(u16 *phrase)
{
struct DewfordTrend trend = {0};

View File

@@ -504,13 +504,13 @@ static const u8 *const sTVTodaysRivalTrainerTextGroup[] = {
};
static const u8 *const sTVDewfordTrendWatcherNetworkTextGroup[] = {
gTVDewfordTrendWatcherNetworkText00,
gTVDewfordTrendWatcherNetworkText01,
gTVDewfordTrendWatcherNetworkText02,
gTVDewfordTrendWatcherNetworkText03,
gTVDewfordTrendWatcherNetworkText04,
gTVDewfordTrendWatcherNetworkText05,
gTVDewfordTrendWatcherNetworkText06
[TRENDWATCHER_STATE_INTRO] = TrendWatcher_Text_Intro,
[TRENDWATCHER_STATE_TAUGHT_MALE] = TrendWatcher_Text_MaleTaughtMePhrase,
[TRENDWATCHER_STATE_TAUGHT_FEMALE] = TrendWatcher_Text_FemaleTaughtMePhrase,
[TRENDWATCHER_STATE_PHRASE_HOPELESS] = TrendWatcher_Text_PhraseWasHopeless,
[TRENDWATCHER_STATE_BIGGER_MALE] = TrendWatcher_Text_MaleTellMeBigger,
[TRENDWATCHER_STATE_BIGGER_FEMALE] = TrendWatcher_Text_FemaleTellMeBigger,
[TRENDWATCHER_STATE_OUTRO] = TrendWatcher_Text_Outro
};
static const u8 *const sTVHoennTreasureInvestisatorsTextGroup[] = {
@@ -5979,48 +5979,40 @@ static void DoTVShowDewfordTrendWatcherNetwork(void)
state = sTVShowState;
switch (state)
{
case 0:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
if (show->trendWatcher.gender == MALE)
{
sTVShowState = 1;
}
else
{
sTVShowState = 2;
}
break;
case 1:
case 2:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
TVShowConvertInternationalString(gStringVar3, show->trendWatcher.playerName, show->trendWatcher.language);
sTVShowState = 3;
break;
case 3:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
if (show->trendWatcher.gender == MALE)
{
sTVShowState = 4;
}
else
{
sTVShowState = 5;
}
break;
case 4:
case 5:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
TVShowConvertInternationalString(gStringVar3, show->trendWatcher.playerName, show->trendWatcher.language);
sTVShowState = 6;
break;
case 6:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
TVShowDone();
case TRENDWATCHER_STATE_INTRO:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
if (show->trendWatcher.gender == MALE)
sTVShowState = TRENDWATCHER_STATE_TAUGHT_MALE;
else
sTVShowState = TRENDWATCHER_STATE_TAUGHT_FEMALE;
break;
case TRENDWATCHER_STATE_TAUGHT_MALE:
case TRENDWATCHER_STATE_TAUGHT_FEMALE:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
TVShowConvertInternationalString(gStringVar3, show->trendWatcher.playerName, show->trendWatcher.language);
sTVShowState = TRENDWATCHER_STATE_PHRASE_HOPELESS;
break;
case TRENDWATCHER_STATE_PHRASE_HOPELESS:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
if (show->trendWatcher.gender == MALE)
sTVShowState = TRENDWATCHER_STATE_BIGGER_MALE;
else
sTVShowState = TRENDWATCHER_STATE_BIGGER_FEMALE;
break;
case TRENDWATCHER_STATE_BIGGER_MALE:
case TRENDWATCHER_STATE_BIGGER_FEMALE:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
TVShowConvertInternationalString(gStringVar3, show->trendWatcher.playerName, show->trendWatcher.language);
sTVShowState = TRENDWATCHER_STATE_OUTRO;
break;
case TRENDWATCHER_STATE_OUTRO:
CopyEasyChatWord(gStringVar1, show->trendWatcher.words[0]);
CopyEasyChatWord(gStringVar2, show->trendWatcher.words[1]);
TVShowDone();
}
ShowFieldMessage(sTVDewfordTrendWatcherNetworkTextGroup[state]);
}