summaryrefslogtreecommitdiff
path: root/include/contest.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/contest.h')
-rw-r--r--include/contest.h125
1 files changed, 57 insertions, 68 deletions
diff --git a/include/contest.h b/include/contest.h
index 11b85482e..ff1492e81 100644
--- a/include/contest.h
+++ b/include/contest.h
@@ -310,113 +310,112 @@ s8 Contest_GetMoveExcitement(u16);
struct ContestTempSave
{
/*0x18004*/ u16 cachedWindowPalettes[16][16];
- /*0x18204*/ u16 unk18204[0x200];
- /*0x18604*/ u16 unk18604[0x200];
- /*0x18A04*/ u8 unk18A04[0x800];
+ /*0x18204*/ u16 cachedPlttBufferUnfaded[0x200];
+ /*0x18604*/ u16 cachedPlttBufferFaded[0x200];
+ /*0x18A04*/ u8 savedJunk[0x800];
};
struct Contest
{
/*0x19204*/ u8 playerMoveChoice;
- /*0x19205*/ u8 turnNumber;
+ /*0x19205*/ u8 appealNumber;
/*0x19206*/ u8 unk19206[4]; // seems to only be used by an unref function
- /*0x1920A*/ u16 unk1920A_0:1; // Task active flags?
- u16 unk1920A_1:1;
- u16 unk1920A_2:1;
- u16 unk1920A_3:1;
- u16 waitForJudgeSpeechBubble :1;
- u16 isShowingApplauseMeter :1;
- u16 applauseMeterIsMoving :1;
- u16 animatingAudience :1;
- /*0x1920B*/ u16 waitForAudienceBlend :1;
- u16 sliderHeartsAnimating :1;
- u16 waitForLink :1;
+ /*0x1920A*/ bool16 unk1920A_0:1; // Task active flags?
+ bool16 unk1920A_1:1;
+ bool16 unk1920A_2:1;
+ bool16 unk1920A_3:1;
+ bool16 waitForJudgeSpeechBubble:1;
+ bool16 isShowingApplauseMeter:1;
+ bool16 applauseMeterIsMoving:1;
+ bool16 animatingAudience:1;
+ /*0x1920B*/ bool16 waitForAudienceBlend:1;
+ bool16 sliderHeartsAnimating:1;
+ bool16 waitForLink:1;
/*0x1920C*/ u8 mainTaskId;
/*0x1920D*/ u8 unk1920D[4];
- /*0x19211*/ u8 unk19211;
- /*0x19212*/ u8 unk19212;
+ /*0x19211*/ u8 judgeAttentionTaskId;
+ /*0x19212*/ u8 blendTaskId;
/*0x19213*/ u8 filler19213;
- /*0x19214*/ u8 unk19214;
- /*0x19215*/ u8 unk19215;
- /*0x19216*/ u8 unk19216; // sprite ID
+ /*0x19214*/ u8 turnNumber;
+ /*0x19215*/ u8 currentContestant;
+ /*0x19216*/ u8 judgeSpeechBubbleSpriteId;
/*0x19217*/ s8 applauseLevel;
/*0x19218*/ u8 prevTurnOrder[4];
- /*0x1921C*/ u32 unk1921C; // saved RNG value?
- u16 unk19220[5][4]; // move history?
- u8 unk19248[5][4]; // excitement history
+ /*0x1921C*/ u32 unusedRng; // saved RNG value?
+ u16 moveHistory[5][4]; // move history?
+ u8 excitementHistory[5][4]; // excitement history
u8 applauseMeterSpriteId; // sprite ID
- /*0x1925D*/ u8 unk1925D;
+ /*0x1925D*/ u8 contestSetupState;
/*0x1925E*/ u8 moveAnimTurnCount;
};
struct ContestantStatus
{
- /*0x00*/ s16 baseAppeal; // move appeal?
- /*0x02*/ s16 appeal; // final appeal after end of turn, maybe?
+ /*0x00*/ s16 baseAppeal;
+ /*0x02*/ s16 appeal;
/*0x04*/ s16 pointTotal;
/*0x06*/ u16 currMove;
/*0x08*/ u16 prevMove;
/*0x0A*/ u8 moveCategory;
- /*0x0B*/ u8 ranking :2;
- u8 unkB_2:2;
+ /*0x0B*/ u8 ranking:2;
+ u8 unkB_2:2; // unused
u8 moveRepeatCount:3;
- u8 noMoreTurns:1; // used a one-time move?
- /*0x0C*/ u8 nervous:1;
+ bool8 noMoreTurns:1; // used a one-time move?
+ /*0x0C*/ bool8 nervous:1;
u8 numTurnsSkipped:2;
/*0x0D*/ s8 condition;
/*0x0E*/ u8 jam;
/*0x0F*/ u8 jamReduction;
// Flags set by move effect
- /*0x10*/ u8 resistant:1;
- u8 immune:1;
- u8 moreEasilyStartled:1;
- u8 usedRepeatableMove:1;
+ /*0x10*/ bool8 resistant:1;
+ bool8 immune:1;
+ bool8 moreEasilyStartled:1;
+ bool8 usedRepeatableMove:1;
u8 conditionMod:2; // 1: just raised condition; 2: appeal greatly improved by condition
u8 turnOrderMod:2; // 1: defined; 2: random
/*0x11*/ u8 turnOrderModAction:2; // 1: made first; 2: made last; 3: made random
- u8 turnSkipped:1;
- u8 exploded:1;
- u8 overrideCategoryExcitementMod:1;
- u8 appealTripleCondition:1;
+ bool8 turnSkipped:1;
+ bool8 exploded:1;
+ bool8 overrideCategoryExcitementMod:1;
+ bool8 appealTripleCondition:1;
/*0x12*/ u8 jamSafetyCount;
/*0x13*/ u8 effectStringId; // status action?
/*0x14*/ u8 effectStringId2;
- /*0x15*/ u8 disappointedRepeat:1;
- u8 unk15_1:1;
- u8 repeatedPrevMove :1;
- u8 completedComboFlag :1;
- u8 hasJudgesAttention:1;
- u8 judgesAttentionWasRemoved:1;
- u8 usedComboMove :1;
+ /*0x15*/ bool8 repeatedMove:1;
+ bool8 unk15_1:1; // unused
+ bool8 repeatedPrevMove:1;
+ bool8 completedComboFlag:1;
+ bool8 hasJudgesAttention:1;
+ bool8 judgesAttentionWasRemoved:1;
+ bool8 usedComboMove:1;
/*0x16*/ u8 completedCombo;
/*0x17*/ u8 comboAppealBonus;
- /*0x18*/ u8 unk18;
+ /*0x18*/ u8 repeatJam;
/*0x19*/ u8 nextTurnOrder; // turn position
/*0x1A*/ u8 attentionLevel; // How much the Pokemon "stood out"
- /*0x1B*/ u8 unk1B;
+ /*0x1B*/ u8 contestantAnimTarget;
};
-// possibly the same as UnknownContestStruct3?
struct ContestGfxState
{
- u8 sliderHeartSpriteId; // sprite ID
- u8 unk1; // sprite ID
- u8 unk2_0:1;
- u8 boxBlinking :1;
- u8 updatingAppealHearts :1;
+ u8 sliderHeartSpriteId;
+ u8 nextTurnSpriteId;
+ bool8 sliderUpdating:1;
+ bool8 boxBlinking:1;
+ bool8 updatingAppealHearts:1;
};
struct ContestExcitement
{
- s8 moveExcitement; // current move excitement?
- u8 excitementFrozen:1;
+ s8 moveExcitement;
+ bool8 excitementFrozen:1;
u8 excitementFreezer:3;
s8 excitementAppealBonus;
};
-struct UnknownContestStruct7
+struct ContestAppealMoveResults
{
u8 turnOrder[4];
s16 jam;
@@ -429,8 +428,8 @@ struct UnknownContestStruct7
struct ContestMoveAnim
{
u16 species;
- u16 unk2;
- u8 unk4_0:1;
+ u16 targetSpecies;
+ bool8 hasTargetAnim :1;
u8 contestant;
u32 personality;
u32 otId;
@@ -445,16 +444,6 @@ struct ContestFinalStandings
s32 contestant;
};
-// TODO: Please move these to ewram.h once the defines are settled down and figured out completely.
-#define gCurContestWinner (*(struct ContestWinner *)(gSharedMem + 0x15DE0))
-#define eEnableContestDebugging (gSharedMem[0x18000])
-#define eContestTempSave (*(struct ContestTempSave *)(gSharedMem + 0x18004))
-#define sContest (*(struct Contest *)(gSharedMem + 0x19204))
-#define sContestantStatus ((struct ContestantStatus *)(gSharedMem + 0x19260))
-#define eContestExcitement (*(struct ContestExcitement *)(gSharedMem + 0x19328))
-#define eContestGfxState ((struct ContestGfxState *)(gSharedMem + 0x19338))
-#define gContestResources__moveAnim (*(struct ContestMoveAnim *)(gSharedMem + 0x19348))
-
extern u8 gContestPlayerMonIndex;
extern u8 gIsLinkContest;
extern u32 gContestRngValue;