summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-12-23 20:21:03 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2017-12-23 20:21:03 -0500
commit9041e039a728f4d2cb7c4938eb5585441965952f (patch)
tree580acabc8044a798452c4933a38c807e29f826bd /src
parentaf86226a5b15ccf1d7d1fea2dc96ff6bba0dc5fc (diff)
through sub_8102680
Diffstat (limited to 'src')
-rw-r--r--src/field/slot_machine.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/field/slot_machine.c b/src/field/slot_machine.c
index 08506a59f..cc8c28654 100644
--- a/src/field/slot_machine.c
+++ b/src/field/slot_machine.c
@@ -926,6 +926,40 @@ u8 sub_81025BC(void)
return i;
}
+extern const u8 gUnknown_083ECDAC[][17];
+extern const u8 gUnknown_083ECD46[][17];
+
+u8 sub_810264C(u8 a0)
+{
+ if (eSlotMachine->unk03 == 0)
+ {
+ return gUnknown_083ECD46[a0][eSlotMachine->unk02];
+ }
+ return gUnknown_083ECDAC[a0][eSlotMachine->unk02];
+}
+
+void sub_8102680(void)
+{
+ u8 rval;
+ s16 i;
+
+ eSlotMachine->unk05 = 0;
+ rval = Random();
+ if (rval < sub_810264C(0))
+ {
+ return;
+ }
+ for (i = 5; i > 0; i--)
+ {
+ rval = Random();
+ if (rval < sub_810264C(i))
+ {
+ break;
+ }
+ }
+ eSlotMachine->unk05 = i;
+}
+
asm(".section .text_a");
static void LoadSlotMachineWheelOverlay(void);
@@ -957,7 +991,6 @@ void sub_8104CAC(u8 arg0) {
#endif
}
}
-
asm(".section .text_b");
static void sub_8106448(void) {