diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-06-04 18:37:08 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-06-04 18:37:08 -0400 |
commit | e29c9e21ba9b64c86ac677b2bf4a69e92e8ac34b (patch) | |
tree | 961f150c6ccef7e09990f8e1f5d7cc0c37c8d031 /arm9/lib/src | |
parent | 1b5cf67f5f3585ea1a50dc2d487e6897dd7e6f55 (diff) |
Port more inlines from gx lib
Diffstat (limited to 'arm9/lib/src')
-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){ |