diff options
author | Marcus Huderle <huderlem@gmail.com> | 2019-04-14 10:13:51 -0500 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-04-14 13:44:44 -0500 |
commit | e3bdb08efa3ea0f2d55e77c5ab57528f6d604b6a (patch) | |
tree | 21c86c7c1ecfd7b204bb573b4bd2c3293bf7bbef /src | |
parent | 19fdfaa5f27317d79a57162613976bb2db69de28 (diff) |
Start decompiling pokenav_unk_3.c
Diffstat (limited to 'src')
-rw-r--r-- | src/pokenav.c | 5 | ||||
-rwxr-xr-x | src/pokenav_unk_3.c | 40 |
2 files changed, 41 insertions, 4 deletions
diff --git a/src/pokenav.c b/src/pokenav.c index dcafa4f20..734d37c46 100644 --- a/src/pokenav.c +++ b/src/pokenav.c @@ -28,7 +28,7 @@ struct PokenavResources struct UnknownPokenavCallbackStruct { - u32 (*unk0)(void); + bool32 (*unk0)(void); u32 (*unk4)(void); u32 (*unk8)(void); u32 (*unkC)(void); @@ -65,12 +65,9 @@ extern u32 sub_81CF3F8(void); extern u32 sub_81CD024(void); extern u32 sub_81CEF98(void); extern u32 sub_81CF368(void); -extern u32 sub_81CAAE8(void); -extern u32 sub_81CAB24(void); extern u32 sub_81CB260(void); extern u32 sub_81CB29C(void); extern u32 sub_81CB2CC(void); -extern void sub_81CAB38(void); extern u32 sub_81CB2E0(void); extern u32 sub_81CF9BC(void); extern u32 sub_81CFA34(void); diff --git a/src/pokenav_unk_3.c b/src/pokenav_unk_3.c new file mode 100755 index 000000000..be1926e0d --- /dev/null +++ b/src/pokenav_unk_3.c @@ -0,0 +1,40 @@ +#include "global.h" +#include "pokenav.h" + +struct Pokenav3Struct +{ + u8 filler0[0x8]; + u16 unk8; + u8 fillerA[0x6]; + u32 unk10; + u32 unk14; + u32 (*unk18)(struct Pokenav3Struct*); + u8 filler1C[0x18C]; +}; + +u32 sub_81CAB44(struct Pokenav3Struct *); +u32 sub_81CAD20(int); + +bool32 sub_81CAAE8(void) +{ + struct Pokenav3Struct *state = AllocSubstruct(5, sizeof(struct Pokenav3Struct)); + if (!state) + return FALSE; + + state->unk18 = sub_81CAB44; + state->unk8 = 0; + state->unk10 = 0; + state->unk14 = CreateLoopedTask(sub_81CAD20, 1); + return TRUE; +} + +u32 sub_81CAB24(void) +{ + struct Pokenav3Struct *state = GetSubstructPtr(5); + return state->unk18(state); +} + +void sub_81CAB38(void) +{ + FreePokenavSubstruct(5); +} |