diff options
Diffstat (limited to 'src/code_808EAB0.c')
-rw-r--r-- | src/code_808EAB0.c | 47 |
1 files changed, 4 insertions, 43 deletions
diff --git a/src/code_808EAB0.c b/src/code_808EAB0.c index 44be84e..9fea853 100644 --- a/src/code_808EAB0.c +++ b/src/code_808EAB0.c @@ -61,60 +61,21 @@ void sub_808EB0C(u8 *r0, s32 r1) } } -#ifndef NONMATCHING -NAKED -#endif void sub_808EB48(u8 *r0, s32 r1) { -#ifdef NONMATCHING - // TODO array access and counter are mixed up in the regs.. so close s32 counter; - u32 index; - index = 0; - counter = 0xB; - while(counter >= 0) + for(counter = 0; counter <= 0xB; counter++) { - if(gUnknown_810A378[index] <= r1) + if(gUnknown_810A378[counter] <= r1) { - r0[index] = TRUE; + r0[counter] = TRUE; } else { - r0[index] = FALSE; + r0[counter] = FALSE; } - index++; - counter--; } -#else - asm_unified("\tpush {r4-r7,lr}\n" - "\tadds r4, r1, 0\n" - "\tmovs r6, 0x1\n" - "\tmovs r5, 0\n" - "\tadds r2, r0, 0\n" - "\tldr r1, _0808EB64\n" - "\tmovs r3, 0xB\n" -"_0808EB56:\n" - "\tmovs r7, 0\n" - "\tldrsh r0, [r1, r7]\n" - "\tcmp r0, r4\n" - "\tbgt _0808EB68\n" - "\tstrb r6, [r2]\n" - "\tb _0808EB6A\n" - "\t.align 2, 0\n" -"_0808EB64: .4byte gUnknown_810A378\n" -"_0808EB68:\n" - "\tstrb r5, [r2]\n" -"_0808EB6A:\n" - "\tadds r2, 0x1\n" - "\tadds r1, 0x2\n" - "\tsubs r3, 0x1\n" - "\tcmp r3, 0\n" - "\tbge _0808EB56\n" - "\tpop {r4-r7}\n" - "\tpop {r0}\n" - "\tbx r0"); -#endif } bool8 sub_808EB7C(s32 r0, u8 r1) |