diff options
author | YamaArashi <YamaArashi@users.noreply.github.com> | 2017-01-02 16:36:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-02 16:36:25 -0800 |
commit | f4cf909d52fbad53b0256ef92501fddf1379a23f (patch) | |
tree | 1f416f5a55cbfca2008afc6f0652ce97aa19fc90 | |
parent | 9122e32749281a5b4825a17de6793f0acba62feb (diff) | |
parent | 65af722d7114082b89b80cc7940b7fb259bd692f (diff) |
Merge pull request #148 from marijnvdwerf/decompile/decoration
Decompile bit of decoration
-rw-r--r-- | asm/decoration.s | 55 | ||||
-rw-r--r-- | ld_script.txt | 2 | ||||
-rw-r--r-- | src/decoration.c | 26 |
3 files changed, 29 insertions, 54 deletions
diff --git a/asm/decoration.s b/asm/decoration.s index c507b599d..bf8167329 100644 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -764,60 +764,7 @@ sub_80FE7D4: @ 80FE7D4 _080FE7E8: .4byte gUnknown_083EC5E4 thumb_func_end sub_80FE7D4 - thumb_func_start sub_80FE7EC -sub_80FE7EC: @ 80FE7EC - push {r4,lr} - sub sp, 0x8 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - bl sub_8072DEC - movs r0, 0 - movs r1, 0 - movs r2, 0x1D - movs r3, 0x13 - bl MenuZeroFillWindowRect - adds r0, r4, 0 - bl sub_80FEC94 - ldr r0, _080FE858 @ =gUnknown_020388F6 - ldrb r0, [r0] - bl sub_80FECB8 - movs r0, 0xF - movs r1, 0xC - movs r2, 0x1D - movs r3, 0x13 - bl MenuDrawTextWindow - ldr r4, _080FE85C @ =gUnknown_020388F2 - ldr r0, _080FE860 @ =gUnknown_020388F4 - ldrb r0, [r0] - ldrb r1, [r4] - adds r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl sub_80FECE0 - ldr r0, _080FE864 @ =gUnknown_020388F3 - ldrb r3, [r0] - adds r3, 0x1 - lsls r3, 24 - lsrs r3, 24 - ldrb r0, [r4] - str r0, [sp] - movs r0, 0xD - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0x1 - movs r2, 0x2 - bl InitMenu - add sp, 0x8 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080FE858: .4byte gUnknown_020388F6 -_080FE85C: .4byte gUnknown_020388F2 -_080FE860: .4byte gUnknown_020388F4 -_080FE864: .4byte gUnknown_020388F3 - thumb_func_end sub_80FE7EC + .section .text_80FE868 thumb_func_start sub_80FE868 sub_80FE868: @ 80FE868 diff --git a/ld_script.txt b/ld_script.txt index eb2c35d88..8dd35b213 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -172,6 +172,8 @@ SECTIONS { asm/region_map.o(.text); asm/cute_sketch.o(.text); asm/decoration.o(.text); + src/decoration.o(.text); + asm/decoration.o(.text_80FE868); asm/slot_machine.o(.text); asm/contest_painting.o(.text); src/battle_ai.o(.text); diff --git a/src/decoration.c b/src/decoration.c new file mode 100644 index 000000000..cf137799a --- /dev/null +++ b/src/decoration.c @@ -0,0 +1,26 @@ +#include "global.h" +#include "asm.h" +#include "menu.h" + +extern u8 gUnknown_020388F2; +extern u8 gUnknown_020388F3; +extern u8 gUnknown_020388F4; +extern u8 gUnknown_020388F6; +extern u8 gUnknown_020388D5; + +void sub_80FEC94(u8 arg0); +void sub_80FECB8(u8 arg0); +void sub_80FECE0(u8 arg0); + +void sub_80FE7EC(u8 arg0) { + sub_8072DEC(); + MenuZeroFillWindowRect(0, 0, 29, 19); + + sub_80FEC94(arg0); + sub_80FECB8(gUnknown_020388F6); + + MenuDrawTextWindow(15, 12, 29, 19); + + sub_80FECE0(gUnknown_020388F2 + gUnknown_020388F4); + InitMenu(0, 1, 2, gUnknown_020388F3 + 1, gUnknown_020388F2, 13); +} |