summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/mail.s24
-rw-r--r--include/menu_helpers.h11
-rw-r--r--src/mail.c14
3 files changed, 25 insertions, 24 deletions
diff --git a/asm/mail.s b/asm/mail.s
index eed252661..0180b9418 100644
--- a/asm/mail.s
+++ b/asm/mail.s
@@ -5,30 +5,6 @@
.text
- thumb_func_start sub_81219F0
-sub_81219F0: @ 81219F0
- push {lr}
-_081219F2:
- bl sub_81215EC
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _08121A0C
- ldr r0, =sub_8121C64
- bl SetMainCallback2
- b _08121A18
- .pool
-_08121A0C:
- bl sub_81221AC
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _081219F2
-_08121A18:
- pop {r0}
- bx r0
- thumb_func_end sub_81219F0
-
thumb_func_start sub_8121A1C
sub_8121A1C: @ 8121A1C
push {r4-r7,lr}
diff --git a/include/menu_helpers.h b/include/menu_helpers.h
new file mode 100644
index 000000000..45ee95de5
--- /dev/null
+++ b/include/menu_helpers.h
@@ -0,0 +1,11 @@
+#ifndef GUARD_MENU_HELPERS_H
+#define GUARD_MENU_HELPERS_H
+
+// Exported type declarations
+
+// Exported RAM declarations
+
+// Exported ROM declarations
+bool8 sub_81221AC(void);
+
+#endif //GUARD_MENU_HELPERS_H
diff --git a/src/mail.c b/src/mail.c
index 2e859f6ea..0f0530c04 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -7,6 +7,7 @@
#include "unknown_task.h"
#include "palette.h"
#include "menu.h"
+#include "menu_helpers.h"
#include "text.h"
#include "text_window.h"
#include "gpu_regs.h"
@@ -79,6 +80,7 @@ void sub_81219F0(void);
void sub_8121A1C(void);
void sub_8121B1C(void);
void sub_8121C50(void);
+void sub_8121C64(void);
void sub_8121C98(void);
// .rodata
@@ -275,3 +277,15 @@ bool8 sub_81215EC(void)
gMain.state ++;
return FALSE;
}
+
+void sub_81219F0(void)
+{
+ do
+ {
+ if (sub_81215EC() == TRUE)
+ {
+ SetMainCallback2(sub_8121C64);
+ break;
+ }
+ } while (sub_81221AC() != TRUE);
+}