mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 21:36:06 -04:00
feat(phase-30 S48-T6): propagate func_80180128 to its zero-crack siblings
This commit is contained in:
@@ -5480,7 +5480,53 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_010/nonmatchings/ov_SC06_010_jr_8017A4AC", func_801825DC);
|
||||
|
||||
|
||||
extern void func_8012B1B4(s32 a0, s32 a1);
|
||||
extern void func_8012CBCC(s32 a0);
|
||||
extern s32 func_801810FC(s32 a0, s32 a1);
|
||||
extern s32 func_8012B8E4(s32 arg0, s32 arg1);
|
||||
|
||||
void func_801825DC(s32 a0)
|
||||
{
|
||||
|
||||
extern s32 D_80126B60;
|
||||
s32 sp10[3];
|
||||
|
||||
if (*(s32 *)(a0 + 8) >= D_80126B60 - 0x200000) {
|
||||
if (*(s32 *)(a0 + 0x48) >= 0) {
|
||||
*(s32 *)(a0 + 0x48) = -0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
} else {
|
||||
if (D_80126B60 - 0x180000 >= *(s32 *)(a0 + 8)) {
|
||||
if (*(s32 *)(a0 + 0x48) <= 0) {
|
||||
*(s32 *)(a0 + 0x48) = 0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*(s32 *)(a0 + 0xDC) = *(s32 *)(a0 + 0xDC) >> 1;
|
||||
|
||||
sp10[0] = 0;
|
||||
sp10[1] = 0;
|
||||
sp10[2] = *(s32 *)(a0 + 0xDC);
|
||||
func_8012B1B4(a0, (s32)sp10);
|
||||
func_8012CBCC(a0);
|
||||
func_801810FC(a0, 0x51);
|
||||
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) += func_8012B8E4(a0, 0x10);
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) &= 0xFFF;
|
||||
|
||||
*(u16 *)(a0 + 0x100) -= 1;
|
||||
if (*(s16 *)(a0 + 0x100) == 0) {
|
||||
*(s16 *)(a0 + 2) = 3;
|
||||
*(u16 *)(a0 + 0x100) = 5;
|
||||
*(s32 *)(a0 + 0x1C) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_010/nonmatchings/ov_SC06_010_jr_8017A4AC", func_80182710);
|
||||
|
||||
|
||||
@@ -4546,7 +4546,53 @@ INCLUDE_ASM("asm/ov_SC06_018/nonmatchings/ov_SC06_018_jr_8017C24C", func_8017FD8
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_018/nonmatchings/ov_SC06_018_jr_8017C24C", func_8017FE0C);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_018/nonmatchings/ov_SC06_018_jr_8017C24C", func_8017FF34);
|
||||
|
||||
|
||||
extern void func_8012B1B4(void*, void*);
|
||||
extern void func_8012CBCC(s32 a0);
|
||||
extern s32 func_8017EA54(s32 a0, s32 a1);
|
||||
extern s32 func_8012B8E4(s32 arg0, s32 arg1);
|
||||
|
||||
void func_8017FF34(s32 a0)
|
||||
{
|
||||
|
||||
extern s32 D_80126B60;
|
||||
s32 sp10[3];
|
||||
|
||||
if (*(s32 *)(a0 + 8) >= D_80126B60 - 0x200000) {
|
||||
if (*(s32 *)(a0 + 0x48) >= 0) {
|
||||
*(s32 *)(a0 + 0x48) = -0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
} else {
|
||||
if (D_80126B60 - 0x180000 >= *(s32 *)(a0 + 8)) {
|
||||
if (*(s32 *)(a0 + 0x48) <= 0) {
|
||||
*(s32 *)(a0 + 0x48) = 0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*(s32 *)(a0 + 0xDC) = *(s32 *)(a0 + 0xDC) >> 1;
|
||||
|
||||
sp10[0] = 0;
|
||||
sp10[1] = 0;
|
||||
sp10[2] = *(s32 *)(a0 + 0xDC);
|
||||
((void (*)(s32, s32))func_8012B1B4)(a0, (s32)sp10);
|
||||
func_8012CBCC(a0);
|
||||
func_8017EA54(a0, 0x51);
|
||||
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) += func_8012B8E4(a0, 0x10);
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) &= 0xFFF;
|
||||
|
||||
*(u16 *)(a0 + 0x100) -= 1;
|
||||
if (*(s16 *)(a0 + 0x100) == 0) {
|
||||
*(s16 *)(a0 + 2) = 3;
|
||||
*(u16 *)(a0 + 0x100) = 5;
|
||||
*(s32 *)(a0 + 0x1C) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_018/nonmatchings/ov_SC06_018_jr_8017C24C", func_80180068);
|
||||
|
||||
@@ -6925,7 +6925,53 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_022/nonmatchings/ov_SC06_022_jr_80184A28", func_8018CD90);
|
||||
|
||||
|
||||
extern void func_8012B1B4(s32 a0, s32 a1);
|
||||
extern void func_8012CBCC(s32 a0);
|
||||
extern s32 func_8018B8B0(s32 a0, s32 a1);
|
||||
extern s32 func_8012B8E4(s32 arg0, s32 arg1);
|
||||
|
||||
void func_8018CD90(s32 a0)
|
||||
{
|
||||
|
||||
extern s32 D_80126B60;
|
||||
s32 sp10[3];
|
||||
|
||||
if (*(s32 *)(a0 + 8) >= D_80126B60 - 0x200000) {
|
||||
if (*(s32 *)(a0 + 0x48) >= 0) {
|
||||
*(s32 *)(a0 + 0x48) = -0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
} else {
|
||||
if (D_80126B60 - 0x180000 >= *(s32 *)(a0 + 8)) {
|
||||
if (*(s32 *)(a0 + 0x48) <= 0) {
|
||||
*(s32 *)(a0 + 0x48) = 0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*(s32 *)(a0 + 0xDC) = *(s32 *)(a0 + 0xDC) >> 1;
|
||||
|
||||
sp10[0] = 0;
|
||||
sp10[1] = 0;
|
||||
sp10[2] = *(s32 *)(a0 + 0xDC);
|
||||
func_8012B1B4(a0, (s32)sp10);
|
||||
func_8012CBCC(a0);
|
||||
func_8018B8B0(a0, 0x51);
|
||||
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) += func_8012B8E4(a0, 0x10);
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) &= 0xFFF;
|
||||
|
||||
*(u16 *)(a0 + 0x100) -= 1;
|
||||
if (*(s16 *)(a0 + 0x100) == 0) {
|
||||
*(s16 *)(a0 + 2) = 3;
|
||||
*(u16 *)(a0 + 0x100) = 5;
|
||||
*(s32 *)(a0 + 0x1C) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_022/nonmatchings/ov_SC06_022_jr_80184A28", func_8018CEC4);
|
||||
|
||||
|
||||
@@ -7169,7 +7169,53 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_024/nonmatchings/ov_SC06_024_jr_80186F00", func_8018F268);
|
||||
|
||||
|
||||
extern void func_8012B1B4(s32 a0, s32 a1);
|
||||
extern void func_8012CBCC(s32 a0);
|
||||
extern s32 func_8018DD88(s32 a0, s32 a1);
|
||||
extern s32 func_8012B8E4(s32 arg0, s32 arg1);
|
||||
|
||||
void func_8018F268(s32 a0)
|
||||
{
|
||||
|
||||
extern s32 D_80126B60;
|
||||
s32 sp10[3];
|
||||
|
||||
if (*(s32 *)(a0 + 8) >= D_80126B60 - 0x200000) {
|
||||
if (*(s32 *)(a0 + 0x48) >= 0) {
|
||||
*(s32 *)(a0 + 0x48) = -0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
} else {
|
||||
if (D_80126B60 - 0x180000 >= *(s32 *)(a0 + 8)) {
|
||||
if (*(s32 *)(a0 + 0x48) <= 0) {
|
||||
*(s32 *)(a0 + 0x48) = 0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*(s32 *)(a0 + 0xDC) = *(s32 *)(a0 + 0xDC) >> 1;
|
||||
|
||||
sp10[0] = 0;
|
||||
sp10[1] = 0;
|
||||
sp10[2] = *(s32 *)(a0 + 0xDC);
|
||||
func_8012B1B4(a0, (s32)sp10);
|
||||
func_8012CBCC(a0);
|
||||
func_8018DD88(a0, 0x51);
|
||||
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) += func_8012B8E4(a0, 0x10);
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) &= 0xFFF;
|
||||
|
||||
*(u16 *)(a0 + 0x100) -= 1;
|
||||
if (*(s16 *)(a0 + 0x100) == 0) {
|
||||
*(s16 *)(a0 + 2) = 3;
|
||||
*(u16 *)(a0 + 0x100) = 5;
|
||||
*(s32 *)(a0 + 0x1C) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_024/nonmatchings/ov_SC06_024_jr_80186F00", func_8018F39C);
|
||||
|
||||
|
||||
@@ -6858,7 +6858,53 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032_jr_80182890", func_8018CC20);
|
||||
|
||||
|
||||
extern void func_8012B1B4(void*, void*);
|
||||
extern void func_8012CBCC(s32 a0);
|
||||
extern s32 func_8018B740(s32 a0, s32 a1);
|
||||
extern s32 func_8012B8E4(s32 arg0, s32 arg1);
|
||||
|
||||
void func_8018CC20(s32 a0)
|
||||
{
|
||||
|
||||
extern s32 D_80126B60;
|
||||
s32 sp10[3];
|
||||
|
||||
if (*(s32 *)(a0 + 8) >= D_80126B60 - 0x200000) {
|
||||
if (*(s32 *)(a0 + 0x48) >= 0) {
|
||||
*(s32 *)(a0 + 0x48) = -0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
} else {
|
||||
if (D_80126B60 - 0x180000 >= *(s32 *)(a0 + 8)) {
|
||||
if (*(s32 *)(a0 + 0x48) <= 0) {
|
||||
*(s32 *)(a0 + 0x48) = 0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*(s32 *)(a0 + 0xDC) = *(s32 *)(a0 + 0xDC) >> 1;
|
||||
|
||||
sp10[0] = 0;
|
||||
sp10[1] = 0;
|
||||
sp10[2] = *(s32 *)(a0 + 0xDC);
|
||||
((void (*)(s32, s32))func_8012B1B4)(a0, (s32)sp10);
|
||||
func_8012CBCC(a0);
|
||||
func_8018B740(a0, 0x51);
|
||||
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) += func_8012B8E4(a0, 0x10);
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) &= 0xFFF;
|
||||
|
||||
*(u16 *)(a0 + 0x100) -= 1;
|
||||
if (*(s16 *)(a0 + 0x100) == 0) {
|
||||
*(s16 *)(a0 + 2) = 3;
|
||||
*(u16 *)(a0 + 0x100) = 5;
|
||||
*(s32 *)(a0 + 0x1C) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_032/nonmatchings/ov_SC06_032_jr_80182890", func_8018CD54);
|
||||
|
||||
|
||||
@@ -4019,7 +4019,53 @@ INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_8018D98C", func_8019070
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_8018D98C", func_80190798);
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_8018D98C", func_801908C0);
|
||||
|
||||
|
||||
extern void func_8012B1B4(void*, void*);
|
||||
extern void func_8012CBCC(s32 a0);
|
||||
extern s32 func_8018F3E0(s32 a0, s32 a1);
|
||||
extern s32 func_8012B8E4(s32 arg0, s32 arg1);
|
||||
|
||||
void func_801908C0(s32 a0)
|
||||
{
|
||||
|
||||
extern s32 D_80126B60;
|
||||
s32 sp10[3];
|
||||
|
||||
if (*(s32 *)(a0 + 8) >= D_80126B60 - 0x200000) {
|
||||
if (*(s32 *)(a0 + 0x48) >= 0) {
|
||||
*(s32 *)(a0 + 0x48) = -0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
} else {
|
||||
if (D_80126B60 - 0x180000 >= *(s32 *)(a0 + 8)) {
|
||||
if (*(s32 *)(a0 + 0x48) <= 0) {
|
||||
*(s32 *)(a0 + 0x48) = 0x8000;
|
||||
*(s32 *)(a0 + 0x14) = *(s32 *)(a0 + 0x14) >> 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*(s32 *)(a0 + 0xDC) = *(s32 *)(a0 + 0xDC) >> 1;
|
||||
|
||||
sp10[0] = 0;
|
||||
sp10[1] = 0;
|
||||
sp10[2] = *(s32 *)(a0 + 0xDC);
|
||||
((void (*)(s32, s32))func_8012B1B4)(a0, (s32)sp10);
|
||||
func_8012CBCC(a0);
|
||||
func_8018F3E0(a0, 0x51);
|
||||
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) += func_8012B8E4(a0, 0x10);
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) &= 0xFFF;
|
||||
|
||||
*(u16 *)(a0 + 0x100) -= 1;
|
||||
if (*(s16 *)(a0 + 0x100) == 0) {
|
||||
*(s16 *)(a0 + 2) = 3;
|
||||
*(u16 *)(a0 + 0x100) = 5;
|
||||
*(s32 *)(a0 + 0x1C) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM("asm/ov_SC06_033/nonmatchings/ov_SC06_033_jr_8018D98C", func_801909F4);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user