diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-03-31 16:29:42 -0400 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-03-31 16:29:42 -0400 |
commit | 771a4347309cd2f486072794d7de2c41b84c9b12 (patch) | |
tree | e5ff9c2884b23495a16ddd56c060d5de1cd7ae82 /src | |
parent | 86856098a35b58eabb74db1d41cb9a2853c6746f (diff) |
Label Trend Watcher TV show texts
Diffstat (limited to 'src')
-rw-r--r-- | src/dewford_trend.c | 20 | ||||
-rw-r--r-- | src/tv.c | 90 |
2 files changed, 54 insertions, 56 deletions
diff --git a/src/dewford_trend.c b/src/dewford_trend.c index 3358334dd..5ce2844d4 100644 --- a/src/dewford_trend.c +++ b/src/dewford_trend.c @@ -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}; @@ -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]); } |