From ab28b0b37f2fd9fba6010e48e15bd31170d678d7 Mon Sep 17 00:00:00 2001 From: Made Date: Mon, 4 May 2020 17:07:22 +0200 Subject: Add typedefs for fixed point types --- arm9/lib/src/FX_mtx22.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'arm9/lib/src/FX_mtx22.c') diff --git a/arm9/lib/src/FX_mtx22.c b/arm9/lib/src/FX_mtx22.c index fcd634b1..19504574 100644 --- a/arm9/lib/src/FX_mtx22.c +++ b/arm9/lib/src/FX_mtx22.c @@ -2,11 +2,11 @@ #include "main.h" #include "fx.h" -void MTX_ScaleApply22(struct Mtx22 *mtx, struct Mtx22 *dst, s32 x, s32 y){ - dst->_[0] = ((s64)x * mtx->_[0]) >> FX32_INT_SHIFT; - dst->_[1] = ((s64)x * mtx->_[1]) >> FX32_INT_SHIFT; - dst->_[2] = ((s64)y * mtx->_[2]) >> FX32_INT_SHIFT; - dst->_[3] = ((s64)y * mtx->_[3]) >> FX32_INT_SHIFT; +void MTX_ScaleApply22(struct Mtx22 *mtx, struct Mtx22 *dst, fx32 x, fx32 y){ + dst->_[0] = ((fx64)x * mtx->_[0]) >> FX32_INT_SHIFT; + dst->_[1] = ((fx64)x * mtx->_[1]) >> FX32_INT_SHIFT; + dst->_[2] = ((fx64)y * mtx->_[2]) >> FX32_INT_SHIFT; + dst->_[3] = ((fx64)y * mtx->_[3]) >> FX32_INT_SHIFT; } asm void MTX_Identity22_(struct Mtx22 *mtx){ @@ -19,7 +19,7 @@ asm void MTX_Identity22_(struct Mtx22 *mtx){ } #pragma thumb on -asm void MTX_Rot22_(struct Mtx22 *mtx, s32 sinphi, s32 cosphi){ +asm void MTX_Rot22_(struct Mtx22 *mtx, fx32 sinphi, fx32 cosphi){ str r2, [r0, #0x0] str r1, [r0, #0x4] neg r1, r1 -- cgit v1.2.3