diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2020-09-20 01:54:59 -0500 |
---|---|---|
committer | Seth Barberee <seth.barberee@gmail.com> | 2020-09-20 01:54:59 -0500 |
commit | 722560add4e0caaab9f65a3c49d08ad83f2ef2b2 (patch) | |
tree | c8092f1b63eb5491b81b7ed8a70af244ed385038 | |
parent | d2279294209edd9ec92e601ccb86388ff9283dbb (diff) |
more decomping of functions
-rw-r--r-- | asm/code_8272724.s | 12 | ||||
-rw-r--r-- | asm/event_flag.s | 18 | ||||
-rwxr-xr-x | ld_script.txt | 1 | ||||
-rw-r--r-- | src/code_8272724.c | 17 | ||||
-rw-r--r-- | src/event_flag.c | 12 |
5 files changed, 30 insertions, 30 deletions
diff --git a/asm/code_8272724.s b/asm/code_8272724.s index 23b79d3..b2cad11 100644 --- a/asm/code_8272724.s +++ b/asm/code_8272724.s @@ -9,18 +9,6 @@ .text - thumb_func_start sub_8272760 -sub_8272760: - push {lr} - adds r1, r0, 0 - ldr r0, _08272770 - bl sub_8272774 - pop {r0} - bx r0 - .align 2, 0 -_08272770: .4byte gUnknown_2027370 - thumb_func_end sub_8272760 - thumb_func_start sub_8272774 sub_8272774: push {r4-r7,lr} diff --git a/asm/event_flag.s b/asm/event_flag.s index f29c30c..572f258 100644 --- a/asm/event_flag.s +++ b/asm/event_flag.s @@ -2565,22 +2565,4 @@ _0800274E: bx r1 thumb_func_end sub_8002718 - thumb_func_start sub_8002758 -sub_8002758: - push {lr} - adds r2, r0, 0 - movs r0, 0 - movs r1, 0x1 - movs r3, 0x9 - bl sub_800226C - pop {r0} - bx r0 - thumb_func_end sub_8002758 - - thumb_func_start sub_800276C -sub_800276C: - movs r0, 0 - bx lr - thumb_func_end sub_800276C - .align 2, 0 @ Don't pad with nop. diff --git a/ld_script.txt b/ld_script.txt index 6f567a9..1ffd769 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -174,6 +174,7 @@ SECTIONS { { unk_code = .; asm/code_8272724.o(.rodata); + src/code_8272724.o(.text); asm/code_8272724.o(.text); unk_code_end = .; } diff --git a/src/code_8272724.c b/src/code_8272724.c new file mode 100644 index 0000000..945be97 --- /dev/null +++ b/src/code_8272724.c @@ -0,0 +1,17 @@ +#include "global.h" + +extern void sub_8272774(u32 *r0, u32 r1); +extern void sub_8272884(u32 *r0, u32 r1); + +extern u32 gUnknown_2027370; // TODO defined in text.c and join later + +void sub_8272760(u32 r0) +{ + sub_8272774(&gUnknown_2027370, r0); +} + +// TODO once sub_8272774 is decomped +//void sub_8272870(u32 r0) +//{ +// sub_8272884(&gUnknown_2027370, r0); +//} diff --git a/src/event_flag.c b/src/event_flag.c index 85c320f..0515308 100644 --- a/src/event_flag.c +++ b/src/event_flag.c @@ -1,5 +1,17 @@ #include "global.h" +extern void sub_800226C(u8 r0, u8 r1, u32* r2, u8 u3); + +void sub_8002758(u32 *r0) +{ + sub_800226C(0, 0x1, r0, 0x9); +} + +u8 sub_800276C(void) +{ + return 0; +} + void nullsub_140(void) { |