summaryrefslogtreecommitdiff
path: root/src/field
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-12-27 22:14:54 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2017-12-27 22:14:54 -0500
commit57af95611d0a3cb0fda3ccebae725221ca5eac3e (patch)
tree9ef32dab478fd98f707c65679db4a3ccdb0f82d1 /src/field
parent4bd55a4f027410a7caf50933d9b7e1da14ce73da (diff)
through sub_810341C
Diffstat (limited to 'src/field')
-rw-r--r--src/field/slot_machine.c67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/field/slot_machine.c b/src/field/slot_machine.c
index 469753726..df6a6bd0b 100644
--- a/src/field/slot_machine.c
+++ b/src/field/slot_machine.c
@@ -1529,6 +1529,73 @@ bool8 sub_81032E8(void)
return FALSE;
}
+bool8 sub_810333C(void)
+{
+ s16 i;
+ if (sub_81032E8())
+ {
+ if (eSlotMachine->unk34[0] != 2 && eSlotMachine->unk2E[1] > 1 && eSlotMachine->unk2E[1] != 4)
+ {
+ for (i = 0; i < 5; i++)
+ {
+ if (sub_8102BF8(1, 2 - i) == eSlotMachine->unk07)
+ {
+ eSlotMachine->unk34[1] = 2;
+ eSlotMachine->unk2E[1] = i;
+ break;
+ }
+ }
+ }
+ return TRUE;
+ }
+ if (eSlotMachine->unk34[0] != 2)
+ {
+ for (i = 0; i < 5; i++)
+ {
+ if (sub_8102BF8(1, 2 - i) == eSlotMachine->unk07)
+ {
+ eSlotMachine->unk34[1] = 2;
+ eSlotMachine->unk2E[1] = i;
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+extern bool8 (*const gUnknown_083ECB7C[])(u8 a0);
+
+bool8 sub_81033DC(void)
+{
+ u8 r3 = eSlotMachine->unk07;
+ if (eSlotMachine->unk04 & 0x40)
+ {
+ r3 = 0;
+ if (eSlotMachine->unk07 == 0)
+ {
+ r3 = 1;
+ }
+ }
+ return gUnknown_083ECB7C[eSlotMachine->bet - 1](r3);
+}
+
+bool8 sub_810341C(u8 a0)
+{
+ s16 i;
+ s16 unk34_1 = eSlotMachine->unk34[1];
+
+ for (i = 0; i < 5; i++)
+ {
+ if (sub_8102BF8(2, unk34_1 - i) == a0)
+ {
+ eSlotMachine->unk34[2] = unk34_1;
+ eSlotMachine->unk2E[2] = i;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
asm(".section .text_a");
static void LoadSlotMachineWheelOverlay(void);