Decompiled several trivial functions

This commit is contained in:
Phlosioneer 2019-02-12 21:33:15 -05:00
parent 112fc47017
commit 13a6765c88
2 changed files with 37 additions and 77 deletions

View File

@ -5,70 +5,6 @@
.text
thumb_func_start sub_81C75D4
sub_81C75D4: @ 81C75D4
push {lr}
bl sub_81C786C
pop {r1}
bx r1
thumb_func_end sub_81C75D4
thumb_func_start sub_81C75E0
sub_81C75E0: @ 81C75E0
push {lr}
ldr r0, =gUnknown_0203CF40
ldr r0, [r0]
ldr r0, [r0]
bl _call_via_r0
pop {r1}
bx r1
.pool
thumb_func_end sub_81C75E0
thumb_func_start sub_81C75F4
sub_81C75F4: @ 81C75F4
push {lr}
bl InitKeys
pop {r0}
bx r0
thumb_func_end sub_81C75F4
thumb_func_start c3args_set_0toR1_1to0
c3args_set_0toR1_1to0: @ 81C7600
push {lr}
bl SetVBlankCallback
pop {r0}
bx r0
thumb_func_end c3args_set_0toR1_1to0
thumb_func_start sub_81C760C
sub_81C760C: @ 81C760C
push {lr}
ldr r0, =sub_81C7418
bl SetVBlankCallback
pop {r0}
bx r0
.pool
thumb_func_end sub_81C760C
thumb_func_start sub_81C761C
sub_81C761C: @ 81C761C
push {r4,lr}
adds r4, r0, 0
adds r0, r1, 0
bl Alloc
ldr r1, =gUnknown_0203CF40
ldr r1, [r1]
lsls r4, 2
adds r1, 0x10
adds r1, r4
str r0, [r1]
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_81C761C
thumb_func_start sub_81C763C
sub_81C763C: @ 81C763C
ldr r1, =gUnknown_0203CF40
@ -6694,7 +6630,7 @@ titlescreen_0: @ 81CA92C
ldr r2, [r2, 0x8]
bl ScanlineEffect_SetParams
ldr r0, =sub_81CA914
bl c3args_set_0toR1_1to0
bl IndirectSetVBlankCallback
ldr r0, =sub_81CA9EC
movs r1, 0x3
bl CreateTask
@ -10543,7 +10479,7 @@ _081CC714:
.4byte _081CC82A
_081CC734:
movs r0, 0
bl c3args_set_0toR1_1to0
bl IndirectSetVBlankCallback
movs r0, 0x1
bl HideBg
movs r0, 0x2
@ -10623,7 +10559,7 @@ _081CC7E2:
movs r0, 0x2
bl ShowBg
ldr r0, =sub_81CC6A4
bl c3args_set_0toR1_1to0
bl IndirectSetVBlankCallback
b _081CC77C
.pool
_081CC804:
@ -13809,7 +13745,7 @@ _081CE218:
bne _081CE2C0
_081CE230:
ldr r0, =sub_81CEE44
bl c3args_set_0toR1_1to0
bl IndirectSetVBlankCallback
b _081CDFB0
.pool
_081CE23C:

View File

@ -14,8 +14,8 @@ struct UnknownStruct_0203CF40 {
u32 field4;
u16 field8;
u32 fieldC;
u32 field10;
u32 field14[18];
u32* field10[19];
//u32* field14[18];
};
struct UnknownStruct_0861F3EC {
@ -31,16 +31,16 @@ extern void sub_81C76C4(void);
extern void sub_81C7710(void);
extern void sub_81C7850(u32 a0);
extern void sub_81C9430(void);
extern void sub_81C75F4(void);
extern void sub_81C7834(u32 (*a0)(void), u32(*a1)(void));
extern u32 sub_81C76FC(void);
extern u32 sub_81C786C(void);
extern u32 sub_81C75E0(void);
extern u32 sub_81C75D4(void);
extern u32 sub_81C7738(void);
bool32 sub_81C756C(u32 a0);
u32 AnyMonHasRibbon(void);
u32 sub_81C75E0(void);
u32 sub_81C75D4(void);
void sub_81C75F4(void);
void sub_81C7334(void);
void sub_81C71E4(u8 a0);
void sub_81C7170(u8 a0);
@ -211,12 +211,12 @@ void sub_81C7334() {
// Clears UnknownStruct_0203CF40
void sub_81C7360(struct UnknownStruct_0203CF40 *a0) {
s32 i;
u32 *arrayPtr;
s32 fill;
u32 **arrayPtr;
s32 *fill;
fill = 0;
fill = NULL;
i = 18;
arrayPtr = &(a0->field14[17]);
arrayPtr = &(a0->field10[18]);
for (i; i >= 0; i--) {
*arrayPtr = fill;
arrayPtr -= 1;
@ -345,4 +345,28 @@ bool32 sub_81C756C(u32 a0) {
gUnknown_0203CF40->field0 = gUnknown_0861F3EC[index].data[1];
gUnknown_0203CF40->field4 = index;
return TRUE;
}
u32 sub_81C75D4(void) {
return sub_81C786C();
}
u32 sub_81C75E0(void) {
return gUnknown_0203CF40->field0();
}
void sub_81C75F4(void) {
InitKeys();
}
void IndirectSetVBlankCallback(IntrCallback callback) {
SetVBlankCallback(callback);
}
void sub_81C760C(void) {
SetVBlankCallback(sub_81C7418);
}
u32* sub_81C761C(u32 a0, u32 a1) {
return gUnknown_0203CF40->field10[a0] = (u32*)Alloc(a1);
}