From 90eec979c948c480772549f6ec05a76b4f4cb605 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Tue, 12 Dec 2017 20:07:09 -0600 Subject: fail at decompiling sub_80ABCDC --- include/contest.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/contest.h') diff --git a/include/contest.h b/include/contest.h index 983f9bc6a..06c356c2f 100644 --- a/include/contest.h +++ b/include/contest.h @@ -1,6 +1,21 @@ #ifndef GUARD_CONTEST_H #define GUARD_CONTEST_H +struct ContestMove +{ + u8 effect; + u8 contestCategory:3; + u8 comboStarterId; + u8 comboMoves[4]; +}; + +struct ContestEffect +{ + u8 effectType; + u8 appeal; + u8 jam; +}; + struct ContestPokemon { /* 0x00 */ u16 species; -- cgit v1.2.3 From 35f79afbf39df0bbec528de97c7752f6757f5755 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sat, 16 Dec 2017 21:15:44 -0600 Subject: decompile sub_80AD8DC - sub_80AE098 --- include/contest.h | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'include/contest.h') diff --git a/include/contest.h b/include/contest.h index 06c356c2f..0203f7dd0 100644 --- a/include/contest.h +++ b/include/contest.h @@ -18,22 +18,25 @@ struct ContestEffect struct ContestPokemon { - /* 0x00 */ u16 species; - /* 0x02 */ u8 nickname[POKEMON_NAME_LENGTH]; - /* 0x0D */ u8 trainerName[8]; - /* 0x15 */ u8 unk15; - /* 0x16 */ u8 unk16; - /* 0x17 */ u8 filler17[7]; - /* 0x1E */ u16 moves[4]; // moves - /* 0x26 */ u8 cool; // cool - /* 0x27 */ u8 beauty; // beauty - /* 0x28 */ u8 cute; // cute - /* 0x29 */ u8 smart; // smart - /* 0x2A */ u8 tough; // tough - /* 0x2B */ u8 sheen; // sheen - /* 0x2C */ u8 filler2C[12]; - /* 0x38 */ u32 unk38; - /* 0x3C */ u32 unk3C; + /*0x00*/ u16 species; + /*0x02*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; + /*0x0D*/ u8 trainerName[8]; + /*0x15*/ u8 unk15; + /*0x16*/ u8 unk16; + /*0x17*/ u8 filler17; + /*0x18*/ u32 unk18; + /*0x1C*/ u8 filler1C[2]; + /*0x1E*/ u16 moves[4]; // moves + /*0x26*/ u8 cool; // cool + /*0x27*/ u8 beauty; // beauty + /*0x28*/ u8 cute; // cute + /*0x29*/ u8 smart; // smart + /*0x2A*/ u8 tough; // tough + /*0x2B*/ u8 sheen; // sheen + /*0x2C*/ u8 unk2C; + /*0x2D*/ u8 unk2D[11]; + /*0x38*/ u32 personality; // personality + /*0x3C*/ u32 otId; // otId }; // wow extern struct ContestPokemon gContestMons[]; -- cgit v1.2.3 From 688ae64548d743a0f7bbed29511903c1695cb8b6 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sun, 17 Dec 2017 16:15:30 -0600 Subject: decompile sub_80AE398 - sub_80AE9FC --- include/contest.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'include/contest.h') diff --git a/include/contest.h b/include/contest.h index 0203f7dd0..414723391 100644 --- a/include/contest.h +++ b/include/contest.h @@ -21,11 +21,18 @@ struct ContestPokemon /*0x00*/ u16 species; /*0x02*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; /*0x0D*/ u8 trainerName[8]; - /*0x15*/ u8 unk15; + /*0x15*/ u8 trainerGfxId; /*0x16*/ u8 unk16; /*0x17*/ u8 filler17; - /*0x18*/ u32 unk18; - /*0x1C*/ u8 filler1C[2]; + /*0x18*/ u32 flags; + /*0x1C*/ u8 unk1C_0:2; + u8 unk1C_2:1; + u8 unk1C_3:1; + u8 unk1C_4:1; + u8 unk1C_5:1; + u8 unk1C_6:1; + u8 unk1C_7:1; + u8 filler1D; /*0x1E*/ u16 moves[4]; // moves /*0x26*/ u8 cool; // cool /*0x27*/ u8 beauty; // beauty @@ -46,9 +53,9 @@ void sub_80AB47C(void); void sub_80AE098(u8); void sub_80AE398(u8, u8); u8 sub_80AE47C(struct Pokemon *party); -u32 sub_80AE770(u8, u8); +u16 sub_80AE770(u8, u8); void sub_80AE82C(u8); -u8 sub_80AEB1C(); +u8 sub_80AEB1C(u16); void sub_80AF668(void); void sub_80B0F28(u8); int sub_80B2A7C(u8); //Don't know return type size -- cgit v1.2.3 From 6415654584a586f48ede7e9e6f6de39b8c6ac9f0 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sun, 17 Dec 2017 18:25:16 -0600 Subject: decompile sub_80AEB1C - sub_80AEFE8 --- include/contest.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/contest.h') diff --git a/include/contest.h b/include/contest.h index 414723391..13786e006 100644 --- a/include/contest.h +++ b/include/contest.h @@ -47,6 +47,8 @@ struct ContestPokemon }; // wow extern struct ContestPokemon gContestMons[]; +extern struct ContestEffect gContestEffects[]; + void ResetLinkContestBoolean(void); void sub_80AB2AC(void); void sub_80AB47C(void); -- cgit v1.2.3 From 967cb5899f0d2f0b11569c2a19a694652628e438 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sun, 17 Dec 2017 21:30:59 -0600 Subject: fix build --- include/contest.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/contest.h') diff --git a/include/contest.h b/include/contest.h index 13786e006..fe161bac4 100644 --- a/include/contest.h +++ b/include/contest.h @@ -47,7 +47,9 @@ struct ContestPokemon }; // wow extern struct ContestPokemon gContestMons[]; -extern struct ContestEffect gContestEffects[]; +extern const struct ContestMove gContestMoves[]; +extern const struct ContestEffect gContestEffects[]; +extern const u8 *const gContestEffectStrings[]; void ResetLinkContestBoolean(void); void sub_80AB2AC(void); -- cgit v1.2.3 From cb4bb3fbd53b92efebaa27a0cdf4f763d58a9488 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Thu, 21 Dec 2017 18:32:44 -0600 Subject: decompile sub_80B1118 - sub_80B1EA8 --- include/contest.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/contest.h') diff --git a/include/contest.h b/include/contest.h index fe161bac4..9f8c263a4 100644 --- a/include/contest.h +++ b/include/contest.h @@ -1,6 +1,15 @@ #ifndef GUARD_CONTEST_H #define GUARD_CONTEST_H +enum +{ + CONTEST_CATEGORY_COOL, + CONTEST_CATEGORY_BEAUTY, + CONTEST_CATEGORY_CUTE, + CONTEST_CATEGORY_SMART, + CONTEST_CATEGORY_TOUGH, +}; + struct ContestMove { u8 effect; -- cgit v1.2.3 From 71d3e605290b2069d3571478a3736b04d658decb Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Fri, 22 Dec 2017 00:22:48 -0600 Subject: save work --- include/contest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/contest.h') diff --git a/include/contest.h b/include/contest.h index 9f8c263a4..55f39d002 100644 --- a/include/contest.h +++ b/include/contest.h @@ -71,7 +71,7 @@ void sub_80AE82C(u8); u8 sub_80AEB1C(u16); void sub_80AF668(void); void sub_80B0F28(u8); -int sub_80B2A7C(u8); //Don't know return type size +bool8 sub_80B2A7C(u8); u8 sub_80B2C4C(u8, u8); void sub_80B2D1C(void); -- cgit v1.2.3 From ce74d72c31a3ebda26adc6ae888700213f64b113 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Fri, 22 Dec 2017 14:19:09 -0600 Subject: label and clean up some things in contest.c --- include/contest.h | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'include/contest.h') diff --git a/include/contest.h b/include/contest.h index 55f39d002..e2b16ff1d 100644 --- a/include/contest.h +++ b/include/contest.h @@ -3,11 +3,23 @@ enum { - CONTEST_CATEGORY_COOL, - CONTEST_CATEGORY_BEAUTY, - CONTEST_CATEGORY_CUTE, - CONTEST_CATEGORY_SMART, - CONTEST_CATEGORY_TOUGH, + CONTEST_CATEGORY_COOL, + CONTEST_CATEGORY_BEAUTY, + CONTEST_CATEGORY_CUTE, + CONTEST_CATEGORY_SMART, + CONTEST_CATEGORY_TOUGH, +}; + +enum +{ + CONTEST_EFFECT_HIGHLY_APPEALING, + CONTEST_EFFECT_USER_MORE_STARTLED, + CONTEST_EFFECT_APPEAL_ONLY_ONCE, + CONTEST_EFFECT_REPEATABLE, + CONTEST_EFFECT_AVOID_STARTLE_ONCE, + CONTEST_EFFECT_AVOID_STARTLE, + CONTEST_EFFECT_AVOID_STARTLE_LITTLE, + //... }; struct ContestMove @@ -62,8 +74,8 @@ extern const u8 *const gContestEffectStrings[]; void ResetLinkContestBoolean(void); void sub_80AB2AC(void); -void sub_80AB47C(void); -void sub_80AE098(u8); +void CB2_StartContest(void); +void CreatePlayerContestMon(u8); void sub_80AE398(u8, u8); u8 sub_80AE47C(struct Pokemon *party); u16 sub_80AE770(u8, u8); @@ -73,6 +85,6 @@ void sub_80AF668(void); void sub_80B0F28(u8); bool8 sub_80B2A7C(u8); u8 sub_80B2C4C(u8, u8); -void sub_80B2D1C(void); +void Contest_ResetWinners(void); #endif // GUARD_CONTEST_H -- cgit v1.2.3 From 255f0d4ee4327c2eac59d55d5e50dccbb353370d Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Fri, 22 Dec 2017 17:42:05 -0600 Subject: clean up and label more of contest.c --- include/contest.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'include/contest.h') diff --git a/include/contest.h b/include/contest.h index e2b16ff1d..ae2767aef 100644 --- a/include/contest.h +++ b/include/contest.h @@ -39,13 +39,13 @@ struct ContestEffect struct ContestPokemon { - /*0x00*/ u16 species; - /*0x02*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; - /*0x0D*/ u8 trainerName[8]; - /*0x15*/ u8 trainerGfxId; - /*0x16*/ u8 unk16; - /*0x17*/ u8 filler17; - /*0x18*/ u32 flags; + /*0x00*/ u16 species; + /*0x02*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; + /*0x0D*/ u8 trainerName[8]; + /*0x15*/ u8 trainerGfxId; + /*0x16*/ u8 unk16; + /*0x17*/ u8 filler17; + /*0x18*/ u32 flags; /*0x1C*/ u8 unk1C_0:2; u8 unk1C_2:1; u8 unk1C_3:1; @@ -54,17 +54,17 @@ struct ContestPokemon u8 unk1C_6:1; u8 unk1C_7:1; u8 filler1D; - /*0x1E*/ u16 moves[4]; // moves - /*0x26*/ u8 cool; // cool - /*0x27*/ u8 beauty; // beauty - /*0x28*/ u8 cute; // cute - /*0x29*/ u8 smart; // smart - /*0x2A*/ u8 tough; // tough - /*0x2B*/ u8 sheen; // sheen - /*0x2C*/ u8 unk2C; - /*0x2D*/ u8 unk2D[11]; - /*0x38*/ u32 personality; // personality - /*0x3C*/ u32 otId; // otId + /*0x1E*/ u16 moves[4]; // moves + /*0x26*/ u8 cool; // cool + /*0x27*/ u8 beauty; // beauty + /*0x28*/ u8 cute; // cute + /*0x29*/ u8 smart; // smart + /*0x2A*/ u8 tough; // tough + /*0x2B*/ u8 sheen; // sheen + /*0x2C*/ u8 unk2C; + /*0x2D*/ u8 unk2D[11]; + /*0x38*/ u32 personality; // personality + /*0x3C*/ u32 otId; // otId }; // wow extern struct ContestPokemon gContestMons[]; @@ -75,15 +75,15 @@ extern const u8 *const gContestEffectStrings[]; void ResetLinkContestBoolean(void); void sub_80AB2AC(void); void CB2_StartContest(void); -void CreatePlayerContestMon(u8); -void sub_80AE398(u8, u8); +void Contest_CreatePlayerMon(u8); +void Contest_InitAllPokemon(u8, u8); u8 sub_80AE47C(struct Pokemon *party); u16 sub_80AE770(u8, u8); void sub_80AE82C(u8); u8 sub_80AEB1C(u16); void sub_80AF668(void); void sub_80B0F28(u8); -bool8 sub_80B2A7C(u8); +bool8 Contest_SaveWinner(u8); u8 sub_80B2C4C(u8, u8); void Contest_ResetWinners(void); -- cgit v1.2.3