summaryrefslogtreecommitdiff
path: root/src/pokenav_unk_1.c
diff options
context:
space:
mode:
authorPhlosioneer <mattmdrr2@gmail.com>2019-04-07 22:42:31 -0400
committerhuderlem <huderlem@gmail.com>2019-04-13 11:34:53 -0500
commitee2edb068af30cf2d560de510fc03cfff77acc92 (patch)
treeb92fd98192ceb13b57da10e4e066c2efb31e71ea /src/pokenav_unk_1.c
parent518f9c0638af5890af6bd573b2538bad462f39e5 (diff)
Start decomp of pokenav_unk_1
Looks like it's the Ribbons menu, based on the first function.
Diffstat (limited to 'src/pokenav_unk_1.c')
-rw-r--r--src/pokenav_unk_1.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/pokenav_unk_1.c b/src/pokenav_unk_1.c
new file mode 100644
index 000000000..dd2411e01
--- /dev/null
+++ b/src/pokenav_unk_1.c
@@ -0,0 +1,43 @@
+#include "global.h"
+#include "pokenav.h"
+#include "event_data.h"
+
+struct Pokenav1Struct
+{
+ u16 unk0;
+ u16 unk2;
+ u16 unk4;
+ u16 unk6;
+ u8 unk8[8];
+};
+
+extern void sub_81C939C(struct Pokenav1Struct *state);
+
+u8 sub_81C9268(void)
+{
+ u32 ret = 0;
+ if (FlagGet(FLAG_ADDED_MATCH_CALL_TO_POKENAV))
+ {
+ ret = 1;
+ if (FlagGet(FLAG_SYS_RIBBON_GET))
+ ret = 2;
+ }
+
+ return ret;
+}
+
+u32 sub_81C9298(void)
+{
+ struct Pokenav1Struct *state = AllocSubstruct(1, sizeof(struct Pokenav1Struct));
+
+ if (state == NULL)
+ return 0;
+
+ state->unk0 = sub_81C9268();
+ state->unk2 = 0;
+ state->unk4 = 0;
+ state->unk6 = 0;
+ sub_81C939C(state);
+
+ return 1;
+} \ No newline at end of file