diff options
| author | MegaMech <inkstudios1@hotmail.com> | 2025-05-17 15:52:29 -0600 |
|---|---|---|
| committer | MegaMech <inkstudios1@hotmail.com> | 2025-05-17 15:52:29 -0600 |
| commit | 6bcd9897dc2571c6267d2dad84abaed63eb1e4c4 (patch) | |
| tree | b84c3a0cf795d02c86d690c4fe09699ba261d40c /src/port | |
| parent | 1229a69f2c90385eb10f4743554cda8a3fd990da (diff) | |
set_transform_matrix compiles
Diffstat (limited to 'src/port')
| -rw-r--r-- | src/port/interpolation/FrameInterpolation.cpp | 12 | ||||
| -rw-r--r-- | src/port/interpolation/FrameInterpolation.h | 3 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/port/interpolation/FrameInterpolation.cpp b/src/port/interpolation/FrameInterpolation.cpp index 70a7ccf01..65de693a4 100644 --- a/src/port/interpolation/FrameInterpolation.cpp +++ b/src/port/interpolation/FrameInterpolation.cpp @@ -5,11 +5,13 @@ #include <unordered_map> #include <math.h> #include "port/Engine.h" -#include <math_util.h> -#include "math_util_2.h" #include "FrameInterpolation.h" #include "matrix.h" +extern "C" { +#include "math_util.h" +#include "math_util_2.h" +} /* Frame interpolation. @@ -162,7 +164,7 @@ union Data { } matrix_rotate_axis; struct { - Mat4 dest; + Mat4* dest; Vec3f orientationVector; Vec3f positionVector; u16 rotationAngle; @@ -606,11 +608,11 @@ void FrameInterpolation_RecordMatrixMultVec3fNoTranslate(Mat4* matrix, Vec3f src // append(Op::MatrixMultVec3fNoTranslate).matrix_vec_no_translate = { matrix, src, dest }; } -void FrameInterpolation_Record_set_transform_matrix(Mat4 dest, Vec3f orientationVector, Vec3f positionVector, u16 rotationAngle, +void FrameInterpolation_Record_set_transform_matrix(Mat4* dest, Vec3f orientationVector, Vec3f positionVector, u16 rotationAngle, f32 scaleFactor) { if (!is_recording) return; - append(Op::SetTransformMatrix).set_transform_matrix_data = { dest[0][0], orientationVector[0], positionVector[0], rotationAngle, scaleFactor}; + append(Op::SetTransformMatrix).set_transform_matrix_data = { dest, orientationVector[0], positionVector[0], (f32)rotationAngle, scaleFactor}; } // Make a template for deref diff --git a/src/port/interpolation/FrameInterpolation.h b/src/port/interpolation/FrameInterpolation.h index d2a9a5fe3..a70f3e7b0 100644 --- a/src/port/interpolation/FrameInterpolation.h +++ b/src/port/interpolation/FrameInterpolation.h @@ -67,6 +67,9 @@ void FrameInterpolation_RecordSkinMatrixMtxFToMtx(MtxF* src, Mtx* dest); //void FrameInterpolation_RecordMatrixMultVec3fNoTranslate(Matrix* matrix, Vec3f src, Vec3f dest); +void FrameInterpolation_Record_set_transform_matrix(Mat4* dest, Vec3f orientationVector, Vec3f positionVector, u16 rotationAngle, + f32 scaleFactor); + #ifdef __cplusplus } #endif |
