summaryrefslogtreecommitdiff
path: root/src/code/sys_math3d.c
diff options
context:
space:
mode:
authorTharo <tharo10600@gmail.com>2026-09-24 05:29:19 +0100
committerGitHub <noreply@github.com>2026-09-24 06:29:19 +0200
commit1bef952ff61a6dd1945c7887c1babd94efe95f72 (patch)
tree7436c39fce905685f6d2115d487be3303ceda09c /src/code/sys_math3d.c
parent39070bb9dd5bba8b60363b81ef0b36f4590e68f4 (diff)
Unused variable/parameter cleanup (#1321)
* UNUSED attribute for variables and parameters in static segments and for all stack padding variables * No more unused variable warnings * Make pad variable names consistent * Small cleanup * Macro-ify stack padding * Use stack padding for more variables not previously named pad * Format * Check unused parameter on gamestate overlays and pause menu Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Merge 2x u8 stack pads into 1x s16 stack pad in en_ik * Remove UNUSED from function prototypes * Suggested changes Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * More unused variables * Fix merge, updated for new versions * Format * questionable UNUSED and STACK_PAD more usage * format * format * one more STACK_PADS in z_kaleido_map.c --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Diffstat (limited to 'src/code/sys_math3d.c')
-rw-r--r--src/code/sys_math3d.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c
index 0287a64e2..70fe669a8 100644
--- a/src/code/sys_math3d.c
+++ b/src/code/sys_math3d.c
@@ -1,6 +1,7 @@
#include "sys_math3d.h"
#include "printf.h"
+#include "stack_pad.h"
#include "terminal.h"
#include "translation.h"
#include "ultra64.h"
@@ -160,7 +161,7 @@ void Math3D_FindPointOnPlaneIntersect(f32 planeAAxis1Norm, f32 planeAAxis2Norm,
*/
s32 Math3D_PlaneVsPlaneNewLine(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB,
f32 planeBC, f32 planeBDist, InfiniteLine* intersect) {
- char pad[4];
+ STACK_PAD(s32);
Vec3f planeANormal;
Vec3f planeBNormal;
f32 dirX;
@@ -1641,7 +1642,7 @@ s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, V
f32 fracB;
f32 fracBase;
f32 zero = 0.0f;
- f32 pad;
+ STACK_PAD(s32);
f32 cylRadiusSq;
f32 radSqDiff;
f32 distCent2;
@@ -1833,7 +1834,7 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) {
Vec3f cylIntersectCenter;
Vec3f midpointv0v1;
Vec3f diffMidpointIntersect;
- s32 pad;
+ STACK_PAD(s32);
cylBottom = (f32)cyl->pos.y + cyl->yShift;
cylTop = cyl->height + cylBottom;