-
-
Save zbanks/3ca2c7de1115e20b33fa705b7212dbdc to your computer and use it in GitHub Desktop.
mips_to_c output for MM -- files that changed from bug in handling subroutine args
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INFO] [FAIL] mm_ctx:code/z_fireobj.text.s | |
[INFO] Output of ../mm/asm/code/z_fireobj.text.s changed! Diff: | |
--- | |
+++ | |
@@ -245,124 +245,136 @@ | |
sp70 = temp_v1; | |
sp5C = temp_v0; | |
sp5C->words.w1 = Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0U, 0U, 0x20, 0x40, 1, 0U, ((s32) fire->unk26 * -0x14) & 0x1FF, 0x20, 0x80); | |
temp_v0_2 = temp_s0->polyXlu.p; | |
temp_s0->polyXlu.p = temp_v0_2 + 8; | |
temp_v0_2->words.w0 = temp_v1->unk4 | 0xFA000000; | |
temp_v0_2->words.w1 = (temp_v1->unk0 << 0x18) | (temp_v1->unk1 << 0x10) | (temp_v1->unk2 << 8) | temp_v1->unk3; | |
temp_v0_3 = temp_s0->polyXlu.p; | |
temp_s0->polyXlu.p = temp_v0_3 + 8; | |
temp_v0_3->words.w0 = 0xFB000000; | |
temp_v0_3->words.w1 = (temp_v1->unk5 << 0x18) | (temp_v1->unk6 << 0x10) | (temp_v1->unk7 << 8); | |
sp68 = 0; | |
sp6A = func_800DFCDC(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x8000; | |
sp6C = 0; | |
SysMatrix_SetStateRotationAndTranslation(fire->position.x, fire->position.y, fire->position.z, (Vec3s *) &sp68); | |
Matrix_Scale(fire->xScale, fire->yScale, 1.0f, 1); | |
temp_v0_4 = temp_s0->polyXlu.p; | |
temp_s0->polyXlu.p = temp_v0_4 + 8; | |
temp_v0_4->words.w0 = 0xDA380003; | |
temp_v0_4->words.w1 = Matrix_NewMtx(globalCtx->state.gfxCtx); | |
temp_v0_5 = temp_s0->polyXlu.p; | |
temp_s0->polyXlu.p = temp_v0_5 + 8; | |
temp_v0_5->words.w0 = 0xDE000000; | |
temp_v0_5->words.w1 = (u32) D_0407D590; | |
} | |
} | |
void FireObj_InitLight(GlobalContext *globalCtx, FireObjLight *light, u8 *param_3, Vec3f *pos) { | |
LightInfoPositional *sp28; | |
FireObjLightParams *temp_v0; | |
LightInfoPositional *temp_a0; | |
temp_v0 = &(D_801BD8FC + 8)[*param_3]; | |
temp_a0 = &light->lightInfo; | |
sp28 = temp_a0; | |
Lights_PointGlowSetInfo((LightInfo *) temp_a0, (s16) (s32) pos->x, (s16) (s32) pos->y, (s16) (s32) pos->z, (u8) (s32) temp_v0->unk2, (u8) (s32) temp_v0->unk3, (u8) (s32) temp_v0->unk4, (s16) (s32) temp_v0->unk_0); | |
light->light = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, (LightInfo *) sp28); | |
light->unk12 = *param_3; | |
} | |
void FireObj_FiniLight(GlobalContext *globalCtx, FireObjLight *light) { | |
LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, light->light); | |
} | |
void FireObj_UpdateLight(GlobalContext *globalCtx, FireObjLight *light, FireObj *fire) { | |
FireObjLightParams *sp44; | |
s16 sp42; | |
f32 sp38; | |
f32 sp34; | |
FireObjLightParams *temp_v0; | |
+ f32 temp_f6; | |
f32 temp_f8; | |
+ f32 temp_f8_2; | |
+ u8 temp_t2; | |
u8 temp_t8; | |
+ u8 temp_t8_2; | |
f32 phi_f8; | |
+ f32 phi_f6; | |
+ f32 phi_f8_2; | |
temp_v0 = &(D_801BD8FC + 8)[light->unk12]; | |
if (fire->state == 3) { | |
Lights_PointSetColorAndRadius((LightInfo *) &light->lightInfo, 0U, 0U, 0U, (s16) -1); | |
return; | |
} | |
sp44 = temp_v0; | |
sp42 = (s16) (s32) ((fire->yScale * 140.0f * fire->sizeInv) + 60.0f); | |
sp34 = Rand_ZeroOne(); | |
sp38 = Rand_ZeroOne(); | |
- if ((s32) temp_v0->unk5 < 0) { | |
- | |
- } | |
- if ((s32) temp_v0->unk6 < 0) { | |
- | |
- } | |
- temp_t8 = temp_v0->unk7; | |
+ temp_t8 = temp_v0->unk5; | |
temp_f8 = (f32) temp_t8; | |
phi_f8 = temp_f8; | |
if ((s32) temp_t8 < 0) { | |
phi_f8 = temp_f8 + 4294967296.0f; | |
} | |
- Lights_PointGlowSetInfo((LightInfo *) &light->lightInfo, (s16) (s32) fire->position.x, (s16) (s32) (fire->position.y + (fire->yScale * 6500.0f)), (s16) (s32) fire->position.z, (u8) ((s32) (Rand_ZeroOne() * phi_f8) + temp_v0->unk4), (u8) (s32) sp42); | |
+ temp_t2 = temp_v0->unk6; | |
+ temp_f6 = (f32) temp_t2; | |
+ phi_f6 = temp_f6; | |
+ if ((s32) temp_t2 < 0) { | |
+ phi_f6 = temp_f6 + 4294967296.0f; | |
+ } | |
+ temp_t8_2 = temp_v0->unk7; | |
+ temp_f8_2 = (f32) temp_t8_2; | |
+ phi_f8_2 = temp_f8_2; | |
+ if ((s32) temp_t8_2 < 0) { | |
+ phi_f8_2 = temp_f8_2 + 4294967296.0f; | |
+ } | |
+ Lights_PointGlowSetInfo((LightInfo *) &light->lightInfo, (s16) (s32) fire->position.x, (s16) (s32) (fire->position.y + (fire->yScale * 6500.0f)), (s16) (s32) fire->position.z, (u8) ((s32) (sp34 * phi_f8) + temp_v0->unk2), (u8) ((s32) (sp38 * phi_f6) + temp_v0->unk3), (u8) ((s32) (Rand_ZeroOne() * phi_f8_2) + temp_v0->unk4), (s16) (s32) sp42); | |
} | |
void FireObj_Init(GlobalContext *globalCtx, FireObj *fire, FireObjInitParams *init, Actor *actor) { | |
ColliderCylinder *sp20; | |
ColliderCylinder *temp_a1; | |
FireObj_InitWithParams(globalCtx, fire, init); | |
temp_a1 = &fire->collision; | |
sp20 = temp_a1; | |
Collider_InitCylinder(globalCtx, temp_a1); | |
Collider_SetCylinder(globalCtx, temp_a1, actor, &fireObjCollisionInit); | |
fire->collision.dim.radius = (s16) (s32) ((fire->size * 4000.0f) + 2.5f); | |
fire->collision.dim.height = (s16) (s32) (fire->size * 16000.0f); | |
fire->collision.dim.yShift = (s16) (s32) (fire->size * -1728.0f); | |
FireObj_InitLight(globalCtx, &fire->light, &init->unkC, (Vec3f *) fire); | |
} | |
void FireObj_Fini(GlobalContext *globalCtx, FireObj *fire) { | |
Collider_DestroyCylinder(globalCtx, &fire->collision); | |
FireObj_FiniLight(globalCtx, &fire->light); | |
} | |
void FireObj_SetState2(FireObj *fire, f32 dynamicSizeStep, u8 newState) { | |
FireObj_SetState(fire, dynamicSizeStep, newState & 0xFF); | |
} | |
void FireObj_Update(GlobalContext *globalCtx, FireObj *fire) { | |
Actor *sp20; | |
Actor *temp_v0; | |
arg2 = MIPS2C_ERROR(Read from unset register $a2); | |
temp_v0 = fire->collision.base.ac; | |
sp20 = temp_v0; | |
FireObj_UpdateStateTransitions(globalCtx, fire); | |
if (fire->state == 3) { | |
if (((fire->collision.base.acFlags & 2) != 0) && ((fire->collision.info.acHitInfo->toucher.dmgFlags & 0x800) != 0)) { | |
FireObj_SetState(fire, fire->dynamicSizeStep, 0U); | |
} | |
} else if (((fire->collision.base.acFlags & 2) != 0) && (temp_v0->update != 0) && (temp_v0->id == 0xF)) { | |
temp_v0->params = 0; | |
temp_v0->unk_1C0 = 0x800; | |
} | |
fire->collision.dim.pos.x = (s16) (s32) fire->position.x; | |
fire->collision.dim.pos.y = (s16) (s32) fire->position.y; | |
fire->collision.dim.pos.z = (s16) (s32) fire->position.z; | |
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, (Collider *) &fire->collision); | |
FireObj_UpdateLight(globalCtx, &fire->light, fire); | |
} | |
[INFO] [FAIL] mm_ctx:code/z_kankyo.text.s | |
[INFO] Output of ../mm/asm/code/z_kankyo.text.s changed! Diff: | |
--- | |
+++ | |
@@ -426,101 +426,101 @@ | |
struct _mips2c_stack_func_800FE5D0 { | |
/* 0x00 */ char pad_0[0x1F]; | |
/* 0x1F */ u8 sp1F; /* inferred */ | |
}; /* size = 0x20 */ | |
struct _mips2c_stack_func_800FE610 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FE620 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FE658 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FE6F8 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FE778 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FE788 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FE798 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FE7A8 { | |
/* 0x00 */ char pad_0[0x1C]; | |
/* 0x1C */ s32 sp1C; /* inferred */ | |
/* 0x20 */ char pad_20[4]; | |
/* 0x24 */ f32 sp24; /* inferred */ | |
}; /* size = 0x28 */ | |
struct _mips2c_stack_func_800FE9B4 { | |
/* 0x00 */ char pad_0[0x18]; | |
/* 0x18 */ s32 sp18; /* inferred */ | |
/* 0x1C */ char pad_1C[3]; | |
/* 0x1F */ u8 sp1F; /* inferred */ | |
}; /* size = 0x20 */ | |
struct _mips2c_stack_func_800FEA50 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FEAB0 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FEAC0 {}; /* size 0x0 */ | |
struct _mips2c_stack_func_800FEAF4 {}; /* size 0x0 */ | |
struct _mips2c_stack_get_current_day {}; /* size 0x0 */ | |
struct _mips2c_stack_get_days_elapsed {}; /* size 0x0 */ | |
struct _mips2c_stack_reset_days_elapsed {}; /* size 0x0 */ | |
? func_8013EE24(); /* extern */ | |
? func_8013EE38(); /* extern */ | |
-? func_80143624(f32, void *, s32, s32, s32, u32); /* extern */ | |
+? func_80143624(f32, void *, s32, s32, s32, u32, u32, u32); /* extern */ | |
s32 func_80169FFC(GlobalContext *, void *, void *, void *); /* extern */ | |
s32 func_80178A34(s32, s32); /* extern */ | |
? func_801A2544(s32, u8, u8, SaveContext *); /* extern */ | |
? func_801A25E4(s32, u8, u8, SaveContext *); /* extern */ | |
? func_801A47DC(?, ?, ?, GlobalContext *); /* extern */ | |
? func_801A4A28(u8, u8, u8, SaveContext *); /* extern */ | |
s32 Kankyo_IsSceneUpsideDown(GlobalContext *arg0, GraphicsContext *); /* static */ | |
void func_800F5090(s32 arg0, GlobalContext *arg1); /* static */ | |
s32 func_800F50D4(s32 arg0); /* static */ | |
f32 func_800F5A8C(u16 arg0, u16 arg1, u16 arg2, s32, s32); /* static */ | |
f32 func_800F5B10(s32 arg0, s32 arg1, s32 arg2, s32 arg3, u16 arg4); /* static */ | |
void func_800F5CD0(s32 arg0, void *arg1, void *arg2); /* static */ | |
void func_800F6834(void *arg0, s8 arg1); /* static */ | |
void func_800F694C(void *arg0); /* static */ | |
void func_800F6A04(); /* static */ | |
void func_800F6A40(GlobalContext *arg0); /* static */ | |
void func_800F6AB8(); /* static */ | |
void func_800F6CEC(GlobalContext *arg0, u8 arg1, ? *arg2, LightSettings *arg3); /* static */ | |
u8 func_800F6EA4(f32 arg0, f32 arg1, f32 arg2, f32); /* static */ | |
void func_800F8554(GlobalContext *arg0); /* static */ | |
void func_800F88C4(s32 arg0, s32, u8, s32); /* static */ | |
void func_800F8970(); /* static */ | |
void func_800F8A9C(GlobalContext *arg0); /* static */ | |
void func_800F8CD4(GlobalContext *arg0, EnvironmentContext *arg1, LightContext *arg2, void *arg3, s32 arg4, s16 *arg5); /* static */ | |
void func_800F8D84(GlobalContext *arg0); /* static */ | |
void func_800F9728(GlobalContext *arg0, ? arg1, ? arg2, ? arg3, ? arg4); /* static */ | |
f32 func_800FA39C(); /* static */ | |
void func_800FA3C4(GameState *arg0, GameState *arg1, GraphicsContext *arg2, GameState *); /* static */ | |
void func_800FA9FC(GlobalContext *arg0, GameState *arg1, GraphicsContext *arg2); /* static */ | |
void func_800FAAB4(void *arg0, s32 arg1); /* static */ | |
void func_800FAC20(GraphicsContext **arg0); /* static */ | |
void func_800FAF74(GraphicsContext **arg0, u8 arg1, u8 arg2, u8 arg3, u8 arg4); /* static */ | |
void func_800FB010(GlobalContext *arg0); /* static */ | |
void func_800FB388(GraphicsContext **arg0, ? arg1); /* static */ | |
void func_800FB758(GlobalContext *arg0); /* static */ | |
void func_800FB9B4(GlobalContext *arg0); /* static */ | |
void func_800FBCBC(GlobalContext *arg0); /* static */ | |
void func_800FBDEC(GlobalContext *arg0); /* static */ | |
void func_800FC158(GlobalContext *arg0); /* static */ | |
void func_800FC3DC(GlobalContext *arg0); /* static */ | |
void func_800FC444(void *arg0, u8 arg1, u8 arg2, u8 arg3, u8 arg4, u8 arg5); /* static */ | |
void func_800FC64C(void *arg0, s32 arg1); /* static */ | |
? func_800FD2B4(void *arg0, GlobalContext *arg1, f32 arg2, f32 arg3, f32 arg4); /* static */ | |
void func_800FD698(void *arg0, s16 arg1, s16 arg2, f32 arg3); /* static */ | |
? func_800FD768(); /* static */ | |
void func_800FD980(GraphicsContext **arg0); /* static */ | |
void func_800FDAF8(void **arg0, f32 arg1, f32 arg2, u32 arg3, s32 arg4); /* static */ | |
void func_800FDC94(GlobalContext *arg0, Gfx **arg1); /* static */ | |
void func_800FE390(GraphicsContext **arg0); /* static */ | |
void func_800FE3E0(GlobalContext *arg0); /* static */ | |
@@ -1012,143 +1012,148 @@ | |
} | |
temp_f2 = (f32) temp_a1; | |
temp_f0 = (f32) temp_a0; | |
if ((temp_f0 <= temp_f2) || (temp_f12 = temp_f0 - temp_f2, temp_f16 = (f32) (arg3 & 0xFFFF), temp_f18 = (f32) arg4, (temp_f12 < (temp_f16 + temp_f18)))) { | |
return 0.0f; | |
} | |
temp_f22 = 1.0f / (((2.0f * temp_f12) - temp_f16) - temp_f18); | |
if (temp_f16 != 0.0f) { | |
temp_f14 = (f32) temp_a2 - temp_f2; | |
phi_f14 = temp_f14; | |
if (temp_f14 <= temp_f16) { | |
return (temp_f22 * temp_f14 * temp_f14) / temp_f16; | |
} | |
phi_f20 = temp_f22 * temp_f16; | |
goto block_12; | |
} | |
phi_f14 = (f32) temp_a2 - temp_f2; | |
phi_f20 = 0.0f; | |
block_12: | |
if (phi_f14 <= (temp_f12 - temp_f18)) { | |
return phi_f20 + (2.0f * temp_f22 * (phi_f14 - temp_f16)); | |
} | |
temp_f20 = phi_f20 + (2.0f * temp_f22 * ((temp_f12 - temp_f16) - temp_f18)); | |
phi_f20_2 = temp_f20; | |
if (temp_f18 != 0.0f) { | |
temp_f20_2 = temp_f20 + (temp_f22 * temp_f18); | |
phi_f20_2 = temp_f20_2; | |
if (phi_f14 < temp_f12) { | |
temp_f2_2 = temp_f12 - phi_f14; | |
phi_f20_2 = temp_f20_2 - ((temp_f22 * temp_f2_2 * temp_f2_2) / temp_f18); | |
} | |
} | |
return phi_f20_2; | |
} | |
void func_800F5CD0(s32 arg0, void *arg1, void *arg2) { | |
u32 sp54; | |
u8 sp4F; | |
u8 sp4E; | |
u8 sp4D; | |
u8 sp4C; | |
u8 sp4B; | |
f32 sp44; | |
DmaRequest *sp3C; | |
void *sp38; | |
s32 sp34; | |
GameInfo *temp_v0_3; | |
OSMesgQueue *temp_a0_3; | |
OSMesgQueue *temp_a0_4; | |
f32 temp_f0; | |
+ f32 temp_f16; | |
f32 temp_f18; | |
f32 temp_f18_2; | |
f32 temp_f2; | |
+ f32 temp_f6; | |
s32 temp_a0; | |
s32 temp_a3; | |
s32 temp_t2_3; | |
s32 temp_t4; | |
u16 temp_a0_2; | |
u16 temp_t0; | |
u16 temp_t7; | |
u16 temp_t8; | |
u16 temp_v0; | |
u8 temp_a1; | |
u8 temp_ra; | |
u8 temp_t1; | |
u8 temp_t1_2; | |
u8 temp_t2; | |
u8 temp_t2_2; | |
u8 temp_t3; | |
u8 temp_t5; | |
u8 temp_t6; | |
u8 temp_t7_2; | |
u8 temp_t9; | |
u8 temp_v0_2; | |
void *temp_t0_2; | |
+ void *temp_t1_3; | |
void *temp_v0_4; | |
void *temp_v0_5; | |
void *temp_v0_6; | |
void *temp_v0_7; | |
void *temp_v1; | |
void *temp_v1_2; | |
void *temp_v1_3; | |
void *temp_v1_4; | |
void *temp_v1_5; | |
void *phi_v1; | |
s32 phi_a3; | |
s16 phi_t1; | |
s32 phi_a3_2; | |
f32 phi_f0; | |
f32 phi_f18; | |
DmaRequest *phi_t2; | |
u8 phi_t1_2; | |
f32 phi_f12; | |
+ f32 phi_f16; | |
+ f32 phi_f6; | |
f32 phi_f18_2; | |
temp_a0 = arg0 & 0xFF; | |
sp4D = 0xFF; | |
sp4C = 0xFF; | |
sp4B = 0; | |
phi_t1 = 0xFF; | |
phi_f12 = (bitwise f32) 0U; | |
phi_t2 = (DmaRequest *)0xFF; | |
if ((s32) arg1->unk_17 >= 0x1C) { | |
arg1->unk_17 = 0U; | |
} | |
if ((temp_a0 == 1) || ((temp_a0 == 3) && (D_801F4E74 < 1.0f))) { | |
phi_a3 = 0; | |
if (arg1->unk_15 == 0) { | |
temp_t0 = gSaveContext.environmentTime; | |
phi_v1 = (arg1->unk_17 * 0x48) + &D_801BDCF4; | |
loop_7: | |
if (((s32) temp_t0 >= (s32) phi_v1->unk_0) && ((temp_v0 = phi_v1->unk_2, (((s32) temp_t0 < (s32) temp_v0) != 0)) || (temp_v0 == 0xFFFF))) { | |
temp_t1 = phi_v1->unk_4; | |
temp_t2 = phi_v1->unk_5; | |
if (temp_t2 == temp_t1) { | |
D_801BDBBC = 0; | |
} else { | |
D_801BDBBC = 1; | |
} | |
if (D_801BDBBC != 0) { | |
temp_v1 = (arg1->unk_17 * 0x48) + phi_a3 + &D_801BDCF4; | |
sp4E = temp_t2; | |
sp4F = temp_t1; | |
sp34 = phi_a3; | |
sp4B = (u8) (u32) (func_800F5A8C(0U, temp_v1->unk_2, temp_v1->unk_0, temp_t0 & 0xFFFF, phi_a3) * 255.0f); | |
} else { | |
sp4E = temp_t2; | |
sp4F = temp_t1; | |
temp_v1_2 = (arg1->unk_17 * 0x48) + phi_a3 + &D_801BDCF4; | |
sp34 = phi_a3; | |
if (((u32) (func_800F5A8C(0U, temp_v1_2->unk_2, temp_v1_2->unk_0, temp_t0 & 0xFFFF, phi_a3) * 255.0f) & 0xFF) < 0x80) { | |
sp4B = 0xFF; | |
} else { | |
sp4B = 0; | |
} | |
temp_v0_2 = arg1->unk_19; | |
if ((temp_v0_2 != 0) && ((s32) temp_v0_2 < 3)) { | |
arg1->unk_19 = (u8) (temp_v0_2 + 1); | |
sp4B = 0; | |
} | |
} | |
temp_v1_3 = (arg1->unk_17 * 0x48) + phi_a3 + &D_801BDCF4; | |
sp4E = phi_v1->unk_5; | |
@@ -1206,118 +1211,123 @@ | |
phi_f12 = temp_f2; | |
if ((temp_t7 & 0xFFFF) <= 0) { | |
arg1->unk_19 = 0U; | |
arg1->unk_17 = temp_a1; | |
} | |
} | |
sp3C = phi_t2; | |
if ((phi_t1_2 != arg1->unk_10) && (arg1->unk_44 == 0)) { | |
arg1->unk_44 = 1; | |
temp_v0_5 = (phi_t1_2 * 0x10) + &D_801BE4D4; | |
temp_a0_3 = arg1 + 0x68; | |
sp34 = (s32) temp_a0_3; | |
sp54 = temp_v0_5->unk_4 - temp_v0_5->unk_0; | |
sp38 = temp_v0_5; | |
sp44 = phi_f12; | |
sp4E = (u8) phi_t2; | |
sp4F = phi_t1_2; | |
osCreateMesgQueue(temp_a0_3, arg1 + 0x80, 1); | |
DmaMgr_SendRequestImpl(arg1 + 0x48, arg2->unk_168, temp_v0_5->unk_0, sp54, 0, (OSMesgQueue *) sp34, NULL); | |
arg1->unk_10 = phi_t1_2; | |
} | |
if ((sp3C != arg1->unk_11) && (arg1->unk_44 == 0)) { | |
arg1->unk_44 = 0xB; | |
temp_v0_6 = ((u8) phi_t2 * 0x10) + &D_801BE4D4; | |
temp_a0_4 = arg1 + 0x68; | |
sp54 = temp_v0_6->unk_4 - temp_v0_6->unk_0; | |
sp34 = (s32) temp_a0_4; | |
sp3C = arg1 + 0x48; | |
sp38 = temp_v0_6; | |
sp44 = phi_f12; | |
sp4E = (u8) phi_t2; | |
osCreateMesgQueue(temp_a0_4, arg1 + 0x80, 1); | |
DmaMgr_SendRequestImpl(sp3C, arg2->unk_16C, temp_v0_6->unk_0, sp54, 0, (OSMesgQueue *) sp34, NULL); | |
arg1->unk_11 = (u8) phi_t2; | |
} | |
if ((arg1->unk_44 == 1) || (arg1->unk_44 == 0xB)) { | |
sp44 = phi_f12; | |
if (osRecvMesg(arg1 + 0x68, NULL, 0) == 0) { | |
arg1->unk_44 = 0; | |
} | |
} | |
arg1->unk_13 = sp4B; | |
temp_t2_3 = sp4D * 4; | |
temp_v0_7 = temp_t2_3 + &D_801BE534; | |
temp_t3 = temp_v0_7->unk_0; | |
temp_t4 = sp4C * 4; | |
temp_v1_5 = temp_t4 + &D_801BE534; | |
temp_t5 = temp_v0_7->unk_1; | |
temp_ra = temp_v0_7->unk_2; | |
temp_t0_2 = temp_t2_3 + &D_801BE6D4; | |
+ temp_t1_3 = temp_t4 + &D_801BE6D4; | |
temp_t6 = temp_t0_2->unk_0; | |
sp38 = (void *) temp_t6; | |
+ temp_f16 = (f32) temp_t6; | |
+ phi_f16 = temp_f16; | |
if ((s32) temp_t6 < 0) { | |
- | |
+ phi_f16 = temp_f16 + 4294967296.0f; | |
} | |
temp_t7_2 = temp_t0_2->unk_1; | |
sp38 = (void *) temp_t7_2; | |
+ temp_f6 = (f32) temp_t7_2; | |
+ phi_f6 = temp_f6; | |
if ((s32) temp_t7_2 < 0) { | |
- | |
+ phi_f6 = temp_f6 + 4294967296.0f; | |
} | |
temp_t9 = temp_t0_2->unk_2; | |
sp3C = (DmaRequest *) temp_t9; | |
temp_f18_2 = (f32) temp_t9; | |
phi_f18_2 = temp_f18_2; | |
if ((s32) temp_t9 < 0) { | |
phi_f18_2 = temp_f18_2 + 4294967296.0f; | |
} | |
- func_80143624(phi_f12, arg2, (u32) ((f32) temp_t3 + ((f32) (temp_v1_5->unk_0 - temp_t3) * phi_f12)) & 0xFF, (u32) ((f32) temp_t5 + ((f32) (temp_v1_5->unk_1 - temp_t5) * phi_f12)) & 0xFF, (u32) ((f32) temp_ra + ((f32) (temp_v1_5->unk_2 - temp_ra) * phi_f12)) & 0xFF, (u32) (phi_f18_2 + ((f32) ((temp_t4 + &D_801BE6D4)->unk_2 - temp_t9) * phi_f12))); | |
+ func_80143624(phi_f12, arg2, (u32) ((f32) temp_t3 + ((f32) (temp_v1_5->unk_0 - temp_t3) * phi_f12)) & 0xFF, (u32) ((f32) temp_t5 + ((f32) (temp_v1_5->unk_1 - temp_t5) * phi_f12)) & 0xFF, (u32) ((f32) temp_ra + ((f32) (temp_v1_5->unk_2 - temp_ra) * phi_f12)) & 0xFF, (u32) (phi_f16 + ((f32) (temp_t1_3->unk_0 - temp_t6) * phi_f12)), (u32) (phi_f6 + ((f32) (temp_t1_3->unk_1 - temp_t7_2) * phi_f12)), (u32) (phi_f18_2 + ((f32) (temp_t1_3->unk_2 - temp_t9) * phi_f12))); | |
} | |
} | |
} | |
void func_800F6834(void *arg0, s8 arg1) { | |
s8 phi_a1; | |
phi_a1 = arg1; | |
if (arg1 == 0x1F) { | |
phi_a1 = 0; | |
} | |
if (arg0->unk_17022 == 0) { | |
if (D_801F4F31 == 0) { | |
D_801F4F31 = 1; | |
D_801BDBB4 = arg0->unk_17024; | |
if (phi_a1 != arg0->unk_17023) { | |
arg0->unk_17023 = phi_a1; | |
arg0->unk_17024 = phi_a1; | |
return; | |
} | |
/* Duplicate return node #13. Try simplifying control flow for better match */ | |
return; | |
} | |
if ((phi_a1 != arg0->unk_17023) && (arg0->unk_17026 == 0)) { | |
arg0->unk_17025 = 1; | |
arg0->unk_17024 = phi_a1; | |
arg0->unk_17028 = 0x14; | |
arg0->unk_17026 = (u16) arg0->unk_17028; | |
return; | |
} | |
/* Duplicate return node #13. Try simplifying control flow for better match */ | |
return; | |
} | |
if (arg0->unk_170C7 == 0xFF) { | |
if (D_801F4F31 == 0) { | |
D_801F4F31 = 1; | |
D_801BDBB4 = arg0->unk_170C5; | |
} | |
arg0->unk_170C4 = 0; | |
arg0->unk_170C7 = phi_a1; | |
} | |
} | |
void func_800F694C(void *arg0) { | |
if (arg0->unk_17022 == 0) { | |
if (D_801F4F31 != 0) { | |
D_801F4F31 = 0; | |
arg0->unk_17023 = (u8) D_801BDBB4; | |
arg0->unk_17024 = (u8) D_801BDBB4; | |
return; | |
[INFO] [FAIL] mm_ctx:code/z_sub_s.text.s | |
[INFO] Output of ../mm/asm/code/z_sub_s.text.s changed! Diff: | |
--- | |
+++ | |
@@ -2107,139 +2107,151 @@ | |
} else { | |
phi_a2 = temp_v0_2; | |
if ((s32) arg1 < (s32) temp_v0_2) { | |
phi_a2 = arg1; | |
} | |
} | |
goto block_28; | |
} | |
} else { | |
temp_f0_3 = (temp_f0 / arg3) * -1.0f; | |
if (temp_f0_3 < arg4) { | |
phi_f0_2 = arg4; | |
} else { | |
if (arg5 < temp_f0_3) { | |
phi_f16_2 = arg5; | |
} else { | |
phi_f16_2 = temp_f0_3; | |
} | |
phi_f0_2 = phi_f16_2; | |
} | |
*arg0 = temp_v0 - (s32) ((phi_f0_2 * 65536.0f) / 360.0f); | |
if (-arg4 < temp_f0) { | |
*arg0 = arg2; | |
} | |
if (arg1 != 0) { | |
temp_v0_3 = *arg0; | |
temp_a2_2 = -(s32) arg1; | |
phi_a2 = (s16) temp_a2_2; | |
if ((s32) temp_v0_3 < temp_a2_2) { | |
} else { | |
phi_a2 = temp_v0_3; | |
if ((s32) arg1 < (s32) temp_v0_3) { | |
phi_a2 = arg1; | |
} | |
} | |
block_28: | |
*arg0 = phi_a2; | |
} | |
} | |
return (s16) (temp_v0 - *arg0); | |
} | |
void func_8013D2E0(Vec3f *arg0, PosRot *arg1, ActorShape *arg2, s16 *arg3, s16 *arg4, s16 *arg5, s16 *arg6) { | |
s16 sp3C; | |
s16 sp38; | |
f32 sp34; | |
f32 sp2C; | |
f32 temp_f10; | |
+ f32 temp_f10_2; | |
f32 temp_f12; | |
f32 temp_f14; | |
f32 temp_f4; | |
+ f32 temp_f8; | |
s16 temp_v1; | |
+ u16 temp_t0; | |
u16 temp_t1; | |
+ u16 temp_t4; | |
u16 temp_t6; | |
+ f32 phi_f10; | |
f32 phi_f4; | |
- f32 phi_f10; | |
+ f32 phi_f8; | |
+ f32 phi_f10_2; | |
temp_f14 = arg0->x - arg1->pos.x; | |
temp_f12 = arg0->z - arg1->pos.z; | |
sp34 = temp_f14; | |
sp2C = temp_f12; | |
sp3C = Math_FAtan2F(temp_f12, temp_f14); | |
Math_SmoothStepToS(arg3, Math_FAtan2F(sqrtf((sp34 * sp34) + (sp2C * sp2C)), arg0->y - arg1->pos.y), 4, 0x2710, (s16) 0); | |
Math_SmoothStepToS(arg3 + 2, sp3C, 4, 0x2710, (s16) 0); | |
func_8013D0E0(arg5, arg6->unk_10, func_8013D0E0(arg4, arg6->unk_0, arg3->unk_0, (f32) arg6->unk_2, (f32) arg6->unk_4, (f32) arg6->unk_6), (f32) arg6->unk_2, (f32) arg6->unk_14, (f32) arg6->unk_16); | |
temp_v1 = arg3->unk_2 - arg2->rot.y; | |
- if ((s32) arg6->unk_C < 0) { | |
- | |
+ temp_t0 = arg6->unk_C; | |
+ temp_f10 = (f32) temp_t0; | |
+ phi_f10 = temp_f10; | |
+ if ((s32) temp_t0 < 0) { | |
+ phi_f10 = temp_f10 + 4294967296.0f; | |
} | |
temp_t1 = arg6->unk_E; | |
temp_f4 = (f32) temp_t1; | |
phi_f4 = temp_f4; | |
if ((s32) temp_t1 < 0) { | |
phi_f4 = temp_f4 + 4294967296.0f; | |
} | |
sp38 = temp_v1; | |
- func_8013D0E0(arg4 + 2, arg6->unk_8, (s16) (temp_v1 - arg5->unk_2), (f32) arg6->unk_A, phi_f4); | |
- if ((s32) arg6->unk_1C < 0) { | |
- | |
+ func_8013D0E0(arg4 + 2, arg6->unk_8, (s16) (temp_v1 - arg5->unk_2), (f32) arg6->unk_A, phi_f10, phi_f4); | |
+ temp_t4 = arg6->unk_1C; | |
+ temp_f8 = (f32) temp_t4; | |
+ phi_f8 = temp_f8; | |
+ if ((s32) temp_t4 < 0) { | |
+ phi_f8 = temp_f8 + 4294967296.0f; | |
} | |
temp_t6 = arg6->unk_1E; | |
- temp_f10 = (f32) temp_t6; | |
- phi_f10 = temp_f10; | |
+ temp_f10_2 = (f32) temp_t6; | |
+ phi_f10_2 = temp_f10_2; | |
if ((s32) temp_t6 < 0) { | |
- phi_f10 = temp_f10 + 4294967296.0f; | |
- } | |
- func_8013D0E0(arg5 + 2, arg6->unk_18, (s16) (temp_v1 - arg4->unk_2), (f32) arg6->unk_1A, phi_f10); | |
+ phi_f10_2 = temp_f10_2 + 4294967296.0f; | |
+ } | |
+ func_8013D0E0(arg5 + 2, arg6->unk_18, (s16) (temp_v1 - arg4->unk_2), (f32) arg6->unk_1A, phi_f8, phi_f10_2); | |
} | |
s32 func_8013D5E8(s16 arg0, s32 arg1, s16 arg2) { | |
s16 temp_v0; | |
s32 phi_v1; | |
s32 phi_v1_2; | |
temp_v0 = arg2 - arg0; | |
phi_v1 = (s32) temp_v0; | |
if ((s32) temp_v0 < 0) { | |
phi_v1 = -(s32) temp_v0; | |
} | |
phi_v1_2 = 0; | |
if ((s32) (s16) arg1 >= phi_v1) { | |
phi_v1_2 = 1; | |
} | |
return phi_v1_2; | |
} | |
Path *func_8013D648(GlobalContext *globalCtx, s16 arg1, s32 arg2) { | |
Path *phi_v1; | |
phi_v1 = NULL; | |
if (arg1 != (s16) arg2) { | |
phi_v1 = &globalCtx->setupPathList[arg1]; | |
} | |
return phi_v1; | |
} | |
s32 func_8013D68C(Path *path, s16 arg1, void *arg2) { | |
s16 *temp_v1; | |
if (path == 0) { | |
return 0; | |
} | |
temp_v1 = ((s32) arg1 * 6) + Lib_SegmentedToVirtual(path->points); | |
arg2->unk_0 = (f32) temp_v1->unk_0; | |
arg2->unk_4 = (f32) temp_v1->unk_2; | |
arg2->unk_8 = (f32) temp_v1->unk_4; | |
return 1; | |
} | |
void func_8013D720(void *arg0, PosRot *arg1, f32 *arg2) { | |
f32 temp_f12; | |
f32 temp_f14; | |
temp_f12 = arg0->unk_0 - arg1->pos.x; | |
temp_f14 = arg0->unk_8 - arg1->pos.z; | |
*arg2 = (temp_f12 * temp_f12) + (temp_f14 * temp_f14); | |
Math_Atan2S(temp_f12, temp_f14); | |
[INFO] [FAIL] mm_ctx:overlays/ovl_En_Arrow/ovl_En_Arrow.text.s | |
[INFO] Output of ../mm/asm/overlays/ovl_En_Arrow/ovl_En_Arrow.text.s changed! Diff: | |
--- | |
+++ | |
@@ -495,166 +495,166 @@ | |
return; | |
} | |
/* Duplicate return node #15. Try simplifying control flow for better match */ | |
} | |
} | |
void func_8088ACE0(EnArrow *this, GlobalContext *globalCtx) { | |
CollisionPoly *spAC; | |
u32 spA8; | |
f32 sp9C; | |
f32 sp94; | |
CollisionPoly *sp90; | |
? sp84; | |
u16 sp82; | |
Actor *sp7C; | |
f32 sp78; | |
f32 sp74; | |
? sp60; | |
f32 sp54; | |
s32 sp50; | |
Vec3f *sp44; | |
PosRot *sp40; | |
CollisionContext *sp3C; | |
Actor *temp_v0_4; | |
Actor *temp_v0_5; | |
Actor *temp_v0_6; | |
Actor *temp_v0_7; | |
Actor *temp_v0_8; | |
PosRot *temp_a1; | |
PosRot *temp_a1_2; | |
PosRot *temp_a1_4; | |
PosRot *temp_a3; | |
Vec3f *temp_a1_3; | |
f32 temp_f0; | |
f32 temp_f12; | |
f32 temp_f12_2; | |
f32 temp_f2; | |
f32 temp_f2_2; | |
s16 temp_v1_2; | |
s16 temp_v1_3; | |
s32 temp_a2; | |
s32 temp_v0; | |
s32 temp_v0_2; | |
u8 temp_t6; | |
u8 temp_t7; | |
u8 temp_v0_3; | |
u8 temp_v1; | |
s32 phi_v0; | |
s32 phi_v0_2; | |
s32 phi_a2; | |
- f32 phi_t2; | |
+ s32 phi_t2; | |
u16 phi_a3; | |
f32 phi_f0; | |
f32 phi_f0_2; | |
f32 phi_f0_3; | |
s32 phi_a2_2; | |
temp_v1 = this->unk_260; | |
temp_t6 = temp_v1 - 1; | |
phi_a2 = 0; | |
phi_a2_2 = 0; | |
if (temp_v1 == 0) { | |
phi_v0 = 0; | |
} else { | |
this->unk_260 = temp_t6; | |
phi_v0 = temp_t6 & 0xFF; | |
} | |
if ((phi_v0 == 0) || ((temp_v1_2 = this->actor.params, temp_v0 = temp_v1_2 != 0, phi_v0_2 = temp_v0, (temp_v1_2 == 7)) && ((this->unk_262 != 0) || (temp_a2 = (this->unk_1A8.base.atFlags & 2) != 0, phi_a2 = temp_a2, phi_a2_2 = temp_a2, (temp_a2 != 0))))) { | |
if (this->actor.params == 7) { | |
if ((phi_a2_2 != 0) && (this->unk_1A8.info.atHitInfo->elemType != 4) && ((this->unk_1A8.base.atFlags & 4) != 0) && (temp_v0_8 = this->unk_1A8.base.at, (temp_v0_8 != 0)) && (temp_v0_8->id != 0x39)) { | |
Math_Vec3f_Copy((Vec3f *) &this->actor.world, &this->actor.prevPos); | |
this->actor.world.rot.y += (s32) randPlusMinusPoint5Scaled(8000.0f) + 0x8000; | |
this->actor.velocity.y = -this->actor.velocity.y; | |
this->unk_149 = -1; | |
return; | |
} | |
if ((this->unk_262 != 0) || (phi_a2_2 != 0)) { | |
EffectSsStone1_Spawn(globalCtx, &this->actor.world, 0); | |
} | |
temp_a1_4 = &this->actor.world; | |
sp40 = temp_a1_4; | |
Audio_PlaySoundAtPosition(globalCtx, (Vec3f *) temp_a1_4, 0x14, 0x1854U); | |
if ((this->unk_262 != 0) && (this->actor.wallBgId == 0x32)) { | |
Math_Vec3f_Copy((Vec3f *) &sp84, (Vec3f *) sp40); | |
sp90 = this->actor.wallPoly; | |
sp94 = this->unk_144; | |
EffectSs_Spawn(globalCtx, 0x26, 0x80, &sp84); | |
} | |
goto block_20; | |
} | |
block_20: | |
Actor_MarkForDeath((Actor *) this); | |
return; | |
} | |
if (temp_v0 != 0) { | |
temp_v0_2 = (s32) temp_v1_2 < 8; | |
phi_v0_2 = temp_v0_2; | |
if (temp_v0_2 != 0) { | |
phi_v0_2 = (this->unk_1A8.base.atFlags & 2) != 0; | |
} | |
} | |
if ((phi_v0_2 != 0) || (this->unk_262 != 0)) { | |
if ((s32) temp_v1_2 >= 6) { | |
phi_a3 = 0x1825U; | |
if (phi_v0_2 != 0) { | |
this->actor.world.pos.x = (this->actor.world.pos.x + this->actor.prevPos.x) * 0.5f; | |
this->actor.world.pos.y = (this->actor.world.pos.y + this->actor.prevPos.y) * 0.5f; | |
this->actor.world.pos.z = (this->actor.world.pos.z + this->actor.prevPos.z) * 0.5f; | |
} | |
if (this->actor.params == 8) { | |
gGameInfo->data[0x692] = -1; | |
- phi_t2 = 0.0f; | |
+ phi_t2 = 0; | |
if (this->actor.speedXZ == 0.0f) { | |
- phi_t2 = 1e-45.0f; | |
+ phi_t2 = 1; | |
} | |
- Actor_Spawn(&globalCtx->actorCtx, globalCtx, 0x34, this->actor.world.pos.x, phi_t2); | |
+ Actor_Spawn(&globalCtx->actorCtx, globalCtx, 0x34, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, (s16) 0, (s16) 0, (s16) 0, (s16) phi_t2); | |
phi_a3 = 0x182BU; | |
} | |
temp_a1_2 = &this->actor.world; | |
sp40 = temp_a1_2; | |
sp82 = phi_a3; | |
EffectSsStone1_Spawn(globalCtx, temp_a1_2, 0, phi_a3); | |
Audio_PlaySoundAtPosition(globalCtx, (Vec3f *) temp_a1_2, 0x14, phi_a3); | |
Actor_MarkForDeath((Actor *) this); | |
} else { | |
temp_a3 = &this->actor.world; | |
sp40 = temp_a3; | |
sp50 = phi_v0_2; | |
EffectSsHitMark_SpawnCustomScale(globalCtx, 0, 0x96, temp_a3); | |
if ((phi_v0_2 != 0) && (this->unk_1A8.info.atHitInfo->elemType != 4)) { | |
temp_v0_4 = this->unk_1A8.base.at; | |
if ((temp_v0_4->update != 0) && ((this->unk_1A8.base.atFlags & 4) == 0) && ((temp_v0_4->flags & 0x4000) != 0)) { | |
this->unk_264 = temp_v0_4; | |
sp7C = temp_v0_4; | |
func_8088A894(this, globalCtx); | |
Math_Vec3f_Diff((Vec3f *) &temp_v0_4->world, (Vec3f *) sp40, &this->unk_268); | |
temp_v0_4->flags |= 0x8000; | |
this->unk_1A8.base.atFlags &= 0xFFFD; | |
this->actor.speedXZ *= 0.5f; | |
this->actor.velocity.y *= 0.5f; | |
} else { | |
temp_t7 = this->unk_261 | 1; | |
this->unk_261 = temp_t7; | |
this->unk_261 = temp_t7 | 2; | |
Math_Vec3f_Copy((Vec3f *) sp40, &this->actor.prevPos); | |
func_8088A7D8(globalCtx, this); | |
Audio_PlayActorSound2((Actor *) this, 0x1814U); | |
} | |
} else if (this->unk_262 != 0) { | |
this->actionFunc = func_8088B630; | |
SkelAnime_ChangeAnimDefaultStop(&this->unk_144, (AnimationHeader *) &D_040128BC); | |
if ((s32) this->actor.params >= 0) { | |
this->unk_260 = 0x3C; | |
} else { | |
this->unk_260 = 0x14; | |
} | |
temp_v1_3 = this->actor.params; | |
if (((s32) temp_v1_3 >= 3) && ((s32) temp_v1_3 < 6)) { | |
this->actor.draw = NULL; | |
} | |
Audio_PlayActorSound2((Actor *) this, 0x1815U); | |
this->unk_261 |= 1; | |
} | |
} | |
} else { | |
func_8088AA98((Actor *) this, globalCtx, phi_a2); | |
[INFO] [FAIL] mm_ctx:overlays/ovl_En_Bigslime/ovl_En_Bigslime.text.s | |
[INFO] Output of ../mm/asm/overlays/ovl_En_Bigslime/ovl_En_Bigslime.text.s changed! Diff: | |
--- | |
+++ | |
@@ -4603,101 +4603,101 @@ | |
temp_s2 = arg1->state.gfxCtx; | |
sp80 = arg1 + 0x818; | |
sp88 = &D_060113B0; | |
phi_s1_4 = &spB4; | |
do { | |
temp_s0 = (arg0 + (*phi_s1_4 * 4))->unk_A08; | |
temp_v0_2 = LightContext_NewLights(sp80, arg1->state.gfxCtx); | |
temp_s6 = temp_s0 + 0x24; | |
temp_s3 = temp_v0_2; | |
Lights_BindAll(temp_v0_2, arg1->lightCtx.listHead, temp_s6, arg1); | |
Lights_Draw(temp_s3, arg1->state.gfxCtx); | |
func_8012C2DC(arg1->state.gfxCtx); | |
func_800B8118(temp_s0, arg1, 0); | |
SysMatrix_SetStateRotationAndTranslation(temp_s0->world.pos.x, temp_s0->world.pos.y, temp_s0->world.pos.z, (Vec3s *) &temp_s0->shape); | |
Matrix_Scale(temp_s0->scale.x, temp_s0->scale.y, temp_s0->scale.z, 1); | |
temp_v0_3 = temp_s2->polyXlu.p; | |
temp_s2->polyXlu.p = temp_v0_3 + 8; | |
temp_v0_3->words.w0 = 0xFA000080; | |
temp_v0_3->words.w1 = temp_s0->shape.shadowAlpha | ~0xFF; | |
temp_v0_4 = temp_s2->polyXlu.p; | |
temp_s2->polyXlu.p = temp_v0_4 + 8; | |
temp_v0_4->words.w0 = 0xDA380003; | |
temp_v0_4->words.w1 = Matrix_NewMtx(arg1->state.gfxCtx); | |
temp_v0_5 = temp_s2->polyXlu.p; | |
temp_s2->polyXlu.p = temp_v0_5 + 8; | |
temp_v0_5->words.w0 = 0xDE000000; | |
temp_v0_5->words.w1 = (u32) sp88; | |
if ((s32) temp_s0->unk_148 > 0) { | |
SysMatrix_InsertTranslation(0.0f, (0.1f - temp_s0->unk_150) * -4000.0f, 0.0f, 1); | |
Matrix_Scale(0.1f, temp_s0->unk_150, 0.1f, 1); | |
AnimatedMat_Draw(arg1, arg0->minislimeFrozenTex); | |
temp_v0_6 = temp_s2->polyXlu.p; | |
temp_s2->polyXlu.p = temp_v0_6 + 8; | |
temp_v0_6->words.w0 = 0xFA000080; | |
temp_v0_6->words.w1 = temp_s0->unk_148 | ~0xFF; | |
temp_v0_7 = temp_s2->polyXlu.p; | |
temp_s2->polyXlu.p = temp_v0_7 + 8; | |
temp_v0_7->words.w0 = 0xDA380003; | |
temp_v0_7->words.w1 = Matrix_NewMtx(arg1->state.gfxCtx); | |
temp_v0_8 = temp_s2->polyXlu.p; | |
temp_s2->polyXlu.p = temp_v0_8 + 8; | |
temp_v0_8->words.w1 = (u32) &D_06010DB0; | |
temp_v0_8->words.w0 = 0xDE000000; | |
} | |
temp_t5 = temp_s0->shape.shadowAlpha; | |
temp_f6 = (f32) temp_t5; | |
phi_f6 = temp_f6; | |
if ((s32) temp_t5 < 0) { | |
phi_f6 = temp_f6 + 4294967296.0f; | |
} | |
- func_808EC708(temp_s6, (GraphicsContext **) arg1, (u32) &D_06011050, temp_s0->scale.x * 0.4f * 0.1f, phi_f6 * 0.6862745f); | |
+ func_808EC708(temp_s6, (GraphicsContext **) arg1, (u32) &D_06011050, temp_s0->scale.x * 0.4f * 0.1f, temp_s0->scale.z * 0.4f * 0.1f, temp_s0->scale.y * 400.0f, (s16) (s32) temp_s0->shape.rot.y, phi_f6 * 0.6862745f); | |
temp_s1_2 = phi_s1_4 + 4; | |
phi_s1_4 = temp_s1_2; | |
} while (temp_s1_2 != &spF0); | |
} | |
void func_808ECD14(Actor *arg0, GlobalContext *arg1) { | |
? *temp_s0_2; | |
Gfx *temp_s0; | |
Gfx *temp_s1; | |
Gfx *temp_v1; | |
Gfx *temp_v1_2; | |
Gfx *temp_v1_3; | |
Gfx *temp_v1_4; | |
Gfx *temp_v1_5; | |
Gfx *temp_v1_6; | |
Gfx *temp_v1_7; | |
GraphicsContext *temp_s4; | |
MtxF *temp_s2; | |
s32 temp_v0; | |
void *temp_v0_2; | |
? *phi_s0; | |
func_8012C2DC(arg1->state.gfxCtx); | |
func_800B8118(arg0, arg1, 0); | |
temp_s4 = arg1->state.gfxCtx; | |
temp_v1 = temp_s4->polyXlu.p; | |
temp_s4->polyXlu.p = temp_v1 + 8; | |
temp_v1->words.w0 = 0xDB060024; | |
temp_v1->words.w1 = (u32) ((arg0->unk_2B1 * 0xA20) + &D_808EE060); | |
temp_s0 = temp_s4->polyXlu.p; | |
temp_s4->polyXlu.p = temp_s0 + 8; | |
temp_s0->words.w0 = 0xDA380003; | |
temp_s0->words.w1 = Matrix_NewMtx(arg1->state.gfxCtx); | |
temp_v1_2 = temp_s4->polyXlu.p; | |
temp_s4->polyXlu.p = temp_v1_2 + 8; | |
temp_v1_2->words.w1 = (u32) &D_06010530; | |
temp_v1_2->words.w0 = 0xDE000000; | |
temp_v1_3 = temp_s4->polyXlu.p; | |
temp_s4->polyXlu.p = temp_v1_3 + 8; | |
temp_v1_3->words.w1 = (u32) &D_060105E8; | |
temp_v1_3->words.w0 = 0xDE000000; | |
temp_v0 = arg0->unk_188; | |
if ((func_808E9AE0 == temp_v0) || (func_808E9DD0 == temp_v0) || (func_808EA1C8 == temp_v0) || (func_808E9FC0 == temp_v0)) { | |
AnimatedMat_Draw(arg1, arg0->unk_A48); | |
temp_v1_4 = temp_s4->polyXlu.p; | |
temp_s4->polyXlu.p = temp_v1_4 + 8; | |
temp_v1_4->words.w1 = (u32) &D_808EF4A0; | |
temp_v1_4->words.w0 = 0xDB060024; | |
temp_v1_5 = temp_s4->polyXlu.p; | |
temp_s4->polyXlu.p = temp_v1_5 + 8; | |
[INFO] [FAIL] mm_ctx:overlays/ovl_En_Po_Composer/ovl_En_Po_Composer.text.s | |
[INFO] Output of ../mm/asm/overlays/ovl_En_Po_Composer/ovl_En_Po_Composer.text.s changed! Diff: | |
--- | |
+++ | |
@@ -954,52 +954,52 @@ | |
if (temp_v0_10 != 0) { | |
if (temp_v0_10 == 0xFF) { | |
Scene_SetRenderModeXlu(globalCtx, 0, 1U); | |
phi_v1 = temp_s1->polyOpa.p; | |
} else { | |
Scene_SetRenderModeXlu(globalCtx, 1, 2U); | |
phi_v1 = temp_s1->polyXlu.p; | |
} | |
phi_v1->words.w0 = 0xE7000000; | |
phi_v1->words.w1 = 0; | |
phi_v1->unk_8 = 0xFB000000; | |
phi_v1->unk_C = (s32) ((this->unk_33A << 0x18) | (this->unk_33B << 0x10) | (this->unk_33C << 8) | this->unk_339); | |
sp9C = phi_v1; | |
SysMatrix_SetCurrentState(&this->unk_238); | |
phi_v1->unk_10 = 0xDA380003; | |
sp9C = phi_v1; | |
phi_v1->unk_14 = Matrix_NewMtx(globalCtx->state.gfxCtx); | |
phi_v1->unk_18 = 0xDE000000; | |
phi_v1->unk_1C = &D_06006E08; | |
phi_v1->unk_24 = &D_06006F38; | |
phi_v1->unk_20 = 0xDE000000; | |
phi_v1->unk_28 = 0xE7000000; | |
phi_v1->unk_2C = 0; | |
phi_v1->unk_30 = 0xFB000000; | |
phi_v1->unk_34 = (s32) ((sp98->unk_0 << 0x18) | (sp98->unk_1 << 0x10) | (sp98->unk_2 << 8) | this->unk_339); | |
phi_v1->unk_3C = &D_06006EA8; | |
phi_v1->unk_38 = 0xDE000000; | |
if (this->unk_339 == 0xFF) { | |
temp_s1->polyOpa.p = phi_v1 + 0x40; | |
} else { | |
temp_s1->polyXlu.p = phi_v1 + 0x40; | |
} | |
} | |
SysMatrix_SetCurrentState(&globalCtx->mf_187FC); | |
SysMatrix_GetStateTranslationAndScaledZ(15.0f, (Vec3f *) &sp88); | |
temp_t5 = this->unk_190.elements; | |
sp80.unk_0 = (s32) (unaligned s32) temp_t5->unk_30; | |
sp80.unk_4 = (u16) temp_t5->dim.worldSphere.center.z; | |
temp_t5_2 = sp80 + (s32) sp88; | |
temp_t8 = sp82 + (s32) sp8C; | |
sp80 = temp_t5_2; | |
sp82 = temp_t8; | |
temp_t2 = sp84 + (s32) sp90; | |
sp84 = temp_t2; | |
temp_t3 = this->unk_33D; | |
temp_f6 = (f32) temp_t3; | |
phi_f6 = temp_f6; | |
if ((s32) temp_t3 < 0) { | |
phi_f6 = temp_f6 + 4294967296.0f; | |
} | |
- Lights_PointGlowSetInfo(&this->unk_27C, temp_t5_2, temp_t8, temp_t2, (u8) (s32) (phi_f6 * 0.78431374f)); | |
-} | |
+ Lights_PointGlowSetInfo(&this->unk_27C, temp_t5_2, temp_t8, temp_t2, (u8) (s32) this->unk_33A, (u8) (s32) this->unk_33B, (u8) (s32) this->unk_33C, (s16) (s32) (phi_f6 * 0.78431374f)); | |
+} | |
[INFO] [FAIL] mm_ctx:overlays/ovl_En_Po_Sisters/ovl_En_Po_Sisters.text.s | |
[INFO] Output of ../mm/asm/overlays/ovl_En_Po_Sisters/ovl_En_Po_Sisters.text.s changed! Diff: | |
--- | |
+++ | |
@@ -1602,213 +1602,237 @@ | |
} | |
s32 func_80B1CB44(GlobalContext *arg0, s32 arg1, Gfx **arg2, Vec3f *arg3, s16 *arg4, Actor *arg5, Gfx **arg6) { | |
Gfx *temp_a1; | |
Gfx *temp_a1_2; | |
Gfx *temp_a1_3; | |
Gfx *temp_a1_4; | |
s16 temp_a0; | |
void *temp_v1; | |
if ((arg1 == 1) && ((arg5->unk_191 & 0x40) != 0)) { | |
temp_a0 = arg5->unk_192; | |
if ((s32) temp_a0 >= 0x11C) { | |
*arg4 = *arg4 + (temp_a0 << 0xC) + 0xFFEE4000; | |
} else { | |
*arg4 = *arg4 + (temp_a0 << 0xC) + 0xFFFF1000; | |
} | |
} | |
if ((arg5->unk_229 == 0) || (arg1 == 8) || ((func_80B1BA90 == arg5->unk_188) && ((s32) arg5->unk_192 >= 8))) { | |
*arg2 = NULL; | |
} else if (arg1 == 9) { | |
*arg2 = *(&D_80B1DACC + (arg5->unk_18C * 4)); | |
} else if (arg1 == 0xA) { | |
*arg2 = *(&D_80B1DADC + (arg5->unk_18C * 4)); | |
temp_a1 = *arg6; | |
*arg6 = temp_a1 + 8; | |
temp_a1->words.w1 = 0; | |
temp_a1->words.w0 = 0xE7000000; | |
temp_a1_2 = *arg6; | |
*arg6 = temp_a1_2 + 8; | |
temp_a1_2->words.w0 = 0xFB000000; | |
temp_a1_2->words.w1 = (arg5->unk_226 << 0x18) | (arg5->unk_227 << 0x10) | (arg5->unk_228 << 8) | arg5->unk_229; | |
} else if (arg1 == 0xB) { | |
temp_v1 = (arg5->unk_18C * 4) + &D_80B1DAEC; | |
temp_a1_3 = *arg6; | |
*arg6 = temp_a1_3 + 8; | |
temp_a1_3->words.w1 = 0; | |
temp_a1_3->words.w0 = 0xE7000000; | |
temp_a1_4 = *arg6; | |
*arg6 = temp_a1_4 + 8; | |
temp_a1_4->words.w0 = 0xFB000000; | |
temp_a1_4->words.w1 = (temp_v1->unk_0 << 0x18) | (temp_v1->unk_1 << 0x10) | (temp_v1->unk_2 << 8) | arg5->unk_229; | |
} | |
return 0; | |
} | |
void func_80B1CD34(GraphicsContext **arg0, s32 arg1, Gfx **arg2, Vec3s *arg3, Actor *arg4, s32 **arg5) { | |
s32 *sp40; | |
void *sp38; | |
s8 *sp34; | |
+ f32 temp_f10; | |
+ f32 temp_f16; | |
+ f32 temp_f18; | |
f32 temp_f2; | |
f32 temp_f6; | |
f32 temp_f8; | |
+ f32 temp_f8_2; | |
s32 *temp_v0_2; | |
s32 *temp_v0_3; | |
s32 temp_v0_4; | |
s32 temp_v0_5; | |
s8 *temp_a2; | |
s8 temp_v0; | |
u8 temp_t2; | |
+ u8 temp_t2_2; | |
u8 temp_t5; | |
+ u8 temp_t6; | |
+ u8 temp_t9; | |
+ u8 temp_t9_2; | |
void *temp_a0; | |
void *temp_a1; | |
void *temp_v0_6; | |
void *temp_v1; | |
s8 *phi_a2; | |
void *phi_a0; | |
void *phi_v1; | |
s32 phi_v0; | |
+ f32 phi_f16; | |
+ f32 phi_f10; | |
f32 phi_f8; | |
+ f32 phi_f8_2; | |
+ f32 phi_f18; | |
f32 phi_f6; | |
temp_a2 = arg1 + &D_80B1DB08; | |
temp_v0 = *temp_a2; | |
phi_a2 = temp_a2; | |
if (temp_v0 != -1) { | |
sp34 = temp_a2; | |
SysMatrix_GetStateTranslation(arg4 + (temp_v0 * 0xC) + 0x28C); | |
goto block_8; | |
} | |
if (temp_a2 == &D_80B1DB11) { | |
sp34 = temp_a2; | |
SysMatrix_GetStateTranslationAndScaledY(-2500.0f, arg4 + 0x2BC); | |
SysMatrix_GetStateTranslationAndScaledY(3000.0f, arg4 + 0x2C8); | |
goto block_8; | |
} | |
if (temp_a2 == &D_80B1DB12) { | |
sp34 = temp_a2; | |
SysMatrix_GetStateTranslationAndScaledY(-4000.0f, arg4 + 0x2D4); | |
goto block_8; | |
} | |
if (temp_a2 == &D_80B1DB13) { | |
sp34 = temp_a2; | |
SysMatrix_GetStateTranslationAndScaledX(3000.0f, arg4 + 0x2E0); | |
block_8: | |
phi_a2 = sp34; | |
} | |
if ((func_80B1BA90 == arg4->unk_188) && ((s32) arg4->unk_192 >= 8) && (phi_a2 == &D_80B1DB11)) { | |
temp_v0_2 = *arg5; | |
*arg5 = temp_v0_2 + 8; | |
*temp_v0_2 = 0xDA380003; | |
sp34 = phi_a2; | |
sp40 = temp_v0_2; | |
sp40->unk_4 = Matrix_NewMtx(*arg0); | |
temp_v0_3 = *arg5; | |
*arg5 = temp_v0_3 + 8; | |
temp_v0_3->unk_0 = 0xDE000000; | |
temp_v0_3->unk_4 = &D_060046E0; | |
} | |
if (phi_a2 == &D_80B1DB10) { | |
if ((arg4->unk_191 & 0x20) != 0) { | |
temp_v0_4 = arg4->unk_190 - 1; | |
phi_v0 = temp_v0_4; | |
if (temp_v0_4 > 0) { | |
temp_a1 = arg4 + (temp_v0_4 * 0xC); | |
phi_a0 = temp_a1 + 0x220; | |
phi_v1 = temp_a1 + 0x22C; | |
do { | |
temp_v0_5 = phi_v0 - 1; | |
temp_v1 = phi_v1 - 0xC; | |
temp_v1->unk_C = (s32) phi_a0->unk_0; | |
temp_a0 = phi_a0 - 0xC; | |
temp_v1->unk_10 = (s32) phi_a0->unk_4; | |
temp_v1->unk_14 = (s32) temp_a0->unk_14; | |
phi_a0 = temp_a0; | |
phi_v1 = temp_v1; | |
phi_v0 = temp_v0_5; | |
} while (temp_v0_5 > 0); | |
} | |
SysMatrix_MultiplyVector3fByState(&D_80B1DAFC, arg4 + 0x22C); | |
} | |
if ((s32) arg4->unk_190 > 0) { | |
temp_v0_6 = (arg4->unk_18C * 4) + &D_80B1DA30; | |
sp38 = temp_v0_6; | |
temp_f2 = Rand_ZeroFloat(0.3f) + 0.7f; | |
if (func_80B1BCA0 == arg4->unk_188) { | |
- if ((s32) temp_v0_6->unk_0 < 0) { | |
- | |
+ temp_t6 = temp_v0_6->unk_0; | |
+ temp_f16 = (f32) temp_t6; | |
+ phi_f16 = temp_f16; | |
+ if ((s32) temp_t6 < 0) { | |
+ phi_f16 = temp_f16 + 4294967296.0f; | |
} | |
- if ((s32) temp_v0_6->unk_1 < 0) { | |
- | |
+ temp_t9 = temp_v0_6->unk_1; | |
+ temp_f10 = (f32) temp_t9; | |
+ phi_f10 = temp_f10; | |
+ if ((s32) temp_t9 < 0) { | |
+ phi_f10 = temp_f10 + 4294967296.0f; | |
} | |
temp_t2 = temp_v0_6->unk_2; | |
temp_f8 = (f32) temp_t2; | |
phi_f8 = temp_f8; | |
if ((s32) temp_t2 < 0) { | |
phi_f8 = temp_f8 + 4294967296.0f; | |
} | |
- Lights_PointNoGlowSetInfo(arg4 + 0x2FC, (s16) (s32) arg4->unk_22C, (s16) (s32) (arg4->unk_230 + 15.0f), (s16) (s32) arg4->unk_234, (u8) (u32) (phi_f8 * temp_f2), (u8) 0xC8); | |
+ Lights_PointNoGlowSetInfo(arg4 + 0x2FC, (s16) (s32) arg4->unk_22C, (s16) (s32) (arg4->unk_230 + 15.0f), (s16) (s32) arg4->unk_234, (u8) (u32) (phi_f16 * temp_f2), (u8) (u32) (phi_f10 * temp_f2), (u8) (u32) (phi_f8 * temp_f2), (s16) 0xC8); | |
} else { | |
- if ((s32) temp_v0_6->unk_0 < 0) { | |
- | |
+ temp_t9_2 = temp_v0_6->unk_0; | |
+ temp_f8_2 = (f32) temp_t9_2; | |
+ phi_f8_2 = temp_f8_2; | |
+ if ((s32) temp_t9_2 < 0) { | |
+ phi_f8_2 = temp_f8_2 + 4294967296.0f; | |
} | |
- if ((s32) temp_v0_6->unk_1 < 0) { | |
- | |
+ temp_t2_2 = temp_v0_6->unk_1; | |
+ temp_f18 = (f32) temp_t2_2; | |
+ phi_f18 = temp_f18; | |
+ if ((s32) temp_t2_2 < 0) { | |
+ phi_f18 = temp_f18 + 4294967296.0f; | |
} | |
temp_t5 = temp_v0_6->unk_2; | |
temp_f6 = (f32) temp_t5; | |
phi_f6 = temp_f6; | |
if ((s32) temp_t5 < 0) { | |
phi_f6 = temp_f6 + 4294967296.0f; | |
} | |
- Lights_PointGlowSetInfo(arg4 + 0x2FC, (s16) (s32) arg4->unk_22C, (s16) (s32) (arg4->unk_230 + 15.0f), (s16) (s32) arg4->unk_234, (u8) (u32) (phi_f6 * temp_f2), (u8) 0xC8); | |
+ Lights_PointGlowSetInfo(arg4 + 0x2FC, (s16) (s32) arg4->unk_22C, (s16) (s32) (arg4->unk_230 + 15.0f), (s16) (s32) arg4->unk_234, (u8) (u32) (phi_f8_2 * temp_f2), (u8) (u32) (phi_f18 * temp_f2), (u8) (u32) (phi_f6 * temp_f2), (s16) 0xC8); | |
} | |
} else { | |
Lights_PointSetColorAndRadius(arg4 + 0x2FC, 0U, 0U, 0U, (s16) 0); | |
} | |
if ((arg4->unk_191 & 0x80) == 0) { | |
SysMatrix_CopyCurrentState(arg4 + 0x358); | |
} | |
} | |
} | |
void EnPoSisters_Draw(Actor *thisx, GlobalContext *globalCtx) { | |
EnPoSisters *spE4; | |
void (*sp80)(EnPoSisters *, GlobalContext *); | |
void (*sp78)(EnPoSisters *, GlobalContext *); | |
Gfx *sp74; | |
Gfx *temp_v0_10; | |
Gfx *temp_v0_11; | |
Gfx *temp_v0_12; | |
Gfx *temp_v0_13; | |
Gfx *temp_v0_14; | |
Gfx *temp_v0_3; | |
Gfx *temp_v0_4; | |
Gfx *temp_v0_5; | |
Gfx *temp_v0_6; | |
Gfx *temp_v0_7; | |
Gfx *temp_v0_8; | |
Gfx *temp_v0_9; | |
GraphicsContext *temp_s3; | |
f32 temp_f20; | |
s32 temp_s2; | |
s32 temp_v0; | |
u8 temp_v0_2; | |
void *temp_s1; | |
void *temp_s7; | |
s32 phi_s5; | |
EnPoSisters *phi_s1; | |
s32 phi_s2; | |
f32 phi_f20; | |
f32 phi_f0; | |
f32 phi_f2; | |
EnPoSisters *this = (EnPoSisters *) thisx; | |
spE4 = this; | |
temp_v0 = this->unk_18C * 4; | |
temp_s1 = temp_v0 + &D_80B1DA40; | |
temp_s7 = temp_v0 + &D_80B1DA30; | |
temp_s3 = globalCtx->state.gfxCtx; | |
func_80B1C974(this); | |
func_8012C28C(globalCtx->state.gfxCtx); | |
func_8012C2DC(globalCtx->state.gfxCtx); | |
[INFO] Test summary: 1116 passed, 0 skipped, 7 failed, 1123 total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment