Document Contest Lady TV Show

This commit is contained in:
GriffinR 2021-04-02 01:49:38 -04:00
parent a0b3d4df12
commit 8be2c5d60b
8 changed files with 76 additions and 73 deletions

View File

@ -2925,7 +2925,7 @@ gTVInSearchOfTrainersText08:: @ 0828C011
.string "That's all for today!\n" .string "That's all for today!\n"
.string "See you again on our next broadcast!$" .string "See you again on our next broadcast!$"
gTVPokemonContestLiveUpdates2Text00:: @ 0828C137 ContestLadyShow_Text_Intro:: @ 0828C137
.string "“POKéMON CONTEST LIVE UPDATES!”\p" .string "“POKéMON CONTEST LIVE UPDATES!”\p"
.string "MC: Sorry to interrupt the regular\n" .string "MC: Sorry to interrupt the regular\n"
.string "programming, and thanks for joining us!\p" .string "programming, and thanks for joining us!\p"
@ -2940,7 +2940,7 @@ gTVPokemonContestLiveUpdates2Text00:: @ 0828C137
.string "Spectators: ?!!!!\n" .string "Spectators: ?!!!!\n"
.string "?!!!!$" .string "?!!!!$"
gTVPokemonContestLiveUpdates2Text01:: @ 0828C28C ContestLadyShow_Text_Won:: @ 0828C28C
.string "MC: Excuse me!\n" .string "MC: Excuse me!\n"
.string "Thanks for joining us on live TV!\p" .string "Thanks for joining us on live TV!\p"
.string "May I congratulate you on your win?\p" .string "May I congratulate you on your win?\p"
@ -2959,7 +2959,7 @@ gTVPokemonContestLiveUpdates2Text01:: @ 0828C28C
.string "We did it!\l" .string "We did it!\l"
.string "Thank you!$" .string "Thank you!$"
gTVPokemonContestLiveUpdates2Text02:: @ 0828C45B ContestLadyShow_Text_Lost:: @ 0828C45B
.string "MC: Excuse me!\n" .string "MC: Excuse me!\n"
.string "Thanks for joining us on live TV!\p" .string "Thanks for joining us on live TV!\p"
.string "You must be disappointed by that turn\n" .string "You must be disappointed by that turn\n"
@ -2979,7 +2979,7 @@ gTVPokemonContestLiveUpdates2Text02:: @ 0828C45B
.string "Uh… That's all the time we have today!\n" .string "Uh… That's all the time we have today!\n"
.string "Thanks for tuning in!$" .string "Thanks for tuning in!$"
gTVPokemonContestLiveUpdates2Text03:: @ 0828C662 ContestLadyShow_Text_LostBadly:: @ 0828C662
.string "MC: Excuse me!\n" .string "MC: Excuse me!\n"
.string "Thanks for joining us on live TV!\p" .string "Thanks for joining us on live TV!\p"
.string "How did your CONTEST appearance go?\p" .string "How did your CONTEST appearance go?\p"

View File

@ -21,6 +21,12 @@
#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 #define QUIZ_QUESTION_LEN 9
#endif // 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
#define CONTEST_LADY_NORMAL 0
#define CONTEST_LADY_GOOD 1
#define CONTEST_LADY_BAD 2
#endif // GUARD_LILYCOVE_LADY_CONSTANTS_H

View File

@ -19,7 +19,7 @@
#define TVSHOW_3_CHEERS_FOR_POKEBLOCKS 9 #define TVSHOW_3_CHEERS_FOR_POKEBLOCKS 9
#define TVSHOW_BATTLE_UPDATE 10 #define TVSHOW_BATTLE_UPDATE 10
#define TVSHOW_FAN_CLUB_SPECIAL 11 #define TVSHOW_FAN_CLUB_SPECIAL 11
#define TVSHOW_CONTEST_LIVE_UPDATES_2 12 #define TVSHOW_LILYCOVE_CONTEST_LADY 12
// // // //
#define TVSHOW_POKEMON_TODAY_CAUGHT 21 #define TVSHOW_POKEMON_TODAY_CAUGHT 21
#define TVSHOW_SMART_SHOPPER 22 #define TVSHOW_SMART_SHOPPER 22
@ -215,4 +215,10 @@
#define TRENDWATCHER_STATE_BIGGER_FEMALE 5 #define TRENDWATCHER_STATE_BIGGER_FEMALE 5
#define TRENDWATCHER_STATE_OUTRO 6 #define TRENDWATCHER_STATE_OUTRO 6
// TV Show states for the Contest Lady's Live Updates show
#define CONTESTLADYLIVE_STATE_INTRO 0
#define CONTESTLADYLIVE_STATE_WON 1
#define CONTESTLADYLIVE_STATE_LOST 2
#define CONTESTLADYLIVE_STATE_LOST_BADLY 3
#endif //GUARD_CONSTANTS_TV_H #endif //GUARD_CONSTANTS_TV_H

View File

@ -344,10 +344,10 @@ extern const u8 gTVInSearchOfTrainersText05[];
extern const u8 gTVInSearchOfTrainersText06[]; extern const u8 gTVInSearchOfTrainersText06[];
extern const u8 gTVInSearchOfTrainersText07[]; extern const u8 gTVInSearchOfTrainersText07[];
extern const u8 gTVInSearchOfTrainersText08[]; extern const u8 gTVInSearchOfTrainersText08[];
extern const u8 gTVPokemonContestLiveUpdates2Text00[]; extern const u8 ContestLadyShow_Text_Intro[];
extern const u8 gTVPokemonContestLiveUpdates2Text01[]; extern const u8 ContestLadyShow_Text_Won[];
extern const u8 gTVPokemonContestLiveUpdates2Text02[]; extern const u8 ContestLadyShow_Text_Lost[];
extern const u8 gTVPokemonContestLiveUpdates2Text03[]; extern const u8 ContestLadyShow_Text_LostBadly[];
extern const u8 gPokeNewsTextSlateport_Upcoming[]; extern const u8 gPokeNewsTextSlateport_Upcoming[];
extern const u8 gPokeNewsTextSlateport_Ongoing[]; extern const u8 gPokeNewsTextSlateport_Ongoing[];
extern const u8 gPokeNewsTextSlateport_Ending[]; extern const u8 gPokeNewsTextSlateport_Ending[];

View File

@ -179,7 +179,7 @@ typedef union // size = 0x24
/*0x18*/ u8 idolNameLanguage; /*0x18*/ u8 idolNameLanguage;
} fanClubSpecial; } fanClubSpecial;
// TVSHOW_CONTEST_LIVE_UPDATES_2 // TVSHOW_LILYCOVE_CONTEST_LADY
struct { struct {
/*0x00*/ u8 kind; /*0x00*/ u8 kind;
/*0x01*/ bool8 active; /*0x01*/ bool8 active;
@ -189,7 +189,7 @@ typedef union // size = 0x24
/*0x16*/ u8 pokeblockState; /*0x16*/ u8 pokeblockState;
/*0x17*/ u8 language; /*0x17*/ u8 language;
/*0x18*/ u8 pokemonNameLanguage; /*0x18*/ u8 pokemonNameLanguage;
} contestLiveUpdates2; } contestLady;
// Record Mixing Shows // Record Mixing Shows
// TVSHOW_POKEMON_TODAY_CAUGHT // TVSHOW_POKEMON_TODAY_CAUGHT

View File

@ -12,6 +12,6 @@ void BufferContestLadyMonName(u8 *dest1, u8 *dest2);
void BufferContestLadyPlayerName(u8 *dest); void BufferContestLadyPlayerName(u8 *dest);
void BufferContestLadyLanguage(u8 *dest); void BufferContestLadyLanguage(u8 *dest);
void BufferContestName(u8 *dest, u8 category); void BufferContestName(u8 *dest, u8 category);
u8 sub_818E880(void); u8 GetContestLadyPokeblockState(void);
#endif //GUARD_LILYCOVE_LADY_H #endif //GUARD_LILYCOVE_LADY_H

View File

@ -762,25 +762,16 @@ void BufferContestName(u8 *dest, u8 category)
StringCopy(dest, sContestNames[category]); StringCopy(dest, sContestNames[category]);
} }
// used in tv.c to determine sTVShowState for Contest Lady show // Used by the Contest Lady's TV show to determine how well she performed
// if return val is 1, sTVShowState is 1 u8 GetContestLadyPokeblockState(void)
// if return val is 2, sTVShowState is 3
// if return val is 0, sTVShowState is 2
u8 sub_818E880(void)
{ {
sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest; sContestLadyPtr = &gSaveBlock1Ptr->lilycoveLady.contest;
if (sContestLadyPtr->numGoodPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD) if (sContestLadyPtr->numGoodPokeblocksGiven >= LILYCOVE_LADY_GIFT_THRESHOLD)
{ return CONTEST_LADY_GOOD;
return 1;
}
else if (sContestLadyPtr->numGoodPokeblocksGiven == 0) else if (sContestLadyPtr->numGoodPokeblocksGiven == 0)
{ return CONTEST_LADY_BAD;
return 2;
}
else else
{ return CONTEST_LADY_NORMAL;
return 0;
}
} }

View File

@ -38,6 +38,7 @@
#include "constants/contest.h" #include "constants/contest.h"
#include "constants/items.h" #include "constants/items.h"
#include "constants/layouts.h" #include "constants/layouts.h"
#include "constants/lilycove_lady.h"
#include "constants/maps.h" #include "constants/maps.h"
#include "constants/metatile_behaviors.h" #include "constants/metatile_behaviors.h"
#include "constants/moves.h" #include "constants/moves.h"
@ -179,7 +180,7 @@ static void DoTVShowPokemonNewsBattleFrontier(void);
static void DoTVShowWhatsNo1InHoennToday(void); static void DoTVShowWhatsNo1InHoennToday(void);
static void DoTVShowSecretBaseSecrets(void); static void DoTVShowSecretBaseSecrets(void);
static void DoTVShowSafariFanClub(void); static void DoTVShowSafariFanClub(void);
static void DoTVShowPokemonContestLiveUpdates2(void); static void DoTVShowLilycoveContestLady(void);
// .rodata // .rodata
@ -461,11 +462,11 @@ static const u8 *const sTVNameRaterTextGroup[] = {
gTVNameRaterText18 gTVNameRaterText18
}; };
static const u8 *const sTVPokemonContestLiveUpdates2TextGroup[] = { static const u8 *const sTVLilycoveContestLadyTextGroup[] = {
gTVPokemonContestLiveUpdates2Text00, [CONTESTLADYLIVE_STATE_INTRO] = ContestLadyShow_Text_Intro,
gTVPokemonContestLiveUpdates2Text01, [CONTESTLADYLIVE_STATE_WON] = ContestLadyShow_Text_Won,
gTVPokemonContestLiveUpdates2Text02, [CONTESTLADYLIVE_STATE_LOST] = ContestLadyShow_Text_Lost,
gTVPokemonContestLiveUpdates2Text03 [CONTESTLADYLIVE_STATE_LOST_BADLY] = ContestLadyShow_Text_LostBadly
}; };
static const u8 *const sTVPokemonTodayFailedTextGroup[] = { static const u8 *const sTVPokemonTodayFailedTextGroup[] = {
@ -1661,13 +1662,13 @@ void PutLilycoveContestLadyShowOnTheAir(void)
if (gSpecialVar_Result != TRUE) if (gSpecialVar_Result != TRUE)
{ {
show = &gSaveBlock1Ptr->tvShows[sCurTVShowSlot]; show = &gSaveBlock1Ptr->tvShows[sCurTVShowSlot];
BufferContestLadyLanguage(&show->contestLiveUpdates2.language); BufferContestLadyLanguage(&show->contestLady.language);
show->contestLiveUpdates2.pokemonNameLanguage = GAME_LANGUAGE; show->contestLady.pokemonNameLanguage = GAME_LANGUAGE;
show->contestLiveUpdates2.kind = TVSHOW_CONTEST_LIVE_UPDATES_2; show->contestLady.kind = TVSHOW_LILYCOVE_CONTEST_LADY;
show->contestLiveUpdates2.active = TRUE; show->contestLady.active = TRUE;
BufferContestLadyPlayerName(show->contestLiveUpdates2.playerName); BufferContestLadyPlayerName(show->contestLady.playerName);
BufferContestLadyMonName(&show->contestLiveUpdates2.contestCategory, show->contestLiveUpdates2.nickname); BufferContestLadyMonName(&show->contestLady.contestCategory, show->contestLady.nickname);
show->contestLiveUpdates2.pokeblockState = sub_818E880(); show->contestLady.pokeblockState = GetContestLadyPokeblockState();
tv_store_id_2x(show); tv_store_id_2x(show);
} }
} }
@ -3812,9 +3813,8 @@ static void sub_80F0708(void) // FIXME: register allocation shenanigans
break; break;
case TVSHOW_FAN_CLUB_SPECIAL: case TVSHOW_FAN_CLUB_SPECIAL:
break; break;
case TVSHOW_CONTEST_LIVE_UPDATES_2: case TVSHOW_LILYCOVE_CONTEST_LADY:
break; break;
case TVSHOW_OFF_AIR: case TVSHOW_OFF_AIR:
break; break;
case TVSHOW_FAN_CLUB_LETTER: case TVSHOW_FAN_CLUB_LETTER:
@ -4308,11 +4308,10 @@ static void sub_80F12A4(TVShow *shows)
curShow->fanClubSpecial.language = TV_GetStringLanguage(curShow->fanClubSpecial.playerName); curShow->fanClubSpecial.language = TV_GetStringLanguage(curShow->fanClubSpecial.playerName);
curShow->fanClubSpecial.idolNameLanguage = TV_GetStringLanguage(curShow->fanClubSpecial.idolName); curShow->fanClubSpecial.idolNameLanguage = TV_GetStringLanguage(curShow->fanClubSpecial.idolName);
break; break;
case TVSHOW_CONTEST_LIVE_UPDATES_2: case TVSHOW_LILYCOVE_CONTEST_LADY:
curShow->contestLiveUpdates2.language = TV_GetStringLanguage(curShow->contestLiveUpdates2.playerName); curShow->contestLady.language = TV_GetStringLanguage(curShow->contestLady.playerName);
curShow->contestLiveUpdates2.pokemonNameLanguage = TV_GetStringLanguage(curShow->contestLiveUpdates2.nickname); curShow->contestLady.pokemonNameLanguage = TV_GetStringLanguage(curShow->contestLady.nickname);
break; break;
case TVSHOW_POKEMON_TODAY_CAUGHT: case TVSHOW_POKEMON_TODAY_CAUGHT:
curShow->pokemonToday.language = TV_GetStringLanguage(curShow->pokemonToday.playerName); curShow->pokemonToday.language = TV_GetStringLanguage(curShow->pokemonToday.playerName);
curShow->pokemonToday.language2 = TV_GetStringLanguage(curShow->pokemonToday.nickname); curShow->pokemonToday.language2 = TV_GetStringLanguage(curShow->pokemonToday.nickname);
@ -4492,8 +4491,8 @@ void DoTVShow(void)
case TVSHOW_SAFARI_FAN_CLUB: case TVSHOW_SAFARI_FAN_CLUB:
DoTVShowSafariFanClub(); DoTVShowSafariFanClub();
break; break;
case TVSHOW_CONTEST_LIVE_UPDATES_2: case TVSHOW_LILYCOVE_CONTEST_LADY:
DoTVShowPokemonContestLiveUpdates2(); DoTVShowLilycoveContestLady();
break; break;
} }
} }
@ -7174,7 +7173,8 @@ static void DoTVShowSafariFanClub(void)
ShowFieldMessage(sTVSafariFanClubTextGroup[state]); ShowFieldMessage(sTVSafariFanClubTextGroup[state]);
} }
static void DoTVShowPokemonContestLiveUpdates2(void) // This show is a version of Contest Live Updates for the Lilycove Contest Lady
static void DoTVShowLilycoveContestLady(void)
{ {
TVShow *show; TVShow *show;
u8 state; u8 state;
@ -7184,30 +7184,30 @@ static void DoTVShowPokemonContestLiveUpdates2(void)
state = sTVShowState; state = sTVShowState;
switch (state) switch (state)
{ {
case 0: case CONTESTLADYLIVE_STATE_INTRO:
BufferContestName(gStringVar1, show->contestLiveUpdates2.contestCategory); BufferContestName(gStringVar1, show->contestLady.contestCategory);
if (show->contestLiveUpdates2.pokeblockState == 1) if (show->contestLady.pokeblockState == CONTEST_LADY_GOOD)
{ {
sTVShowState = 1; sTVShowState = CONTESTLADYLIVE_STATE_WON;
} }
else if (show->contestLiveUpdates2.pokeblockState == 0) else if (show->contestLady.pokeblockState == CONTEST_LADY_NORMAL)
{ {
sTVShowState = 2; sTVShowState = CONTESTLADYLIVE_STATE_LOST;
} }
else else // CONTEST_LADY_BAD
{ {
sTVShowState = 3; sTVShowState = CONTESTLADYLIVE_STATE_LOST_BADLY;
} }
break; break;
case 1: case CONTESTLADYLIVE_STATE_WON:
case 2: case CONTESTLADYLIVE_STATE_LOST:
TVShowConvertInternationalString(gStringVar3, show->contestLiveUpdates2.playerName, show->contestLiveUpdates2.language); TVShowConvertInternationalString(gStringVar3, show->contestLady.playerName, show->contestLady.language);
case 3: case CONTESTLADYLIVE_STATE_LOST_BADLY:
TVShowConvertInternationalString(gStringVar2, show->contestLiveUpdates2.nickname, show->contestLiveUpdates2.pokemonNameLanguage); TVShowConvertInternationalString(gStringVar2, show->contestLady.nickname, show->contestLady.pokemonNameLanguage);
TVShowDone(); TVShowDone();
break; break;
} }
ShowFieldMessage(sTVPokemonContestLiveUpdates2TextGroup[state]); ShowFieldMessage(sTVLilycoveContestLadyTextGroup[state]);
} }
void TVShowDone(void) void TVShowDone(void)