Document contest live updates

This commit is contained in:
GriffinR
2020-08-16 05:07:44 -04:00
parent 9f4525666d
commit e98e4652fd
8 changed files with 732 additions and 658 deletions

View File

@@ -133,5 +133,59 @@
#define NUM_SECRET_BASE_FLAGS 32 // by definition, bitfield of 2 u16s
// TV Show states for Pokemon Contest Live Updates
#define CONTESTLIVE_STATE_INTRO 0
#define CONTESTLIVE_STATE_WON_BOTH_ROUNDS 1
#define CONTESTLIVE_STATE_BETTER_ROUND2 2
#define CONTESTLIVE_STATE_EQUAL_ROUNDS 3
#define CONTESTLIVE_STATE_BETTER_ROUND1 4
#define CONTESTLIVE_STATE_GOT_NERVOUS 5
#define CONTESTLIVE_STATE_STARTLED_OTHER 6
#define CONTESTLIVE_STATE_USED_COMBO 7
#define CONTESTLIVE_STATE_EXCITING_APPEAL 8
#define CONTESTLIVE_STATE_COOL 9
#define CONTESTLIVE_STATE_BEAUTIFUL 10
#define CONTESTLIVE_STATE_CUTE 11
#define CONTESTLIVE_STATE_SMART 12
#define CONTESTLIVE_STATE_TOUGH 13
#define CONTESTLIVE_STATE_VERY_EXCITING_APPEAL 14
#define CONTESTLIVE_STATE_VERY_COOL 15
#define CONTESTLIVE_STATE_VERY_BEAUTIFUL 16
#define CONTESTLIVE_STATE_VERY_CUTE 17
#define CONTESTLIVE_STATE_VERY_SMART 18
#define CONTESTLIVE_STATE_VERY_TOUGH 19
#define CONTESTLIVE_STATE_TOOK_BREAK 20
#define CONTESTLIVE_STATE_GOT_STARTLED 21
#define CONTESTLIVE_STATE_USED_MOVE 22
#define CONTESTLIVE_STATE_TALK_ABOUT_LOSER 23
#define CONTESTLIVE_STATE_NO_APPEALS 24
#define CONTESTLIVE_STATE_LAST_BOTH 25
#define CONTESTLIVE_STATE_NOT_EXCITING_ENOUGH 26
#define CONTESTLIVE_STATE_LOST_AFTER_ROUND1_WIN 27
#define CONTESTLIVE_STATE_NO_EXCITING_APPEALS 28
#define CONTESTLIVE_STATE_LOST_SMALL_MARGIN 29
#define CONTESTLIVE_STATE_REPEATED_APPEALS 30
#define CONTESTLIVE_STATE_LOST 31
#define CONTESTLIVE_STATE_OUTRO 32
// Flags used to comment on winner
#define CONTESTLIVE_FLAG_EXCITING_APPEAL (1 << 0)
#define CONTESTLIVE_FLAG_GOT_NERVOUS (1 << 1)
#define CONTESTLIVE_FLAG_MAXED_EXCITEMENT (1 << 2)
#define CONTESTLIVE_FLAG_USED_COMBO (1 << 3)
#define CONTESTLIVE_FLAG_STARTLED_OTHER (1 << 4)
#define CONTESTLIVE_FLAG_SKIPPED_TURN (1 << 5)
#define CONTESTLIVE_FLAG_GOT_STARTLED (1 << 6)
#define CONTESTLIVE_FLAG_MADE_APPEAL (1 << 7)
// Flags used to comment on loser
#define CONTESTLIVE_FLAG_LOST (1 << 0)
#define CONTESTLIVE_FLAG_REPEATED_MOVE (1 << 1)
#define CONTESTLIVE_FLAG_LOST_SMALL_MARGIN (1 << 2)
#define CONTESTLIVE_FLAG_NO_EXCITEMENT (1 << 3)
#define CONTESTLIVE_FLAG_BLEW_LEAD (1 << 4)
#define CONTESTLIVE_FLAG_MISSED_EXCITEMENT (1 << 5)
#define CONTESTLIVE_FLAG_LAST_BOTH_ROUNDS (1 << 6)
#define CONTESTLIVE_FLAG_NO_APPEALS (1 << 7)
#endif //GUARD_CONSTANTS_TV_H

View File

@@ -4,17 +4,6 @@
#include "palette.h"
#include "constants/contest.h"
enum
{
CONTEST_DEBUG_MODE_OFF,
// Prints the totalPoints value for each contestant.
CONTEST_DEBUG_MODE_PRINT_POINT_TOTAL,
// Prints the ContestTV::unk_C value as a bitstring for each contestant.
CONTEST_DEBUG_MODE_PRINT_UNK_C,
// Prints the ContestTV::unk_D value as a bitstring for each contestant.
CONTEST_DEBUG_MODE_PRINT_UNK_D
};
enum
{
CONTEST_STRING_MORE_CONSCIOUS,
@@ -153,7 +142,7 @@ struct Contest
u8 mainTaskId;
u8 unk1920D[4];
u8 judgeAttentionTaskId;
u8 unk19212;
u8 blendTaskId;
u8 filler19213;
u8 turnNumber;
u8 currentContestant;
@@ -211,7 +200,7 @@ struct ContestantStatus
bool8 usedComboMove:1;
bool8 completedCombo;
u8 comboAppealBonus;
u8 unk18;
u8 repeatJam;
u8 nextTurnOrder; // turn position
u8 attentionLevel; // How much the Pokemon "stood out"
u8 contestantAnimTarget;
@@ -271,12 +260,12 @@ struct ContestFinalStandings
struct ContestTV
{
u16 unk0[5];
s16 unkA;
u8 unkC;
u8 unkD;
u8 unkE_1:1;
u8 unkE_2:1;
u16 appeals[CONTEST_NUM_APPEALS];
s16 move;
u8 winnerFlags;
u8 loserFlags;
u8 madeAppeal:1;
u8 madeExcitingAppeal:1;
};
struct ContestUnused

View File

@@ -294,39 +294,39 @@ extern const u8 gTVSafariFanClubText07[];
extern const u8 gTVSafariFanClubText08[];
extern const u8 gTVSafariFanClubText09[];
extern const u8 gTVSafariFanClubText10[];
extern const u8 gTVContestLiveUpdatesText00[];
extern const u8 gTVContestLiveUpdatesText01[];
extern const u8 gTVContestLiveUpdatesText02[];
extern const u8 gTVContestLiveUpdatesText03[];
extern const u8 gTVContestLiveUpdatesText04[];
extern const u8 gTVContestLiveUpdatesText05[];
extern const u8 gTVContestLiveUpdatesText06[];
extern const u8 gTVContestLiveUpdatesText07[];
extern const u8 gTVContestLiveUpdatesText08[];
extern const u8 gTVContestLiveUpdatesText09[];
extern const u8 gTVContestLiveUpdatesText10[];
extern const u8 gTVContestLiveUpdatesText11[];
extern const u8 gTVContestLiveUpdatesText12[];
extern const u8 gTVContestLiveUpdatesText13[];
extern const u8 gTVContestLiveUpdatesText14[];
extern const u8 gTVContestLiveUpdatesText15[];
extern const u8 gTVContestLiveUpdatesText16[];
extern const u8 gTVContestLiveUpdatesText17[];
extern const u8 gTVContestLiveUpdatesText18[];
extern const u8 gTVContestLiveUpdatesText19[];
extern const u8 gTVContestLiveUpdatesText20[];
extern const u8 gTVContestLiveUpdatesText21[];
extern const u8 gTVContestLiveUpdatesText22[];
extern const u8 gTVContestLiveUpdatesText23[];
extern const u8 gTVContestLiveUpdatesText24[];
extern const u8 gTVContestLiveUpdatesText25[];
extern const u8 gTVContestLiveUpdatesText26[];
extern const u8 gTVContestLiveUpdatesText27[];
extern const u8 gTVContestLiveUpdatesText28[];
extern const u8 gTVContestLiveUpdatesText29[];
extern const u8 gTVContestLiveUpdatesText30[];
extern const u8 gTVContestLiveUpdatesText31[];
extern const u8 gTVContestLiveUpdatesText32[];
extern const u8 ContestLiveUpdates_Text_Intro[];
extern const u8 ContestLiveUpdates_Text_WonBothRounds[];
extern const u8 ContestLiveUpdates_Text_BetterRound2[];
extern const u8 ContestLiveUpdates_Text_EqualRounds[];
extern const u8 ContestLiveUpdates_Text_BetterRound1[];
extern const u8 ContestLiveUpdates_Text_GotNervous[];
extern const u8 ContestLiveUpdates_Text_StartledFoes[];
extern const u8 ContestLiveUpdates_Text_UsedCombo[];
extern const u8 ContestLiveUpdates_Text_ExcitingAppeal[];
extern const u8 ContestLiveUpdates_Text_WasCool[];
extern const u8 ContestLiveUpdates_Text_WasBeautiful[];
extern const u8 ContestLiveUpdates_Text_WasCute[];
extern const u8 ContestLiveUpdates_Text_WasSmart[];
extern const u8 ContestLiveUpdates_Text_WasTough[];
extern const u8 ContestLiveUpdates_Text_VeryExcitingAppeal[];
extern const u8 ContestLiveUpdates_Text_VeryCool[];
extern const u8 ContestLiveUpdates_Text_VeryBeautiful[];
extern const u8 ContestLiveUpdates_Text_VeryCute[];
extern const u8 ContestLiveUpdates_Text_VerySmart[];
extern const u8 ContestLiveUpdates_Text_VeryTough[];
extern const u8 ContestLiveUpdates_Text_TookBreak[];
extern const u8 ContestLiveUpdates_Text_GotStartled[];
extern const u8 ContestLiveUpdates_Text_MoveWonderful[];
extern const u8 ContestLiveUpdates_Text_TalkAboutAnotherMon[];
extern const u8 ContestLiveUpdates_Text_FailedToAppeal[];
extern const u8 ContestLiveUpdates_Text_LastInBothRounds[];
extern const u8 ContestLiveUpdates_Text_NotExcitingEnough[];
extern const u8 ContestLiveUpdates_Text_LostAfterWinningRound1[];
extern const u8 ContestLiveUpdates_Text_NeverExciting[];
extern const u8 ContestLiveUpdates_Text_LostBySmallMargin[];
extern const u8 ContestLiveUpdates_Text_RepeatedAppeals[];
extern const u8 ContestLiveUpdates_Text_ValiantEffortButLost[];
extern const u8 ContestLiveUpdates_Text_Outro[];
extern const u8 gTVPokemonBattleUpdateText00[];
extern const u8 gTVPokemonBattleUpdateText01[];
extern const u8 gTVPokemonBattleUpdateText02[];

View File

@@ -124,18 +124,18 @@ typedef union // size = 0x24
struct {
/*0x00*/ u8 kind;
/*0x01*/ bool8 active;
/*0x02*/ u16 winningSpecies;
/*0x04*/ u8 winningTrainerName[8];
/*0x0C*/ u8 appealFlags2;
/*0x0D*/ u8 round1Rank;
/*0x0e*/ u8 round2Rank;
/*0x0f*/ u8 appealFlags1;
/*0x02*/ u16 losingSpecies;
/*0x04*/ u8 losingTrainerName[8];
/*0x0C*/ u8 loserAppealFlag;
/*0x0D*/ u8 round1Placing;
/*0x0e*/ u8 round2Placing;
/*0x0f*/ u8 winnerAppealFlag;
/*0x10*/ u16 move;
/*0x12*/ u16 species;
/*0x14*/ u8 playerName[8];
/*0x12*/ u16 winningSpecies;
/*0x14*/ u8 winningTrainerName[8];
/*0x1C*/ u8 category;
/*0x1D*/ u8 language;
/*0x1E*/ u8 winningTrainerLanguage;
/*0x1D*/ u8 winningTrainerLanguage;
/*0x1E*/ u8 losingTrainerLanguage;
} contestLiveUpdates;
// TVSHOW_3_CHEERS_FOR_POKEBLOCKS

View File

@@ -59,11 +59,11 @@ void SaveRecordedItemPurchasesForTVShow(void);
bool8 ShouldAirFrontierTVShow(void);
void sub_80EE8C8(u16 winStreak, u8 facilityAndMode);
void BravoTrainerPokemonProfile_BeforeInterview2(u8 contestStandingPlace);
void ContestLiveUpdates_BeforeInterview_1(u8 a0);
void ContestLiveUpdates_BeforeInterview_2(u8 a0);
void ContestLiveUpdates_BeforeInterview_3(u8 a0);
void ContestLiveUpdates_BeforeInterview_4(u16 a0);
void ContestLiveUpdates_BeforeInterview_5(u8 a0, u8 a1);
void ContestLiveUpdates_Init(u8 round1Placing);
void ContestLiveUpdates_SetRound2Placing(u8 round2Placing);
void ContestLiveUpdates_SetWinnerAppealFlag(u8 flag);
void ContestLiveUpdates_SetWinnerMoveUsed(u16 move);
void ContestLiveUpdates_SetLoserData(u8 flag, u8 loser);
void ResetGabbyAndTy(void);
#endif //GUARD_TV_H