summaryrefslogtreecommitdiff
path: root/include/contest.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/contest.h')
-rw-r--r--include/contest.h167
1 files changed, 167 insertions, 0 deletions
diff --git a/include/contest.h b/include/contest.h
index 10392c00e..6e71358a2 100644
--- a/include/contest.h
+++ b/include/contest.h
@@ -87,4 +87,171 @@ bool8 Contest_SaveWinner(u8);
u8 sub_80B2C4C(u8, u8);
void Contest_ResetWinners(void);
+// Contest Shared EWRAM
+
+struct Shared18000
+{
+ /*0x18000*/ u8 unk18000;
+ /*0x18001*/ u8 filler18001[3];
+ /*0x18004*/ u16 unk18004[16][16];
+ /*0x18204*/ u16 unk18204[0x200];
+ /*0x18604*/ u16 unk18604[0x200];
+ /*0x18A04*/ u8 unk18A04[0x800];
+};
+
+struct Contest
+{
+ /*0x19204*/ u8 playerMoveChoice;
+ /*0x19205*/ u8 turnNumber;
+ /*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 unk1920A_4:1;
+ u16 unk1920A_5:1;
+ u16 unk1920A_6:1;
+ u16 unk1920A_7:1;
+ /*0x1920B*/ u16 unk1920B_0:1;
+ u16 unk1920B_1:1;
+ u16 unk1920B_2:1;
+ /*0x1920C*/ u8 mainTaskId;
+ /*0x1920D*/ u8 unk1920D[4];
+ /*0x19211*/ u8 unk19211;
+ /*0x19212*/ u8 unk19212;
+ /*0x19213*/ u8 filler19213;
+ /*0x19214*/ u8 unk19214;
+ /*0x19215*/ u8 unk19215;
+ /*0x19216*/ u8 unk19216; // sprite ID
+ /*0x19217*/ s8 applauseLevel;
+ /*0x19218*/ u8 unk19218[4];
+ /*0x1921C*/ u32 unk1921C; // saved RNG value?
+ u16 unk19220[5][4]; // move history?
+ u8 unk19248[5][4]; // excitement history
+ u8 applauseMeterSpriteId; // sprite ID
+ /*0x1925D*/ u8 unk1925D;
+ /*0x1925E*/ u8 unk1925E;
+};
+
+struct ContestantStatus
+{
+ s16 appeal1; // move appeal?
+ s16 appeal2; // final appeal after end of turn, maybe?
+ s16 unk4;
+ u16 currMove;
+ u16 prevMove;
+ u8 moveCategory;
+ u8 unkB_0:2;
+ u8 unkB_2:2;
+ u8 moveRepeatCount:3;
+ u8 unkB_7:1; // used a one-time move?
+ u8 unkC_0:1;
+ u8 unkC_1:2;
+ s8 unkD;
+ u8 unkE;
+ u8 unkF;
+ u8 unk10_0:1;
+ u8 unk10_1:1;
+ u8 unk10_2:1;
+ u8 unk10_3:1;
+ u8 unk10_4:2;
+ u8 unk10_6:2;
+ u8 unk11_0:2;
+ u8 unk11_2:1;
+ u8 unk11_3:1;
+ u8 unk11_4:1;
+ u8 unk11_5:1;
+ u8 unk12;
+ u8 unk13; // status action?
+ u8 unk14;
+ u8 disappointedRepeat:1;
+ u8 unk15_1:1;
+ u8 unk15_2:1;
+ u8 unk15_3:1;
+ u8 unk15_4:1;
+ u8 unk15_5:1;
+ u8 unk15_6:1;
+ u8 unk16;
+ u8 unk17;
+ u8 unk18;
+ u8 unk19; // turn position
+ u8 attentionLevel; // How much the Pokemon "stood out"
+ u8 unk1B;
+};
+
+struct UnknownContestStruct3
+{
+ u8 unk0;
+ u8 unk1;
+ //u8 unk2_0:1;
+ //u8 unk2_1:1;
+ u8 unk2; // maybe a bitfield
+ u8 filler3;
+};
+
+// possibly the same as UnknownContestStruct3?
+struct UnknownContestStruct4
+{
+ u8 unk0; // sprite ID
+ u8 unk1; // sprite ID
+ u8 unk2_0:1;
+ u8 unk2_1:1;
+ u8 unk2_2:1;
+ u8 filler3;
+};
+
+struct UnknownContestStruct5
+{
+ s8 bits_0; // current move excitement?
+ u8 bits_8:1;
+ u8 bits_9:3;
+ u8 bits_C:4;
+ s8 unk2;
+ u8 filler3;
+};
+
+struct UnknownContestStruct7
+{
+ u8 unk0[4];
+ u16 unk4;
+ u16 unk6;
+ u8 filler8[0xD-8];
+ u8 unkD[4];
+ u8 unk11;
+ u8 filler12[2];
+};
+
+struct UnknownContestStruct8
+{
+ u16 unk0;
+ u16 unk2;
+ u8 unk4_0:1;
+ u8 unk5;
+ u8 filler6[2];
+ u32 unk8;
+ u32 unkC;
+ u32 unk10;
+};
+
+struct UnknownContestStruct6
+{
+ s32 unk0;
+ s32 unk4;
+ s32 unk8;
+ s32 unkC;
+};
+
+#define shared15800 (gSharedMem + 0x15800)
+#define shared15DE0 (*(struct ContestWinner *)(gSharedMem + 0x15DE0))
+#define shared16800 (gSharedMem + 0x16800)
+#define shared18000 (*(struct Shared18000 *)(gSharedMem + 0x18000))
+#define shared18004 ((u16 *)(gSharedMem + 0x18004))
+#define sContest (*(struct Contest *)(gSharedMem + 0x19204))
+#define sContestantStatus ((struct ContestantStatus *)(gSharedMem + 0x19260))
+#define shared192D0 (*(struct UnknownContestStruct7 *)(gSharedMem + 0x192D0))
+#define shared192E4 (gSharedMem + 0x192E4)
+#define shared19328 (*(struct UnknownContestStruct5 *)(gSharedMem + 0x19328))
+#define shared19338 ((struct UnknownContestStruct4 *)(gSharedMem + 0x19338))
+#define shared19348 (*(struct UnknownContestStruct8 *)(gSharedMem + 0x19348))
+
#endif // GUARD_CONTEST_H