some more decomping

This commit is contained in:
Seth Barberee 2020-09-20 20:13:04 -05:00
parent 977ef7d8aa
commit 2f88c03e87
2 changed files with 21 additions and 47 deletions

View File

@ -5,53 +5,6 @@
.text
thumb_func_start sub_80522A8
sub_80522A8:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _080522C2
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0x1
bl sub_80523A8
_080522C2:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80522A8
thumb_func_start sub_80522C8
sub_80522C8:
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
bl sub_8045888
lsls r0, 24
cmp r0, 0
beq _080522E2
adds r0, r4, 0
adds r1, r5, 0
movs r2, 0
bl sub_80523A8
_080522E2:
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_80522C8
thumb_func_start sub_80522E8
sub_80522E8:
push {lr}
movs r2, 0
bl sub_80523A8
pop {r0}
bx r0
thumb_func_end sub_80522E8
thumb_func_start sub_80522F4
sub_80522F4:
push {r4-r7,lr}

View File

@ -1,8 +1,29 @@
#include "global.h"
extern void sub_80526D0(u8 r0);
extern u8 sub_8045888(u32 r0, u32 r1, u32 r2, u32 r3);
extern void sub_80523A8(u32 r0, u32 r1, u8 r2);
void sub_805229C(void)
{
return sub_80526D0(0x50);
}
void sub_80522A8(u32 r0, u32 r1, u32 r2, u32 r3)
{
if ((sub_8045888(r0, r1, r2, r3) << 24) != 0){
sub_80523A8(r0, r1, 1);
}
}
void sub_80522C8(u32 r0, u32 r1, u32 r2, u32 r3)
{
if ((sub_8045888(r0, r1, r2, r3) << 24) != 0){
sub_80523A8(r0, r1, 0);
}
}
void sub_80522E8(u32 r0, u32 r1)
{
sub_80523A8(r0, r1, 0);
}