From 99fd784bc27aa14c062f203b25cf58a3f9f3e3ae Mon Sep 17 00:00:00 2001 From: cadmic Date: Thu, 1 Feb 2024 06:13:24 -0800 Subject: [PATCH] Match sys_matrix.c (#1682) --- include/functions.h | 2 ++ src/code/sys_matrix.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/functions.h b/include/functions.h index db35c381ae..ea003b2a5f 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1455,7 +1455,9 @@ void Matrix_ReplaceRotation(MtxF* mf); void Matrix_MtxFToYXZRotS(MtxF* mf, Vec3s* rotDest, s32 flag); void Matrix_MtxFToZYXRotS(MtxF* mf, Vec3s* rotDest, s32 flag); void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode); +#if OOT_DEBUG MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line); +#endif void Matrix_SetTranslateScaleMtx2(Mtx* mtx, f32 scaleX, f32 scaleY, f32 scaleZ, f32 translateX, f32 translateY, f32 translateZ); u64* SysUcode_GetUCodeBoot(void); diff --git a/src/code/sys_matrix.c b/src/code/sys_matrix.c index d6e4570ea4..b90ddaad52 100644 --- a/src/code/sys_matrix.c +++ b/src/code/sys_matrix.c @@ -969,6 +969,7 @@ void Matrix_RotateAxis(f32 angle, Vec3f* axis, u8 mode) { } } +#if OOT_DEBUG MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line) { s32 i, j; @@ -989,20 +990,21 @@ MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line) { return mf; } +#endif void Matrix_SetTranslateUniformScaleMtxF(MtxF* mf, f32 scale, f32 translateX, f32 translateY, f32 translateZ) { + mf->xx = scale; mf->yx = 0.0f; mf->zx = 0.0f; mf->wx = 0.0f; mf->xy = 0.0f; + mf->yy = scale; mf->zy = 0.0f; mf->wy = 0.0f; mf->xz = 0.0f; mf->yz = 0.0f; - mf->wz = 0.0f; - mf->xx = scale; - mf->yy = scale; mf->zz = scale; + mf->wz = 0.0f; mf->xw = translateX; mf->yw = translateY; mf->zw = translateZ;