mirror of
https://github.com/n64decomp/mk64
synced 2026-07-01 10:58:50 -04:00
+30
-53
@@ -372,61 +372,38 @@ void mtxf_s16_rotate_z(Mat4 mat, s16 angle) {
|
||||
*/
|
||||
}
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Oct-29-2023
|
||||
void func_802B5B14(f32 *arg0, s16 *arg1) {
|
||||
f32 sp70;
|
||||
f32 sp6C;
|
||||
f32 sp68;
|
||||
f32 sp60;
|
||||
f32 sp5C;
|
||||
f32 sp58;
|
||||
f32 sp50;
|
||||
f32 sp4C;
|
||||
f32 sp48;
|
||||
f32 sp40;
|
||||
f32 sp3C;
|
||||
f32 sp38;
|
||||
f32 sp30;
|
||||
f32 sp2C;
|
||||
f32 sp28;
|
||||
f32 temp_f0;
|
||||
f32 temp_f10;
|
||||
f32 temp_f12;
|
||||
f32 temp_f18;
|
||||
f32 temp_f20;
|
||||
f32 temp_f4;
|
||||
f32 temp_f6;
|
||||
void func_802B5B14(Vec3f b, Vec3s rotate) {
|
||||
Mat4 mtx;
|
||||
Vec3f copy;
|
||||
|
||||
sp38 = sins((u16) arg1->unk0);
|
||||
temp_f20 = coss((u16) arg1->unk0);
|
||||
sp30 = sins(arg1->unk2);
|
||||
sp2C = coss(arg1->unk2);
|
||||
sp28 = sins(arg1->unk4);
|
||||
temp_f0 = coss(arg1->unk4);
|
||||
temp_f4 = arg0->unk0;
|
||||
temp_f12 = sp38 * sp30;
|
||||
sp3C = temp_f4;
|
||||
sp40 = arg0->unk4;
|
||||
temp_f6 = (sp2C * temp_f0) + (temp_f12 * sp28);
|
||||
sp48 = temp_f6;
|
||||
sp58 = (-sp2C * sp28) + (temp_f12 * temp_f0);
|
||||
sp68 = temp_f20 * sp30;
|
||||
sp4C = temp_f20 * sp28;
|
||||
temp_f18 = sp38 * sp2C;
|
||||
sp5C = temp_f20 * temp_f0;
|
||||
sp6C = -sp38;
|
||||
temp_f10 = (-sp30 * temp_f0) + (temp_f18 * sp28);
|
||||
sp50 = temp_f10;
|
||||
sp60 = (sp30 * sp28) + (temp_f18 * temp_f0);
|
||||
sp70 = temp_f20 * sp2C;
|
||||
arg0->unk0 = (temp_f10 * sp40) + ((temp_f4 * temp_f6) + (sp40 * sp4C));
|
||||
arg0->unk4 = (f32) ((sp60 * sp40) + ((temp_f4 * sp58) + (sp40 * sp5C)));
|
||||
arg0->unk8 = (f32) ((sp70 * sp40) + ((sp3C * sp68) + (sp40 * sp6C)));
|
||||
f32 sx = sins(rotate[0]);
|
||||
f32 cx = coss(rotate[0]);
|
||||
|
||||
f32 sy = sins(rotate[1]);
|
||||
f32 cy = coss(rotate[1]);
|
||||
|
||||
f32 sz = sins(rotate[2]);
|
||||
f32 cz = coss(rotate[2]);
|
||||
|
||||
copy[0] = b[0];
|
||||
copy[1] = b[1];
|
||||
|
||||
mtx[0][0] = cy * cz + sx * sy * sz;
|
||||
mtx[1][0] = -cy * sz + sx * sy * cz;
|
||||
mtx[2][0] = cx * sy;
|
||||
|
||||
mtx[0][1] = cx * sz;
|
||||
mtx[1][1] = cx * cz;
|
||||
mtx[2][1] = -sx;
|
||||
|
||||
mtx[0][2] = -sy * cz + sx * cy * sz;
|
||||
mtx[1][2] = sy * sz + sx * cy * cz;
|
||||
mtx[2][2] = cx * cy;
|
||||
|
||||
b[0] = copy[0] * mtx[0][0] + copy[1] * mtx[0][1] + copy[1] * mtx[0][2];
|
||||
b[1] = copy[0] * mtx[1][0] + copy[1] * mtx[1][1] + copy[1] * mtx[1][2];
|
||||
b[2] = copy[0] * mtx[2][0] + copy[1] * mtx[2][1] + copy[1] * mtx[2][2];
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/racing/math_util/func_802B5B14.s")
|
||||
#endif
|
||||
|
||||
void func_802B5CAC(s16 arg0, s16 arg1, Vec3f arg2) {
|
||||
f32 sp2C = sins(arg1);
|
||||
|
||||
@@ -36,6 +36,7 @@ void func_802B5564(Mat4, u16*, f32, f32, f32, f32, f32);
|
||||
void mtxf_rotate_x(Mat4, s16);
|
||||
void mtxf_rotate_y(Mat4, s16);
|
||||
void mtxf_s16_rotate_z(Mat4, s16);
|
||||
void func_802B5B14(Vec3f b, Vec3s rotate); // unused
|
||||
void func_802B5CAC(s16, s16, Vec3f);
|
||||
void func_802B5D30(s16, s16, s32);
|
||||
void func_802B5D64(uintptr_t, s16, s16, s32);
|
||||
|
||||
Reference in New Issue
Block a user