summaryrefslogtreecommitdiff
path: root/src/contest_effect.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-03-29 08:49:22 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2018-03-29 08:49:22 -0400
commit7eb178c36e5d4c5dba5f600346228969f4e33b9a (patch)
tree28c906adf3bae0763ea6e62188c8ff48e4d3ecff /src/contest_effect.c
parent59f81c5f2a25ec77baf4a30c3da9ccb7675d1562 (diff)
Start decompiling contest_effect
Diffstat (limited to 'src/contest_effect.c')
-rw-r--r--src/contest_effect.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/contest_effect.c b/src/contest_effect.c
new file mode 100644
index 000000000..f1606517b
--- /dev/null
+++ b/src/contest_effect.c
@@ -0,0 +1,33 @@
+#include "global.h"
+#include "ewram.h"
+#include "contest.h"
+
+extern bool8 const gComboStarterLookupTable[];
+
+bool8 AreMovesContestCombo(u16 lastMove, u16 nextMove) {
+ u8 nextMoveComboMoves[4];
+ u8 lastMoveComboStarterId = gContestMoves[lastMove].comboStarterId;
+ nextMoveComboMoves[0] = gContestMoves[nextMove].comboMoves[0];
+ nextMoveComboMoves[1] = gContestMoves[nextMove].comboMoves[1];
+ nextMoveComboMoves[2] = gContestMoves[nextMove].comboMoves[2];
+ nextMoveComboMoves[3] = gContestMoves[nextMove].comboMoves[3];
+
+ if (lastMoveComboStarterId == 0)
+ return 0;
+
+ if (lastMoveComboStarterId == nextMoveComboMoves[0] || lastMoveComboStarterId == nextMoveComboMoves[1] || lastMoveComboStarterId == nextMoveComboMoves[2] || lastMoveComboStarterId == nextMoveComboMoves[3])
+ return gComboStarterLookupTable[lastMoveComboStarterId];
+
+ return 0;
+}
+
+void ContestEffect_00(void)
+{
+}
+
+void ContestEffect_01(void)
+{
+ sContestantStatus[shared192D0.unk11].unk10_2 = TRUE;
+ sub_80B13EC(shared192D0.unk11, 0);
+}
+