mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-27 22:45:39 -04:00
feat(phase-30 S39/S4): propagate func_8018281C family (76 ins x 2 members) - R22 140/140
This commit is contained in:
@@ -2962,7 +2962,66 @@ void func_801801EC(int param_1)
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC02_000/nonmatchings/ov_SC02_000_jr_8017FCB0", func_80180264);
|
||||
|
||||
// @class: struct
|
||||
// @stuck: none — MATCH (76 ins). jtbl forced via explicit case 4/6 (count>=5 over MIPS tablejump threshold); case-5 block placed between if-block and default via goto so the if-block emits j default w/ e2=0 in the delay slot
|
||||
|
||||
extern s32 func_8012CBA4(s32);
|
||||
extern int func_8012BEE8(int a0);
|
||||
extern void func_8012B2CC(int a0);
|
||||
extern void func_8012B23C(int a0);
|
||||
extern void func_8012B14C(s32 a0, s32 a1);
|
||||
extern void func_8012A828(int a0, void *a1);
|
||||
extern void func_801803B0(void);
|
||||
extern int rand(void);
|
||||
extern int D_801270D4;
|
||||
extern unsigned char D_8018E68C[];
|
||||
extern unsigned char D_801A648C[];
|
||||
|
||||
void func_80180264(int param_1)
|
||||
{
|
||||
int iVar1;
|
||||
unsigned int uVar2;
|
||||
|
||||
((void (*)(void))func_8012CBA4)();
|
||||
if ((((int)((unsigned int)*(unsigned short *)(param_1 + 0x70) << 0x10) >> 0x18 != 4) ||
|
||||
(D_801270D4 == 0)) &&
|
||||
(iVar1 = func_8012BEE8(param_1), iVar1 != 0)) {
|
||||
*(char *)(param_1 + 0xc1) = 0;
|
||||
*(short *)(param_1 + 2) = 1;
|
||||
*(short *)(param_1 + 0x34) = 0;
|
||||
uVar2 = rand();
|
||||
*(int *)(param_1 + 0x1c) = (uVar2 & 0x1f) + 0x46;
|
||||
*(short *)(param_1 + 0xe0) = 0;
|
||||
*(short *)(param_1 + 0xe2) = *(short *)(*(int *)(param_1 + 0x20) + 0x12);
|
||||
switch ((int)((unsigned int)*(unsigned short *)(param_1 + 0x70) << 0x10) >> 0x18) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 7:
|
||||
if ((*(unsigned short *)(param_1 + 0xfe) & 2) != 0) {
|
||||
*(short *)(param_1 + 0xe2) = 0;
|
||||
}
|
||||
goto do_default;
|
||||
case 5:
|
||||
((void (*)(int))func_801803B0)(param_1);
|
||||
break;
|
||||
case 4:
|
||||
case 6:
|
||||
default:
|
||||
do_default:
|
||||
*(short *)(param_1 + 0xe4) = 0x1e;
|
||||
*(short *)(param_1 + 0x5e) = 0;
|
||||
*(unsigned short *)(param_1 + 0x5c) = 0xaa10;
|
||||
func_8012B2CC(param_1);
|
||||
func_8012B23C(param_1);
|
||||
((void (*)(int, void *))func_8012B14C)(param_1, &D_8018E68C);
|
||||
func_8012A828(param_1, &D_801A648C);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_func_80180394() /* dedup: shared engine-core @0x80180394 (src/shared) */
|
||||
|
||||
|
||||
@@ -2961,7 +2961,66 @@ void func_801801EC(int param_1)
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC02_003/nonmatchings/ov_SC02_003_jr_8017FCB0", func_80180264);
|
||||
|
||||
// @class: struct
|
||||
// @stuck: none — MATCH (76 ins). jtbl forced via explicit case 4/6 (count>=5 over MIPS tablejump threshold); case-5 block placed between if-block and default via goto so the if-block emits j default w/ e2=0 in the delay slot
|
||||
|
||||
extern s32 func_8012CBA4(s32);
|
||||
extern int func_8012BEE8(int a0);
|
||||
extern void func_8012B2CC(int a0);
|
||||
extern void func_8012B23C(int a0);
|
||||
extern void func_8012B14C(s32 a0, s32 a1);
|
||||
extern void func_8012A828(int a0, void *a1);
|
||||
extern void func_801803B0(void);
|
||||
extern int rand(void);
|
||||
extern int D_801270D4;
|
||||
extern unsigned char D_8018E68C[];
|
||||
extern unsigned char D_801A648C[];
|
||||
|
||||
void func_80180264(int param_1)
|
||||
{
|
||||
int iVar1;
|
||||
unsigned int uVar2;
|
||||
|
||||
((void (*)(void))func_8012CBA4)();
|
||||
if ((((int)((unsigned int)*(unsigned short *)(param_1 + 0x70) << 0x10) >> 0x18 != 4) ||
|
||||
(D_801270D4 == 0)) &&
|
||||
(iVar1 = func_8012BEE8(param_1), iVar1 != 0)) {
|
||||
*(char *)(param_1 + 0xc1) = 0;
|
||||
*(short *)(param_1 + 2) = 1;
|
||||
*(short *)(param_1 + 0x34) = 0;
|
||||
uVar2 = rand();
|
||||
*(int *)(param_1 + 0x1c) = (uVar2 & 0x1f) + 0x46;
|
||||
*(short *)(param_1 + 0xe0) = 0;
|
||||
*(short *)(param_1 + 0xe2) = *(short *)(*(int *)(param_1 + 0x20) + 0x12);
|
||||
switch ((int)((unsigned int)*(unsigned short *)(param_1 + 0x70) << 0x10) >> 0x18) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 7:
|
||||
if ((*(unsigned short *)(param_1 + 0xfe) & 2) != 0) {
|
||||
*(short *)(param_1 + 0xe2) = 0;
|
||||
}
|
||||
goto do_default;
|
||||
case 5:
|
||||
((void (*)(int))func_801803B0)(param_1);
|
||||
break;
|
||||
case 4:
|
||||
case 6:
|
||||
default:
|
||||
do_default:
|
||||
*(short *)(param_1 + 0xe4) = 0x1e;
|
||||
*(short *)(param_1 + 0x5e) = 0;
|
||||
*(unsigned short *)(param_1 + 0x5c) = 0xaa10;
|
||||
func_8012B2CC(param_1);
|
||||
func_8012B23C(param_1);
|
||||
((void (*)(int, void *))func_8012B14C)(param_1, &D_8018E68C);
|
||||
func_8012A828(param_1, &D_801A648C);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DEFINE_func_80180394() /* dedup: shared engine-core @0x80180394 (src/shared) */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user