match sub_8015F44 and add decomp.me link

This commit is contained in:
Seth Barberee 2024-10-20 15:54:49 -07:00
parent b3b9c899e8
commit 56290df4e3
2 changed files with 31 additions and 37 deletions

View File

@ -1725,41 +1725,4 @@ _08015F34:
_08015F40: .4byte gUnknown_80DB098
thumb_func_end sub_8015EB4
thumb_func_start sub_8015F44
sub_8015F44:
push {r4,lr}
movs r2, 0
ldr r0, _08015F78
ldr r0, [r0]
ldrb r4, [r0, 0x1B]
cmp r2, r4
bge _08015F7C
adds r3, r0, 0
adds r3, 0xF8
ldr r0, [r3]
ldrb r0, [r0]
cmp r0, 0
beq _08015F7C
movs r2, 0x1
movs r1, 0x1
_08015F62:
cmp r1, r4
bge _08015F7C
ldr r0, [r3]
adds r0, r1
ldrb r0, [r0]
cmp r0, 0
beq _08015F7C
adds r2, r1, 0x1
adds r1, r2, 0
b _08015F62
.align 2, 0
_08015F78: .4byte gUnknown_203B1FC
_08015F7C:
adds r0, r2, 0
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8015F44
.align 2,0

View File

@ -26,6 +26,37 @@ struct unkStruct_203B1FC
extern struct unkStruct_203B1FC *gUnknown_203B1FC;
// https://decomp.me/scratch/6BUMI - Seth
s32 sub_8015F44(void)
{
#ifndef NONMATCHING
register s32 index asm("r2");
#else
s32 index;
#endif
s32 counter;
index = 0;
if(index < gUnknown_203B1FC->unk1B)
{
if(gUnknown_203B1FC->unkF8[0] == '\0')
return index;
index = 1;
counter = 1;
while (1) {
if(counter >= gUnknown_203B1FC->unk1B)
return index;
if(gUnknown_203B1FC->unkF8[counter] == '\0')
return index;
index = counter + 1;
counter = index;
}
}
return index;
}
void sub_8015F84(void)
{
u32 uVar2;