mirror of
https://github.com/n64decomp/mk64
synced 2026-08-12 03:37:42 -04:00
Single match in math_util.c (#484)
Signed-off-by: Taggerung <tyler.taggerung@email.com>
This commit is contained in:
+64
-13
@@ -14,27 +14,29 @@
|
||||
s32 D_802B91C0[2] = { 13, 13 };
|
||||
Vec3f D_802B91C8 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Nearly matches
|
||||
// This functions looks similar to a segment of code from func_802A4A0C in skybox_and_splitscreen.c
|
||||
UNUSED s32 func_802B4F60(UNUSED s32 arg0, Vec3f arg1, UNUSED s32 arg2, UNUSED f32 arg3, UNUSED f32 arg4)
|
||||
{
|
||||
Mat4 sp30;
|
||||
f32 sp2C;
|
||||
UNUSED f32 a;
|
||||
f32 sp28;
|
||||
Vec3f sp1C;
|
||||
vec3f_copy_return(sp1C, arg1);
|
||||
sp2C = sp30[3][3] + (((sp1C[0] * sp30[0][3]) + (sp1C[1] * sp30[1][3])) + (sp30[2][3] * sp1C[2]));
|
||||
sp28 = sp1C[0];
|
||||
sp2C = sp1C[1];
|
||||
// wut?
|
||||
if (sp2C && sp2C);
|
||||
sp2C = ((sp30[0][3] * sp28) + (sp30[1][3] * sp2C) + (sp30[2][3] * sp1C[2])) + sp30[3][3];
|
||||
// double wut?
|
||||
if (sp28 && sp28);
|
||||
mtxf_translate_vec3f_mat4(sp1C, sp30);
|
||||
if (sp2C >= 0.0f)
|
||||
if (0.0f >= sp2C)
|
||||
{
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/racing/math_util/func_802B4F60.s")
|
||||
#endif
|
||||
|
||||
UNUSED void func_802B4FF0() {
|
||||
|
||||
@@ -371,8 +373,8 @@ void mtxf_s16_rotate_z(Mat4 mat, s16 angle) {
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
UNUSED void func_802B5B14(Vec3f arg0, Vec3s arg1) {
|
||||
//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Oct-29-2023
|
||||
void func_802B5B14(f32 *arg0, s16 *arg1) {
|
||||
f32 sp70;
|
||||
f32 sp6C;
|
||||
f32 sp68;
|
||||
@@ -1197,5 +1199,54 @@ UNUSED void func_802B8414(uintptr_t arg0, Mat4 arg1, s16 arg2, s16 arg3, s32 arg
|
||||
}
|
||||
}
|
||||
|
||||
// unused
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Oct-29-2023
|
||||
void func_802B8614(Player *arg0) {
|
||||
f64 sp78;
|
||||
f64 sp70;
|
||||
f64 sp68;
|
||||
f64 sp58;
|
||||
f64 sp50;
|
||||
f64 sp48;
|
||||
f64 sp40;
|
||||
f64 sp38;
|
||||
f64 temp_f12;
|
||||
f64 temp_f14;
|
||||
f64 temp_f16;
|
||||
f64 temp_f18;
|
||||
f64 temp_f20;
|
||||
f64 temp_f2;
|
||||
f64 temp_f30;
|
||||
f64 temp_f4;
|
||||
f64 temp_f6;
|
||||
|
||||
temp_f6 = (f64) arg0->boundingBoxCorners[1].cornerPos[0];
|
||||
sp78 = temp_f6;
|
||||
sp70 = (f64) arg0->boundingBoxCorners[1].cornerGroundY;
|
||||
sp68 = (f64) arg0->boundingBoxCorners[1].cornerPos[2];
|
||||
temp_f30 = (f64) arg0->boundingBoxCorners[0].cornerPos[0];
|
||||
sp58 = (f64) arg0->boundingBoxCorners[0].cornerGroundY;
|
||||
sp50 = (f64) arg0->boundingBoxCorners[0].cornerPos[2];
|
||||
sp48 = (f64) arg0->boundingBoxCorners[3].cornerPos[0];
|
||||
sp40 = (f64) arg0->boundingBoxCorners[3].cornerGroundY;
|
||||
temp_f4 = (f64) arg0->boundingBoxCorners[3].cornerPos[2];
|
||||
temp_f2 = sp58 - sp70;
|
||||
sp38 = temp_f4;
|
||||
temp_f12 = temp_f4 - sp50;
|
||||
temp_f14 = sp50 - sp68;
|
||||
temp_f16 = sp40 - sp58;
|
||||
temp_f18 = sp48 - temp_f30;
|
||||
temp_f20 = temp_f30 - temp_f6;
|
||||
if (0.0 == 0.0) {
|
||||
arg0->unk_058 = 0.0f;
|
||||
arg0->unk_060 = 0.0f;
|
||||
arg0->unk_05C = 1.0f;
|
||||
return;
|
||||
}
|
||||
arg0->unk_058 = (f32) ((f64) (f32) ((temp_f2 * temp_f12) - (temp_f14 * temp_f16)) / 0.0);
|
||||
arg0->unk_05C = (f32) ((f64) (f32) ((temp_f14 * temp_f18) - (temp_f20 * temp_f12)) / 0.0);
|
||||
arg0->unk_060 = (f32) ((f64) (f32) ((temp_f20 * temp_f16) - (temp_f2 * temp_f18)) / 0.0);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/racing/math_util/func_802B8614.s")
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
// Here to appease the pragma gods
|
||||
double fabs(double x);
|
||||
|
||||
s32 func_802B4F60(s32, Vec3f, s32, f32, f32);
|
||||
s32 render_set_position(Mat4, s32);
|
||||
f32 func_802B51E8(Vec3f, Vec3f);
|
||||
u32 get_angle_between_points(Vec3f, Vec3f);
|
||||
|
||||
Reference in New Issue
Block a user