summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/slot_machine.s30
-rw-r--r--src/field/slot_machine.c14
2 files changed, 14 insertions, 30 deletions
diff --git a/asm/slot_machine.s b/asm/slot_machine.s
index 9b3926f85..2eb52583a 100644
--- a/asm/slot_machine.s
+++ b/asm/slot_machine.s
@@ -5,36 +5,6 @@
.text
- thumb_func_start sub_8101F2C
-sub_8101F2C: @ 8101F2C
- push {r4,lr}
- adds r4, r0, 0
- bl MenuDisplayMessageBox
- adds r0, r4, 0
- movs r1, 0x2
- movs r2, 0xF
- bl MenuPrint
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_8101F2C
-
- thumb_func_start sub_8101F44
-sub_8101F44: @ 8101F44
- push {lr}
- ldr r0, _08101F58 @ =gOtherText_DontHaveThreeCoins
- bl sub_8101F2C
- ldr r1, _08101F5C @ =gSharedMem
- movs r0, 0x7
- strb r0, [r1]
- movs r0, 0
- pop {r1}
- bx r1
- .align 2, 0
-_08101F58: .4byte gOtherText_DontHaveThreeCoins
-_08101F5C: .4byte gSharedMem
- thumb_func_end sub_8101F44
-
thumb_func_start sub_8101F60
sub_8101F60: @ 8101F60
push {lr}
diff --git a/src/field/slot_machine.c b/src/field/slot_machine.c
index 16cfea7b5..4cf93d5d6 100644
--- a/src/field/slot_machine.c
+++ b/src/field/slot_machine.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "constants/songs.h"
+#include "strings2.h"
#include "random.h"
#include "sound.h"
#include "main.h"
@@ -390,6 +391,19 @@ bool8 sub_8101E3C(struct Task *task)
return FALSE;
}
+void sub_8101F2C(const u8 *str)
+{
+ MenuDisplayMessageBox();
+ MenuPrint(str, 2, 15);
+}
+
+bool8 sub_8101F44(struct Task *task)
+{
+ sub_8101F2C(gOtherText_DontHaveThreeCoins);
+ eSlotMachine->state = 7;
+ return FALSE;
+}
+
asm(".section .text_a");
static void LoadSlotMachineWheelOverlay(void);