diff --git a/data/text/tv.inc b/data/text/tv.inc index 444b37f17..72d391034 100644 --- a/data/text/tv.inc +++ b/data/text/tv.inc @@ -1229,7 +1229,7 @@ gTVTodaysRivalTrainerText06:: @ 082849AE .string "Let's all keep moving forward\n" .string "and ahead of our rivals!$" -gTVDewfordTrendWatcherNetworkText00:: @ 08284A3E +TrendWatcher_Text_Intro:: @ 08284A3E .string "DEWFORD TREND-WATCHER NETWORK!\p" .string "MC: Wassup?\n" .string "We'll keep it real with the latest on\l" @@ -1251,17 +1251,18 @@ gTVDewfordTrendWatcherNetworkText00:: @ 08284A3E .string "MC: Uh, no. What we want to know is\n" .string "what's the in thing of the moment…$" -gTVDewfordTrendWatcherNetworkText01:: @ 08284C55 +@ Identical to below, may have been different in other languages +TrendWatcher_Text_MaleTaughtMePhrase:: @ 08284C55 .string "Old man: {STR_VAR_1} {STR_VAR_2}\n" .string "was what {STR_VAR_3} from LITTLEROOT\l" .string "taught me as being trendy…$" -gTVDewfordTrendWatcherNetworkText02:: @ 08284C9B +TrendWatcher_Text_FemaleTaughtMePhrase:: @ 08284C9B .string "Old man: {STR_VAR_1} {STR_VAR_2}\n" .string "was what {STR_VAR_3} from LITTLEROOT\l" .string "taught me as being trendy…$" -gTVDewfordTrendWatcherNetworkText03:: @ 08284CE1 +TrendWatcher_Text_PhraseWasHopeless:: @ 08284CE1 .string "But it was utterly hopeless.\p" .string "{STR_VAR_1} {STR_VAR_2} festival!\p" .string "{STR_VAR_1} {STR_VAR_2} contest!\p" @@ -1272,17 +1273,18 @@ gTVDewfordTrendWatcherNetworkText03:: @ 08284CE1 .string "MC: Uh, excuse me, compadre, I need\n" .string "to hear about what's in now…$" -gTVDewfordTrendWatcherNetworkText04:: @ 08284DB6 +@ Identical to below, may have been different in other languages +TrendWatcher_Text_MaleTellMeBigger:: @ 08284DB6 .string "Old man: {STR_VAR_3}!\n" .string "Please, tell me something bigger than\l" .string "that {STR_VAR_1} {STR_VAR_2}!$" -gTVDewfordTrendWatcherNetworkText05:: @ 08284DF5 +TrendWatcher_Text_FemaleTellMeBigger:: @ 08284DF5 .string "Old man: {STR_VAR_3}!\n" .string "Please, tell me something bigger than\l" .string "that {STR_VAR_1} {STR_VAR_2}!$" -gTVDewfordTrendWatcherNetworkText06:: @ 08284E34 +TrendWatcher_Text_Outro:: @ 08284E34 .string "MC: …Uh… So, there you have it,\n" .string "all you trendy, hep cats out there!\p" .string "{STR_VAR_1} {STR_VAR_2}…uh…\n" diff --git a/include/constants/tv.h b/include/constants/tv.h index 72eae3f1c..57da9837b 100644 --- a/include/constants/tv.h +++ b/include/constants/tv.h @@ -206,4 +206,13 @@ #define SPOTCUTIES_STATE_RIBBON_EFFORT 14 #define SPOTCUTIES_STATE_OUTRO 15 +// TV Show states for Trend Watcher +#define TRENDWATCHER_STATE_INTRO 0 +#define TRENDWATCHER_STATE_TAUGHT_MALE 1 +#define TRENDWATCHER_STATE_TAUGHT_FEMALE 2 +#define TRENDWATCHER_STATE_PHRASE_HOPELESS 3 +#define TRENDWATCHER_STATE_BIGGER_MALE 4 +#define TRENDWATCHER_STATE_BIGGER_FEMALE 5 +#define TRENDWATCHER_STATE_OUTRO 6 + #endif //GUARD_CONSTANTS_TV_H diff --git a/include/event_scripts.h b/include/event_scripts.h index 79ef0ea14..ecb40c266 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -135,13 +135,13 @@ extern const u8 gTVTodaysRivalTrainerText03[]; extern const u8 gTVTodaysRivalTrainerText04[]; extern const u8 gTVTodaysRivalTrainerText05[]; extern const u8 gTVTodaysRivalTrainerText06[]; -extern const u8 gTVDewfordTrendWatcherNetworkText00[]; -extern const u8 gTVDewfordTrendWatcherNetworkText01[]; -extern const u8 gTVDewfordTrendWatcherNetworkText02[]; -extern const u8 gTVDewfordTrendWatcherNetworkText03[]; -extern const u8 gTVDewfordTrendWatcherNetworkText04[]; -extern const u8 gTVDewfordTrendWatcherNetworkText05[]; -extern const u8 gTVDewfordTrendWatcherNetworkText06[]; +extern const u8 TrendWatcher_Text_Intro[]; +extern const u8 TrendWatcher_Text_MaleTaughtMePhrase[]; +extern const u8 TrendWatcher_Text_FemaleTaughtMePhrase[]; +extern const u8 TrendWatcher_Text_PhraseWasHopeless[]; +extern const u8 TrendWatcher_Text_MaleTellMeBigger[]; +extern const u8 TrendWatcher_Text_FemaleTellMeBigger[]; +extern const u8 TrendWatcher_Text_Outro[]; extern const u8 gTVHoennTreasureInvestigatorsText00[]; extern const u8 gTVHoennTreasureInvestigatorsText01[]; extern const u8 gTVHoennTreasureInvestigatorsText02[]; 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}; diff --git a/src/tv.c b/src/tv.c index 7f3aa6aaf..691b343d8 100644 --- a/src/tv.c +++ b/src/tv.c @@ -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]); }