diff options
author | who-knows-who <j.williams97@outlook.com> | 2021-06-22 22:12:29 +0100 |
---|---|---|
committer | who-knows-who <j.williams97@outlook.com> | 2021-06-22 22:12:29 +0100 |
commit | cec1d428f458997fe3e4c0ac4abf0dc6b36ba699 (patch) | |
tree | f246a8956341a8f743d29c58f39a80a6ac5f865a /arm9/lib/src/GX_g2.c | |
parent | 5bbef1bba183ad6654edbd0c8fc8244db38ac5c9 (diff) | |
parent | d192b6951f54d1397ded3db03b5e486ec679ac6f (diff) |
Merge branch 'master' of github.com:pret/pokediamond into 0202A1E0
Diffstat (limited to 'arm9/lib/src/GX_g2.c')
-rw-r--r-- | arm9/lib/src/GX_g2.c | 10 |
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){ |