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 "See you again on our next broadcast!$"
gTVPokemonContestLiveUpdates2Text00:: @ 0828C137
ContestLadyShow_Text_Intro:: @ 0828C137
.string "“POKéMON CONTEST LIVE UPDATES!”\p"
.string "MC: Sorry to interrupt the regular\n"
.string "programming, and thanks for joining us!\p"
@ -2940,7 +2940,7 @@ gTVPokemonContestLiveUpdates2Text00:: @ 0828C137
.string "Spectators: ?!!!!\n"
.string "?!!!!$"
gTVPokemonContestLiveUpdates2Text01:: @ 0828C28C
ContestLadyShow_Text_Won:: @ 0828C28C
.string "MC: Excuse me!\n"
.string "Thanks for joining us on live TV!\p"
.string "May I congratulate you on your win?\p"
@ -2959,7 +2959,7 @@ gTVPokemonContestLiveUpdates2Text01:: @ 0828C28C
.string "We did it!\l"
.string "Thank you!$"
gTVPokemonContestLiveUpdates2Text02:: @ 0828C45B
ContestLadyShow_Text_Lost:: @ 0828C45B
.string "MC: Excuse me!\n"
.string "Thanks for joining us on live TV!\p"
.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 "Thanks for tuning in!$"
gTVPokemonContestLiveUpdates2Text03:: @ 0828C662
ContestLadyShow_Text_LostBadly:: @ 0828C662
.string "MC: Excuse me!\n"
.string "Thanks for joining us on live TV!\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_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_BATTLE_UPDATE 10
#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_SMART_SHOPPER 22
@ -215,4 +215,10 @@
#define TRENDWATCHER_STATE_BIGGER_FEMALE 5
#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

View File

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

View File

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

View File

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

View File

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

View File

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