summaryrefslogtreecommitdiff
path: root/arm9/lib/src/GX_g2.c
diff options
context:
space:
mode:
authorAkira Akashi <rubenru09@aol.com>2021-06-10 22:42:43 +0100
committerGitHub <noreply@github.com>2021-06-10 22:42:43 +0100
commitaa185f6be5696ae4bd6c9f8093eb13a06cb2cc79 (patch)
tree8f56e977e7e4f69c1c48249118074f500857f195 /arm9/lib/src/GX_g2.c
parent6bede5a9393e2796c110e6304f455293a240cd7b (diff)
parente8d0b49a6864d6077a5d7b1c123c49481fe14bfe (diff)
Merge branch 'master' into unkk_020851B8
Diffstat (limited to 'arm9/lib/src/GX_g2.c')
-rw-r--r--arm9/lib/src/GX_g2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arm9/lib/src/GX_g2.c b/arm9/lib/src/GX_g2.c
index 99ba0e26..39b8bff4 100644
--- a/arm9/lib/src/GX_g2.c
+++ b/arm9/lib/src/GX_g2.c
@@ -1,16 +1,16 @@
#include "global.h"
#include "gx.h"
-ARM_FUNC void G2x_SetBGyAffine_(u32 *ptr, struct Mtx22 *mtx, fx32 a, fx32 b, fx32 c, fx32 d){
+ARM_FUNC void G2x_SetBGyAffine_(u32 ptr, const struct Mtx22 *mtx, fx32 a, fx32 b, fx32 c, fx32 d){
fx32 temp0, temp1, temp2, temp3;
- ptr[0] = (u32)((u16)(fx16)(mtx->_[0] >> 4) | (u16)(fx16)(mtx->_[1] >> 4)<< 0x10);
- ptr[1] = (u32)((u16)(fx16)(mtx->_[2] >> 4) | (u16)(fx16)(mtx->_[3] >> 4)<< 0x10);
+ *((vu32 *)ptr + 0) = (u32)((u16)(fx16)(mtx->_[0] >> 4) | (u16)(fx16)(mtx->_[1] >> 4)<< 0x10);
+ *((vu32 *)ptr + 1) = (u32)((u16)(fx16)(mtx->_[2] >> 4) | (u16)(fx16)(mtx->_[3] >> 4)<< 0x10);
temp0 = c - a;
temp1 = d - b;
temp2 = mtx->_[0] * temp0 + mtx->_[1] * temp1 + (a << 0xC);
temp3 = mtx->_[2] * temp0 + mtx->_[3] * temp1 + (b << 0xC);
- ptr[2] = (u32)(temp2 >> 4);
- ptr[3] = (u32)(temp3 >> 4);
+ *((vu32 *)ptr + 2) = (u32)(temp2 >> 4);
+ *((vu32 *)ptr + 3) = (u32)(temp3 >> 4);
}
ARM_FUNC void G2x_SetBlendAlpha_(u32 *ptr, fx32 a, fx32 b, fx32 c, fx32 d){