feat(decomp): main batch-gate batch 2 — 143dbb89 byte-identical

This commit is contained in:
Drew T
2026-08-30 21:27:19 -06:00
parent c9029b18fd
commit 035f2bafd9
2 changed files with 48 additions and 2 deletions
+16 -1
View File
@@ -1,6 +1,21 @@
#include "common.h"
INCLUDE_ASM("asm/nonmatchings/800c2_2", func_80062388);
__asm__(
".text\n"
".align 2\n"
".globl func_80062388\n"
".ent\tfunc_80062388\n"
"func_80062388:\n"
".frame $sp,0,$31\n"
".mask 0x00000000,0\n"
".fmask 0x00000000,0\n"
".set\tnoreorder\n"
"lui $at, %hi(D_80072A24)\n"
"jr $ra\n"
"sw $a0, %lo(D_80072A24)($at)\n"
".set\treorder\n"
".end\tfunc_80062388\n"
);
extern s32 D_80072A24;
+32 -1
View File
@@ -1451,7 +1451,38 @@ void func_8005F384(void *arg0) {
*(u8 *)((u8 *)arg0 + 0x37) = temp;
}
INCLUDE_ASM("asm/nonmatchings/800c3", func_8005F394);
s32 func_8005F394(u8 *arg0) {
s32 idx = arg0[0x45] - 3;
s32 base;
switch (arg0[0x36]) {
case 0:
if (idx < 6 && *(arg0 + idx + 0x57) == 0) {
return 0;
}
if (idx >= arg0[0x34]) {
return 0;
}
base = *(s32 *)(arg0 + 0x28);
load_it:
return *(u8 *)(base + idx);
case 0x4D:
if (idx >= arg0[0x35]) {
return 0xFF;
}
base = *(s32 *)(arg0 + 0x2C);
goto load_it;
default: {
u8 val;
if (idx >= arg0[0x35]) {
return 0;
}
val = *(u8 *)(*(s32 *)(arg0 + 0x2C) + idx);
__asm__ __volatile__("" ::: "memory");
return val;
}
}
}
INCLUDE_ASM("asm/nonmatchings/800c3", func_8005F450);