From 5d393adfcc1a994f9885a2720f3a0bb29afd5a6e Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 12 Jan 2018 18:16:52 -0500 Subject: start decompiling contest_ai --- src/contest.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/contest.c') diff --git a/src/contest.c b/src/contest.c index 875fe4502..6a8887fb1 100644 --- a/src/contest.c +++ b/src/contest.c @@ -36,8 +36,8 @@ extern u8 AreMovesContestCombo(u16, u16); // I don't think this is a bool extern void sub_80C8A38(u8); extern void sub_80C8AD0(u8); extern void sub_80C8C80(u8); -extern void sub_81288F4(); -extern u8 sub_8128944(void); +extern void ContestAI_ResetAI(); +extern u8 ContestAI_GetActionToUse(void); extern struct MusicPlayerInfo gMPlay_SE1; extern u16 gSpecialVar_ContestCategory; @@ -391,7 +391,7 @@ void ClearContestVars(void) } memset(&shared192D0, 0, sizeof(shared192D0)); - memset(shared192E4, 0, 0x44 * sizeof(*shared192E4)); + memset(eContestAI, 0, sizeof(struct ContestAIInfo)); memset(&shared19328, 0, sizeof(shared19328)); memset(shared19338, 0, 4 * sizeof(*shared19338)); if (!(gIsLinkContest & 1)) @@ -2629,8 +2629,8 @@ u16 GetChosenMove(u8 a) { u8 moveChoice; - sub_81288F4(a); - moveChoice = sub_8128944(); + ContestAI_ResetAI(a); + moveChoice = ContestAI_GetActionToUse(); return gContestMons[a].moves[moveChoice]; } } -- cgit v1.2.3 From d7d947c6913d1a2a7a6401b8aac2041d536ad978 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sun, 14 Jan 2018 13:59:12 -0500 Subject: formatting and clean up --- src/contest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/contest.c') diff --git a/src/contest.c b/src/contest.c index 6a8887fb1..df4bb361d 100644 --- a/src/contest.c +++ b/src/contest.c @@ -31,13 +31,12 @@ #include "tv.h" #include "scanline_effect.h" #include "util.h" +#include "contest_ai.h" extern u8 AreMovesContestCombo(u16, u16); // I don't think this is a bool extern void sub_80C8A38(u8); extern void sub_80C8AD0(u8); extern void sub_80C8C80(u8); -extern void ContestAI_ResetAI(); -extern u8 ContestAI_GetActionToUse(void); extern struct MusicPlayerInfo gMPlay_SE1; extern u16 gSpecialVar_ContestCategory; -- cgit v1.2.3