summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2026-05-03 02:13:30 +0200
committerGitHub <noreply@github.com>2026-05-03 02:13:30 +0200
commite2cf6ecbb44489fd4cebdc6cdf95430338c5df15 (patch)
treeb81109d3c7d10e3bdd16a75ff47aafb51b28f3de /src
parent40d4f12580b02fe440709f06cf6f4cbbfd48de2e (diff)
Fix 32 bit (#697)
* try x86 * ci: uniform build-linux-release-docker and their x86 * Update main.yml * fix animation Co-Authored-By: Alessio Tosto <rinnegatamante@gmail.com> * add explanation * add windows 32 in release * Update windows-compile.yml * fix windows compilation * fix win32 windows * Update libultraship --------- Co-authored-by: Alessio Tosto <rinnegatamante@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/animation.h12
-rw-r--r--src/engine/tracks/Track.h5
-rw-r--r--src/racing/render_courses.c2
3 files changed, 11 insertions, 8 deletions
diff --git a/src/animation.h b/src/animation.h
index 7fc35a6dd..21fbefe5e 100644
--- a/src/animation.h
+++ b/src/animation.h
@@ -168,11 +168,11 @@ Mat4 that the `thing` values are placed into.
#define ANIMATION_POP_MATRIX SIMPLE_ANIMATION_INSTRUCTION(POP_MATRIX)
#define ANIMATION_STOP SIMPLE_ANIMATION_INSTRUCTION(STOP_ANIMATION)
//! the pos is relative to the previous RENDER_MODEL_OR_ADD_POS if ANIMATION_DISABLE_AUTOMATIC_POP is used
-#define ANIMATION_RENDER_MODEL_AT(model, x, y, z) RENDER_MODEL_OR_ADD_POS, 0x00000007, 0x00000000, (s64) model, x, y, z
+#define ANIMATION_RENDER_MODEL_AT(model, x, y, z) RENDER_MODEL_OR_ADD_POS, 0x00000007, 0x00000000, (uintptr_t) model, x, y, z
//! use RENDER_MODEL_OR_ADD_POS
#define ANIMATION_RENDER_MODEL(model) ANIMATION_RENDER_MODEL_AT(model, 0x00000000, 0x00000000, 0x00000000)
//! use RENDER_MODEL_OR_ADD_POS
-#define ANIMATION_ADD_POS(x, y, z) ANIMATION_RENDER_MODEL_AT((s64) NULL, x, y, z)
+#define ANIMATION_ADD_POS(x, y, z) ANIMATION_RENDER_MODEL_AT((uintptr_t) NULL, x, y, z)
enum animation_type { RENDER_MODEL_OR_ADD_POS, DISABLE_AUTOMATIC_POP_MATRIX, POP_MATRIX, STOP_ANIMATION };
@@ -181,11 +181,11 @@ enum animation_type { RENDER_MODEL_OR_ADD_POS, DISABLE_AUTOMATIC_POP_MATRIX, POP
* in the armature
*/
typedef struct {
- /* 0x00 */ s64 type;
- /* 0x04 */ s64 size;
- /* 0x08 */ s64 always_zero_never_used;
+ /* 0x00 */ intptr_t type;
+ /* 0x04 */ intptr_t size;
+ /* 0x08 */ intptr_t always_zero_never_used;
/* 0x0C */ Gfx* model;
- /* 0x10 */ s64 pos[3];
+ /* 0x10 */ intptr_t pos[3];
} Armature;
typedef struct {
diff --git a/src/engine/tracks/Track.h b/src/engine/tracks/Track.h
index 8dfd1750e..cec6cd722 100644
--- a/src/engine/tracks/Track.h
+++ b/src/engine/tracks/Track.h
@@ -79,7 +79,10 @@ bool IsTriangleWindingInverted();
* This work is done in render_track_sections()
*/
typedef struct {
- uint64_t crc;
+ union {
+ uint64_t crc;
+ void* model;
+ };
u8 surfaceType; // Determines what kind of surface the player drives on (ex. dirt, asphalt, etc.)
u8 sectionId;
u16 clip; // enum in CustomTrack.h
diff --git a/src/racing/render_courses.c b/src/racing/render_courses.c
index c5cdf7e5f..97a8162f8 100644
--- a/src/racing/render_courses.c
+++ b/src/racing/render_courses.c
@@ -79,7 +79,7 @@ void parse_track_displaylists(TrackSections* asset) {
if (addr == NULL) {
printf("Warning: Could not find resource for section %d with crc 0x%llX\n", section->sectionId,
section->crc);
- addr = (void*) section->crc;
+ addr = section->model;
}
generate_collision_mesh(addr, section->surfaceType, section->sectionId);
section++;