diff options
| author | MegaMech <7255464+MegaMech@users.noreply.github.com> | 2025-05-23 20:56:36 -0600 |
|---|---|---|
| committer | MegaMech <7255464+MegaMech@users.noreply.github.com> | 2025-05-23 20:56:36 -0600 |
| commit | 5418951e1fcf9cd3c5bafce0ccf629b8e75467bf (patch) | |
| tree | a1e3f2a84e2859189f9479d918a56954bb29b9f3 /src/engine | |
| parent | 96c8c80c9c832db3cd327728d36f5042b769647f (diff) | |
Interpolate guScale, guRotate, SetTextMatrix
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/Matrix.cpp | 13 | ||||
| -rw-r--r-- | src/engine/Matrix.h | 3 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/engine/Matrix.cpp b/src/engine/Matrix.cpp index e01df8954..2586d1614 100644 --- a/src/engine/Matrix.cpp +++ b/src/engine/Matrix.cpp @@ -35,8 +35,8 @@ void AddMatrixFixed(std::vector<Mtx>& stack, s32 flags) { } // Used in func_80095BD0 -Mtx* SetTextMatrix(f32 arg1, f32 arg2, f32 arg3, f32 arg4) { - Mat4 matrix; +Mtx* SetTextMatrix(Mat4 matrix, f32 x, f32 y, f32 arg3, f32 arg4) { + FrameInterpolation_Record_SetTextMatrix((Mat4*)&matrix, x, y, arg3, arg4); matrix[0][0] = arg3; matrix[0][1] = 0.0f; matrix[0][2] = 0.0f; @@ -49,11 +49,12 @@ Mtx* SetTextMatrix(f32 arg1, f32 arg2, f32 arg3, f32 arg4) { matrix[2][1] = 0.0f; matrix[2][2] = 1.0f; matrix[2][3] = 0.0f; - matrix[3][0] = arg1; - matrix[3][1] = arg2; + matrix[3][0] = x; + matrix[3][1] = y; matrix[3][2] = 0.0f; matrix[3][3] = 1.0f; Mtx* mtx = GetMatrix(gWorldInstance.Mtx.Effects); + FrameInterpolation_RecordMatrixMtxFToMtx((MtxF*)mtx, &stack.back()); guMtxF2L(matrix, mtx); return mtx; @@ -177,6 +178,10 @@ extern "C" { return GetMatrix(gWorldInstance.Mtx.Effects); } + Mtx* GetObjectMatrix(void) { + return GetMatrix(gWorldInstance.Mtx.Objects); + } + /** * Note that the game doesn't seem to clear all of these at the beginning of a new frame. diff --git a/src/engine/Matrix.h b/src/engine/Matrix.h index 180ebfb16..cada8c267 100644 --- a/src/engine/Matrix.h +++ b/src/engine/Matrix.h @@ -17,8 +17,9 @@ void AddObjectMatrix(Mat4 mtx, s32 flags); void AddEffectMatrix(Mat4 mtx, s32 flags); void AddEffectMatrixOrtho(void); void AddEffectMatrixFixed(s32 flags); -Mtx* SetTextMatrix(f32 arg1, f32 arg2, f32 arg3, f32 arg4); +Mtx* SetTextMatrix(Mat4 mtx, f32 x, f32 y, f32 arg3, f32 arg4); Mtx* GetEffectMatrix(void); +Mtx* GetObjectMatrix(void); void ClearHudMatrixPool(void); void ClearEffectsMatrixPool(void); void ClearObjectsMatrixPool(void); |
