summaryrefslogtreecommitdiff
path: root/src/event_flag.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-03-12 15:39:07 -0600
committerGitHub <noreply@github.com>2021-03-12 15:39:07 -0600
commit7b142311a7294c4c7a943870fa5f24f0fbea604a (patch)
treea1a9513c2f997cc8274af093803dd7d936e65ad0 /src/event_flag.c
parentd72e17b5f5d795bebda2f6dc78dccb5e80c432b5 (diff)
Miscellaneous Work (Again) (#30)
* work on debug menu and document that and main menu * split, decomp, label more funcs * split exclusive pokemon data out into C * macro-ize exlusive pokemon data * decomp 2 more funcs * decomp a few more * finally match PromptNewQuestion * woot 7% aka more debug menu stuff
Diffstat (limited to 'src/event_flag.c')
-rw-r--r--src/event_flag.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/event_flag.c b/src/event_flag.c
index 10f6b8f..91c5f87 100644
--- a/src/event_flag.c
+++ b/src/event_flag.c
@@ -5,10 +5,33 @@
extern void sub_800226C(u8 r0, u8 r1, u32* r2, u8 u3);
extern void sub_800160C(struct UnkEventStruct *r0, u32 r1, u32 r2);
-extern u8 sub_8002658(s32);
+extern u8 sub_8002658(s16);
+
+struct unkEventStruct
+{
+ s16 unk0;
+ u8 unk2; // Seems like friend area number
+};
+
+struct unkEventStruct gUnknown_80B71E4[100]; // TODO figure out size of this
extern u8 gUnknown_2000A88[0x400];
+s16 sub_8002694(u8 param_1)
+{
+
+ struct unkEventStruct *puVar2 = gUnknown_80B71E4;
+
+ while (puVar2->unk0 != -1) {
+ if (puVar2->unk2 == param_1) {
+ return puVar2->unk0;
+ }
+ puVar2++;
+ }
+
+ return -1;
+}
+
bool8 sub_80026CC(s16 r0)
{
return GetFriendAreaStatus(sub_8002658(r0));