Decompiled sub_81C7124

This commit is contained in:
Phlosioneer 2019-02-11 16:35:02 -05:00
parent 052cd4da10
commit 6466d0bea8
2 changed files with 22 additions and 46 deletions

View File

@ -4,49 +4,6 @@
.syntax unified
.text
thumb_func_start sub_81C7124
sub_81C7124: @ 81C7124
push {r4-r6,lr}
adds r6, r0, 0
movs r5, 0
ldr r4, =gTasks
_081C712C:
ldrb r0, [r4, 0x4]
cmp r0, 0
beq _081C7160
ldr r1, [r4]
ldr r0, =sub_81C7170
cmp r1, r0
beq _081C7140
ldr r0, =sub_81C71E4
cmp r1, r0
bne _081C7160
_081C7140:
lsls r0, r5, 24
lsrs r0, 24
movs r1, 0x1
bl GetWordTaskArg
cmp r0, r6
bne _081C7160
movs r0, 0x1
b _081C716A
.pool
_081C7160:
adds r4, 0x28
adds r5, 0x1
cmp r5, 0xF
ble _081C712C
movs r0, 0
_081C716A:
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end sub_81C7124
thumb_func_start sub_81C7170
sub_81C7170: @ 81C7170

View File

@ -81,16 +81,35 @@ u32 sub_81C7078(s32 a0, u32 a1)
return ((gUnknown_0203CF3C++) << 16) | taskId;
}
bool32 sub_81C70D8(u32 a0, u32 unused) {
bool32 sub_81C70D8(u32 a0, u32 unused)
{
u32 v1 = a0 & 0xFFFF;
u32 v2 = a0 >> 16;
if (gTasks[v1].isActive
&& (gTasks[v1].func == sub_81C7170 || gTasks[v1].func == sub_81C71E4)
&& gTasks[v1].data[3] == v2) {
&& gTasks[v1].data[3] == v2)
{
return TRUE;
} else {
}
else
{
return FALSE;
}
}
bool32 sub_81C7124(u32 a0)
{
s32 i;
for (i = 0; i < 16; i++) {
if (gTasks[i].isActive
&& (gTasks[i].func == sub_81C7170 || gTasks[i].func == sub_81C71E4))
{
u32 arg = GetWordTaskArg((u8)i, 1);
if (arg == a0) {
return TRUE;
}
}
}
return FALSE;
}