From c704eb9c9ff00e858cfa167e5dc73ee42234e46b Mon Sep 17 00:00:00 2001 From: MysterD Date: Thu, 4 May 2023 01:03:18 -0700 Subject: [PATCH] Fix 32 bit builds --- Makefile | 6 +++--- src/pc/utils/misc.c | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index f305cc04..f4658937 100644 --- a/Makefile +++ b/Makefile @@ -158,9 +158,9 @@ endif ifeq ($(WINDOWS_AUTO_BUILDER),1) export SHELL=sh.exe - ifeq ($(TARGET_BITS), 32) + ifeq ($(TARGET_BITS),32) EXTRA_INCLUDES := ../include/1 ../include/2 ../include/3 ../include/4 - EXTRA_CPP_INCLUDES := ../include/cpp + EXTRA_CPP_INCLUDES := -I../include/cpp else EXTRA_INCLUDES := EXTRA_CPP_INCLUDES := @@ -1634,7 +1634,7 @@ ifeq ($(TARGET_N64),1) else $(EXE): $(O_FILES) $(MIO0_FILES:.mio0=.o) $(ULTRA_O_FILES) $(GODDARD_O_FILES) $(BUILD_DIR)/$(RPC_LIBS) $(BUILD_DIR)/$(DISCORD_SDK_LIBS) $(BUILD_DIR)/$(BASS_LIBS) $(BUILD_DIR)/$(COOPNET_LIBS) $(BUILD_DIR)/$(LANG_DIR) $(BUILD_DIR)/$(MOD_DIR) @$(PRINT) "$(GREEN)Linking executable: $(BLUE)$@ $(NO_COL)\n" - $(V)$(LD) $(PROF_FLAGS) -L $(BUILD_DIR) -o $@ $(O_FILES) $(ULTRA_O_FILES) $(GODDARD_O_FILES) $(LDFLAGS) $(EXTRA_INCLUDES) + $(V)$(LD) $(PROF_FLAGS) -L $(BUILD_DIR) -o $@ $(O_FILES) $(ULTRA_O_FILES) $(GODDARD_O_FILES) $(LDFLAGS) endif diff --git a/src/pc/utils/misc.c b/src/pc/utils/misc.c index 6567dfd6..da3c6603 100644 --- a/src/pc/utils/misc.c +++ b/src/pc/utils/misc.c @@ -330,8 +330,9 @@ static f32 unmat_unscale_shear(f32 shear, f32 scale) { // tranfs is returned as follows: // scale(x, y, z), shear(xy, xz, zy), rotation(a, b, c, d), translation(x, y, z) static void unmatrix(Mtx * mat, f32 tranfs[13]) { - register int i; - Vec3f axisVecs[3], yzCross; + int i = 0; + Vec3f axisVecs[3] = { 0 }; + Vec3f yzCross = { 0 }; Mtx locMat = *mat; @@ -430,13 +431,13 @@ static void unmatrix(Mtx * mat, f32 tranfs[13]) { // builds a transformation matrix from a decomposed sequence from unmatrix // see unmatrix for what tranfs means static void rematrix(Mtx * mat, f32 tranfs[13]) { - register int i; - Vec3f rotAxes[3]; - Mat4 rotMat; + int i; + Vec3f rotAxes[3] = { 0 }; + Mat4 rotMat = { 0 }; // start with the identity matrix for (i = 0; i < 4; ++i) { - register int j; + int j; mat->m[i][i] = 1.0f; for (j = 3; j > i; --j) { @@ -476,8 +477,9 @@ static void rematrix(Mtx * mat, f32 tranfs[13]) { } void delta_interpolate_mtx_accurate(Mtx* out, Mtx* a, Mtx* b, f32 delta) { - register int i; - f32 matTranfsA[13], matTranfsB[13]; + int i; + f32 matTranfsA[13] = { 0 }; + f32 matTranfsB[13] = { 0 }; f32 antiDelta = 1.0f - delta;