summaryrefslogtreecommitdiff
path: root/arm9/lib/src/FX_mtx44.c
diff options
context:
space:
mode:
authorMade <made111@gmx.de>2020-05-04 17:48:38 +0200
committerMade <made111@gmx.de>2020-05-04 17:48:38 +0200
commitf4c61411673207da9d6be013674f95eeb07408b5 (patch)
treec2a956201b0f5daa9e84c4a0f0fe89ea04c7147a /arm9/lib/src/FX_mtx44.c
parent155f50c9890a93fbc191e078d304c161809e8fc6 (diff)
Add function attributes and remove thumb pragmas
Diffstat (limited to 'arm9/lib/src/FX_mtx44.c')
-rw-r--r--arm9/lib/src/FX_mtx44.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/arm9/lib/src/FX_mtx44.c b/arm9/lib/src/FX_mtx44.c
index 8d158602..8152907d 100644
--- a/arm9/lib/src/FX_mtx44.c
+++ b/arm9/lib/src/FX_mtx44.c
@@ -5,7 +5,7 @@
void MI_Copy48B(void *src, void *dst);
-void MTX_TransApply44(struct Mtx44 *mtx, struct Mtx44 *dst, fx32 x, fx32 y, fx32 z){
+ARM_FUNC void MTX_TransApply44(struct Mtx44 *mtx, struct Mtx44 *dst, fx32 x, fx32 y, fx32 z){
if(mtx != dst)
MI_Copy48B(mtx, dst);
dst->_[12] = mtx->_[12] + (fx32)(((fx64)x * mtx->_[0] + (fx64)y * mtx->_[4] + (fx64)z * mtx->_[8] ) >> FX32_INT_SHIFT);
@@ -14,7 +14,7 @@ void MTX_TransApply44(struct Mtx44 *mtx, struct Mtx44 *dst, fx32 x, fx32 y, fx32
dst->_[15] = mtx->_[15] + (fx32)(((fx64)x * mtx->_[3] + (fx64)y * mtx->_[7] + (fx64)z * mtx->_[11]) >> FX32_INT_SHIFT);
}
-void MTX_Concat44(struct Mtx44 *a, struct Mtx44 *b, struct Mtx44 *c){
+ARM_FUNC void MTX_Concat44(struct Mtx44 *a, struct Mtx44 *b, struct Mtx44 *c){
struct Mtx44 temp;
struct Mtx44 *dst;
fx32 a0, a1, a2, a3;
@@ -73,7 +73,7 @@ void MTX_Concat44(struct Mtx44 *a, struct Mtx44 *b, struct Mtx44 *c){
*c = temp;
}
-asm void MTX_Identity44_(struct Mtx44 *dst){
+ARM_FUNC asm void MTX_Identity44_(struct Mtx44 *dst){
mov r2, #0x1000
mov r3, #0x0
stmia r0!, {r2-r3}
@@ -87,7 +87,7 @@ asm void MTX_Identity44_(struct Mtx44 *dst){
bx lr
}
-asm void MTX_Copy44To43_(struct Mtx44 *src, struct Mtx43 *dst){
+ARM_FUNC asm void MTX_Copy44To43_(struct Mtx44 *src, struct Mtx43 *dst){
ldmia r0!, {r2-r3,r12}
add r0, r0, #0x4
stmia r1!, {r2-r3,r12}
@@ -103,8 +103,8 @@ asm void MTX_Copy44To43_(struct Mtx44 *src, struct Mtx43 *dst){
bx lr
}
-#pragma thumb on
-asm void MTX_RotX44_(struct Mtx44 *mtx, fx32 sinphi, fx32 cosphi){
+
+THUMB_FUNC asm void MTX_RotX44_(struct Mtx44 *mtx, fx32 sinphi, fx32 cosphi){
str r2, [r0, #0x14]
str r2, [r0, #0x28]
str r1, [r0, #0x18]
@@ -124,10 +124,8 @@ asm void MTX_RotX44_(struct Mtx44 *mtx, fx32 sinphi, fx32 cosphi){
str r1, [r0, #0x0]
bx lr
}
-#pragma thumb off
-#pragma thumb on
-asm void MTX_RotY44_(struct Mtx44 *mtx, fx32 sinphi, fx32 cosphi){
+THUMB_FUNC asm void MTX_RotY44_(struct Mtx44 *mtx, fx32 sinphi, fx32 cosphi){
str r2, [r0, #0x0]
str r2, [r0, #0x28]
str r1, [r0, #0x20]
@@ -147,10 +145,8 @@ asm void MTX_RotY44_(struct Mtx44 *mtx, fx32 sinphi, fx32 cosphi){
stmia r0!, {r1-r3}
bx lr
}
-#pragma thumb off
-#pragma thumb on
-asm void MTX_RotZ44_(struct Mtx44 *mtx, fx32 sinphi, fx32 cosphi){
+THUMB_FUNC asm void MTX_RotZ44_(struct Mtx44 *mtx, fx32 sinphi, fx32 cosphi){
str r2, [r0, #0x0]
str r2, [r0, #0x14]
str r1, [r0, #0x4]
@@ -169,4 +165,3 @@ asm void MTX_RotZ44_(struct Mtx44 *mtx, fx32 sinphi, fx32 cosphi){
stmia r0!, {r1-r3}
bx lr
}
-#pragma thumb off