summaryrefslogtreecommitdiff
path: root/src/math_util_2.c
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2023-04-07 22:13:28 -0600
committerGitHub <noreply@github.com>2023-04-07 22:13:28 -0600
commitafb29a5a65410e43c168a5d309bd7e94ea9ab7ff (patch)
tree603f424d990aa06a746fadae75617a1b15ab5f81 /src/math_util_2.c
parent772091700c4dc10141b56588d2ea81930fd8dfbb (diff)
Match memory.c, remove warnings, fix fake matches (#301)
* Match memory, remove warnings, fix fake matches * label switch
Diffstat (limited to 'src/math_util_2.c')
-rw-r--r--src/math_util_2.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/math_util_2.c b/src/math_util_2.c
index f84876bf5..d873eb1b2 100644
--- a/src/math_util_2.c
+++ b/src/math_util_2.c
@@ -9,6 +9,7 @@
#include "memory.h"
#include "code_802AAA70.h"
+#include "code_8001F980.h"
#pragma intrinsic (sqrtf)
@@ -334,11 +335,11 @@ void func_80041480(s16 *arg0, s16 arg1, s16 arg2, s16 *arg3) {
}
}
-s32 vec3f_set_dupe_2_electric_boogaloo(Vec3f arg0, f32 arg1, f32 arg2, f32 arg3) {
+Vec3f *vec3f_set_dupe_2_electric_boogaloo(Vec3f arg0, f32 arg1, f32 arg2, f32 arg3) {
arg0[0] = arg1;
arg0[1] = arg2;
arg0[2] = arg3;
- return &arg0;
+ return (Vec3f *) &arg0;
}
Vec3f *func_80041530(Vec3f dest) {
@@ -347,7 +348,7 @@ Vec3f *func_80041530(Vec3f dest) {
dest[0] = dest[0] * invsqrt;
dest[1] = dest[1] * invsqrt;
dest[2] = dest[2] * invsqrt;
- return &dest;
+ return (Vec3f *) &dest;
}
Vec3f *func_80041594(Vec3f arg0, Vec3f arg1, Vec3f arg2) {
@@ -356,7 +357,7 @@ Vec3f *func_80041594(Vec3f arg0, Vec3f arg1, Vec3f arg2) {
arg0[1] = (arg1[2] * arg2[0]) - (arg2[2] * arg1[0]);
arg0[2] = (arg1[0] * arg2[1]) - (arg2[0] * arg1[1]);
- return &arg0;
+ return (Vec3f *) &arg0;
}
UNUSED s32 func_80041608(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
@@ -473,7 +474,7 @@ void func_800419F8(void) {
D_80165840[2] = sp24[2];
}
-UNUSED func_80041A70(void) {
+UNUSED void func_80041A70(void) {
}
@@ -601,7 +602,7 @@ extern s8 D_801658FE;
extern Mtx D_80183D60[];
void func_80041D34(void) {
- guOrtho(&D_80183D60, 0.0f, 320.0f, 240.0f, 0.0f, -1.0f, 1.0f, 1.0f);
+ guOrtho((Mtx *)D_80183D60, 0.0f, 320.0f, 240.0f, 0.0f, -1.0f, 1.0f, 1.0f);
switch (gActiveScreenMode) {
case SCREEN_MODE_1P:
guOrtho(&gGfxPool->mtxPool[5], 0.0f, 320.0f, 240.0f, 0.0f, -1.0f, 1.0f, 1.0f);
@@ -645,7 +646,7 @@ UNUSED void func_80042000(u16 arg0) {
Mat4 matrix;
func_80041AD8(matrix, arg0);
- func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], &matrix);
+ func_80022180(&gGfxPool->mtxPool[D_8018D120 + 0xB], matrix);
gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(&gGfxPool->mtxPool[D_8018D120 + 0xB]), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
D_8018D120++;