mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
feat(decomp): propagate func_80188828 (gate lane)
This commit is contained in:
@@ -15125,3 +15125,10 @@ groups:
|
||||
func: DEFINE_func_80187300
|
||||
vram: 0x80187300
|
||||
binaries: [ov_SC03_014, ov_SC03_015]
|
||||
- id: E_func_80188828
|
||||
tier: h_exact
|
||||
hash: 6519c0248710a61cee3abf042e62d39251e20359
|
||||
source: src/shared/engine_core.h
|
||||
func: DEFINE_func_80188828
|
||||
vram: 0x80188828
|
||||
binaries: [ov_SC03_014, ov_SC03_015]
|
||||
|
||||
@@ -4649,66 +4649,7 @@ L_da8:
|
||||
|
||||
#include "common.h"
|
||||
|
||||
extern void func_8013CABC(void);
|
||||
extern void func_801890F8(void *a0);
|
||||
extern s32 func_8012BEE8(s32 a0);
|
||||
extern void func_80188A80(s32 a0);
|
||||
extern void func_801889B4(s32 a0);
|
||||
extern s32 func_801846E4(void);
|
||||
|
||||
/* Already declared in the destination TU (src/ov_SC03_014/ov_SC03_014_jr_801848E4.c:2530)
|
||||
* as `extern int func_80178970(void);`. Adopting that exact spelling (law 2) and
|
||||
* calling through a function-pointer cast (same idiom the TU already uses at
|
||||
* func_80187EA8 for func_8012C218) to pass the self argument without redeclaring
|
||||
* the symbol with a conflicting prototype. */
|
||||
extern int func_80178970(void);
|
||||
|
||||
extern s32 D_801EAC90;
|
||||
|
||||
void func_80188828(s32 a0) {
|
||||
s32 self;
|
||||
|
||||
self = a0;
|
||||
|
||||
if (*(s32 *)(self + 0x1C) == 0x30) {
|
||||
func_8013CABC();
|
||||
} else if (*(s32 *)(self + 0x1C) == 0x10) {
|
||||
func_801890F8((void *)*(s32 *)(self + 0xD0));
|
||||
}
|
||||
|
||||
if (*(u16 *)(self + 0x84) & 1) {
|
||||
*(u16 *)(*(s32 *)(self + 0x64) + 6) = *(u16 *)(*(s32 *)(self + 0x64) + 6) - 3;
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) - 3;
|
||||
*(u16 *)(self + 6) = *(u16 *)(self + 6) - 3;
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(self + 0x64) + 6) = *(u16 *)(*(s32 *)(self + 0x64) + 6) + 3;
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) + 3;
|
||||
*(u16 *)(self + 6) = *(u16 *)(self + 6) + 3;
|
||||
}
|
||||
|
||||
{
|
||||
s32 t;
|
||||
t = D_801EAC90;
|
||||
*(u16 *)(self + 0x84) = *(u16 *)(self + 0x84) + 1;
|
||||
if (t == 0) {
|
||||
D_801EAC90 = func_801846E4();
|
||||
}
|
||||
}
|
||||
|
||||
if (func_8012BEE8(self) && D_801EAC90) {
|
||||
func_80188A80(self);
|
||||
} else {
|
||||
if (*(s32 *)(self + 0x1C) < 0x48) {
|
||||
if ((*(u16 *)(self + 0x84) & 3) == 0) {
|
||||
func_801889B4(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
((void (*)(s32))func_80178970)(self);
|
||||
}
|
||||
DEFINE_func_80188828() /* dedup: shared engine-core @0x80188828 (src/shared) */
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC03_014/nonmatchings/ov_SC03_014_jr_801848E4", func_801889B4);
|
||||
|
||||
@@ -3680,7 +3680,7 @@ void func_80188634(void *a0) {
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015_jr_801848E4", func_80188670);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015_jr_801848E4", func_80188828);
|
||||
DEFINE_func_80188828() /* dedup: shared engine-core @0x80188828 (src/shared) */
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC03_015/nonmatchings/ov_SC03_015_jr_801848E4", func_801889B4);
|
||||
|
||||
|
||||
@@ -65234,6 +65234,54 @@
|
||||
func_8012C658(0x3DE, 0, a0); \
|
||||
}
|
||||
|
||||
#define DEFINE_func_80188828() \
|
||||
extern void func_8013CABC(void); \
|
||||
extern void func_801890F8(void *a0); \
|
||||
extern s32 func_8012BEE8(s32 a0); \
|
||||
extern void func_80188A80(s32 a0); \
|
||||
extern void func_801889B4(s32 a0); \
|
||||
extern s32 func_801846E4(void); \
|
||||
extern int func_80178970(void); \
|
||||
extern s32 D_801EAC90; \
|
||||
void func_80188828(s32 a0) { \
|
||||
s32 self; \
|
||||
self = a0; \
|
||||
if (*(s32 *)(self + 0x1C) == 0x30) { \
|
||||
func_8013CABC(); \
|
||||
} else if (*(s32 *)(self + 0x1C) == 0x10) { \
|
||||
func_801890F8((void *)*(s32 *)(self + 0xD0)); \
|
||||
} \
|
||||
if (*(u16 *)(self + 0x84) & 1) { \
|
||||
*(u16 *)(*(s32 *)(self + 0x64) + 6) = *(u16 *)(*(s32 *)(self + 0x64) + 6) - 3; \
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) = \
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) - 3; \
|
||||
*(u16 *)(self + 6) = *(u16 *)(self + 6) - 3; \
|
||||
} else { \
|
||||
*(u16 *)(*(s32 *)(self + 0x64) + 6) = *(u16 *)(*(s32 *)(self + 0x64) + 6) + 3; \
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) = \
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) + 3; \
|
||||
*(u16 *)(self + 6) = *(u16 *)(self + 6) + 3; \
|
||||
} \
|
||||
{ \
|
||||
s32 t; \
|
||||
t = D_801EAC90; \
|
||||
*(u16 *)(self + 0x84) = *(u16 *)(self + 0x84) + 1; \
|
||||
if (t == 0) { \
|
||||
D_801EAC90 = func_801846E4(); \
|
||||
} \
|
||||
} \
|
||||
if (func_8012BEE8(self) && D_801EAC90) { \
|
||||
func_80188A80(self); \
|
||||
} else { \
|
||||
if (*(s32 *)(self + 0x1C) < 0x48) { \
|
||||
if ((*(u16 *)(self + 0x84) & 3) == 0) { \
|
||||
func_801889B4(self); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
((void (*)(s32))func_80178970)(self); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define DEFINE_func_80128EA8() \
|
||||
@@ -159873,4 +159921,52 @@
|
||||
func_8012C658(0x3DE, 0, a0); \
|
||||
}
|
||||
|
||||
#define DEFINE_func_80188828() \
|
||||
extern void func_8013CABC(void); \
|
||||
extern void func_801890F8(void *a0); \
|
||||
extern s32 func_8012BEE8(s32 a0); \
|
||||
extern void func_80188A80(s32 a0); \
|
||||
extern void func_801889B4(s32 a0); \
|
||||
extern s32 func_801846E4(void); \
|
||||
extern int func_80178970(void); \
|
||||
extern s32 D_801EAC90; \
|
||||
void func_80188828(s32 a0) { \
|
||||
s32 self; \
|
||||
self = a0; \
|
||||
if (*(s32 *)(self + 0x1C) == 0x30) { \
|
||||
func_8013CABC(); \
|
||||
} else if (*(s32 *)(self + 0x1C) == 0x10) { \
|
||||
func_801890F8((void *)*(s32 *)(self + 0xD0)); \
|
||||
} \
|
||||
if (*(u16 *)(self + 0x84) & 1) { \
|
||||
*(u16 *)(*(s32 *)(self + 0x64) + 6) = *(u16 *)(*(s32 *)(self + 0x64) + 6) - 3; \
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) = \
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) - 3; \
|
||||
*(u16 *)(self + 6) = *(u16 *)(self + 6) - 3; \
|
||||
} else { \
|
||||
*(u16 *)(*(s32 *)(self + 0x64) + 6) = *(u16 *)(*(s32 *)(self + 0x64) + 6) + 3; \
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) = \
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(self + 0x64) + 0x20) + 8) + 3; \
|
||||
*(u16 *)(self + 6) = *(u16 *)(self + 6) + 3; \
|
||||
} \
|
||||
{ \
|
||||
s32 t; \
|
||||
t = D_801EAC90; \
|
||||
*(u16 *)(self + 0x84) = *(u16 *)(self + 0x84) + 1; \
|
||||
if (t == 0) { \
|
||||
D_801EAC90 = func_801846E4(); \
|
||||
} \
|
||||
} \
|
||||
if (func_8012BEE8(self) && D_801EAC90) { \
|
||||
func_80188A80(self); \
|
||||
} else { \
|
||||
if (*(s32 *)(self + 0x1C) < 0x48) { \
|
||||
if ((*(u16 *)(self + 0x84) & 3) == 0) { \
|
||||
func_801889B4(self); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
((void (*)(s32))func_80178970)(self); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user