diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-12-28 21:49:13 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-12-28 21:49:13 -0500 |
commit | 857b166086756ccc92e58981493513a7f00920ff (patch) | |
tree | 50293acb8ba4c725012c58b422f08ec44506da99 /src | |
parent | c42efaf17328594dc30e4fc6f31b8eef0f629278 (diff) |
sub_8103830
Diffstat (limited to 'src')
-rw-r--r-- | src/field/slot_machine.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/field/slot_machine.c b/src/field/slot_machine.c index a4b3175d2..fbc89133a 100644 --- a/src/field/slot_machine.c +++ b/src/field/slot_machine.c @@ -1931,6 +1931,49 @@ void sub_810380C(void) gUnknown_083ECB94[eSlotMachine->bet - 1](); } +void sub_8103830(void) +{ + s16 i = 0; + u8 r5 = sub_8102BF8(0, 2 - eSlotMachine->unk2E[0]); + u8 r1 = sub_8102BF8(1, 2 - eSlotMachine->unk2E[1]); + if (r5 == r1) + { + while (1) + { + u8 r0; + if (!(r5 == (r0 = sub_8102BF8(2, 2 - i)) || (r5 == 0 && r0 == 1) || (r5 == 1 && r0 == 0))) + { + break; + } + i++; + } + } + else if (sub_8103764(r5, r1)) + { + if (eSlotMachine->unk04 & 0x80) + { + for (i = 0; i < 5; i++) + { + if (r5 == sub_8102BF8(2, 2 - i)) + { + eSlotMachine->unk2E[2] = i; + return; + } + } + } + i = 0; + while (1) + { + if (r5 != sub_8102BF8(2, 2 - i)) + { + break; + } + i++; + } + } + eSlotMachine->unk2E[2] = i; +} + asm(".section .text_a"); static void LoadSlotMachineWheelOverlay(void); |