diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2025-05-16 00:52:26 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2025-05-16 00:52:26 -0600 |
| commit | 47626be235111990bdf279e33c1527475271760b (patch) | |
| tree | 92a130da7e8d4d202d2ce75961552824856da27c /src/racing | |
| parent | b4e39c01cdcafcb0ea80f0a975659fced123e68a (diff) | |
Pushed a ton of interpolation fixesfps-interpolation-2
Diffstat (limited to 'src/racing')
| -rw-r--r-- | src/racing/math_util.c | 7 | ||||
| -rw-r--r-- | src/racing/math_util.h | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/racing/math_util.c b/src/racing/math_util.c index 6f9aba302..2f7e907c9 100644 --- a/src/racing/math_util.c +++ b/src/racing/math_util.c @@ -9,6 +9,7 @@ #include "memory.h" #include "engine/Matrix.h" #include "port/Game.h" +#include <port/interpolation/FrameInterpolation.h> #include <port/interpolation/matrix.h> #pragma intrinsic(sqrtf, fabs) @@ -331,6 +332,7 @@ void func_802B5794(Mat4 mtx, Vec3f from, Vec3f to) { // create a rotation matrix around the x axis void mtxf_rotate_x(Mat4 mat, s16 angle) { + FrameInterpolation_RecordMatrixRotate1Coord(&mat, 0, angle); f32 sin_theta = sins(angle); f32 cos_theta = coss(angle); @@ -350,6 +352,7 @@ void mtxf_rotate_x(Mat4 mat, s16 angle) { // create a rotation matrix around the y axis void mtxf_rotate_y(Mat4 mat, s16 angle) { + FrameInterpolation_RecordMatrixRotate1Coord(&mat, 1, angle); f32 sin_theta = sins(angle); f32 cos_theta = coss(angle); @@ -369,6 +372,7 @@ void mtxf_rotate_y(Mat4 mat, s16 angle) { // create a rotation matrix around the z axis void mtxf_s16_rotate_z(Mat4 mat, s16 angle) { + FrameInterpolation_RecordMatrixRotate1Coord(&mat, 2, angle); f32 sin_theta = sins(angle); f32 cos_theta = coss(angle); @@ -475,6 +479,8 @@ void mtxf_scale(Mat4 mat, f32 coef) { // look like create a translation and rotation matrix with arg1 position and arg2 rotation void mtxf_pos_rotation_xyz(Mat4 out, Vec3f pos, Vec3s orientation) { + FrameInterpolation_RecordMatrixPosRotXYZ(out, pos, orientation); + f32 sine1; f32 cosine1; f32 sine2; @@ -825,6 +831,7 @@ void func_802B6D58(Mat4 arg0, Vec3f arg1, Vec3f arg2) { } void mtxf_multiplication(Mat4 dest, Mat4 mat1, Mat4 mat2) { + // FrameInterpolation_RecordMatrixMult4x4(dest, mat1, mat2); Mat4 product; product[0][0] = (mat1[0][0] * mat2[0][0]) + (mat1[0][1] * mat2[1][0]) + (mat1[0][2] * mat2[2][0]) + (mat1[0][3] * mat2[3][0]); diff --git a/src/racing/math_util.h b/src/racing/math_util.h index d5d7bf3c4..43ccc249a 100644 --- a/src/racing/math_util.h +++ b/src/racing/math_util.h @@ -12,6 +12,10 @@ #define sqr(x) ((x) * (x)) +#ifdef __cplusplus +extern "C" { +#endif + // Here to appease the pragma gods double fabs(double x); @@ -72,4 +76,8 @@ extern s32 D_802B91C0[]; extern Vec3f D_802B91C8; // extern Mtx gIdentityMatrix; +#ifdef __cplusplus +} +#endif + #endif // MATH_UTIL_H |
