From 8533189561f0ced364c5b11c69b3b4ecc0a06d8d Mon Sep 17 00:00:00 2001 From: Raf <> Date: Mon, 12 Aug 2024 21:20:30 +0800 Subject: [PATCH] portx64: include "platform.h" wherever the flag PLATFORM_64bit is used, to avoid possible nasty surprises --- include/PR/R4300.h | 1 + include/PR/n_libaudio.h | 1 + src/game/bg.c | 1 + src/game/bondgun.c | 1 + src/game/dlights.c | 1 + src/game/gfxmemory.c | 1 + src/game/menu.c | 1 + src/game/nbomb.c | 1 + src/game/player.c | 1 + src/game/setuppads.c | 1 + src/game/tex.c | 1 + src/game/texdecompress.c | 1 + src/lib/modelasm_c.c | 1 + src/lib/mp3.c | 1 + src/lib/mp3/mp3.h | 1 + src/lib/vi.c | 1 + 16 files changed, 16 insertions(+) diff --git a/include/PR/R4300.h b/include/PR/R4300.h index 061ed8158..d5212ec6a 100644 --- a/include/PR/R4300.h +++ b/include/PR/R4300.h @@ -22,6 +22,7 @@ #define __R4300_H__ #include +#include "platform.h" /* * Segment base addresses and sizes diff --git a/include/PR/n_libaudio.h b/include/PR/n_libaudio.h index 5a06e9558..d672986e8 100644 --- a/include/PR/n_libaudio.h +++ b/include/PR/n_libaudio.h @@ -28,6 +28,7 @@ extern "C" { #include #include +#include "platform.h" struct var8009c340 { u8 surround; diff --git a/src/game/bg.c b/src/game/bg.c index a3cd5047a..1ad070d12 100644 --- a/src/game/bg.c +++ b/src/game/bg.c @@ -47,6 +47,7 @@ #include "preprocess.h" #include "system.h" #include "video.h" +#include "platform.h" #endif #define BGCMD_END 0x00 diff --git a/src/game/bondgun.c b/src/game/bondgun.c index e3359415d..f82473f3a 100644 --- a/src/game/bondgun.c +++ b/src/game/bondgun.c @@ -56,6 +56,7 @@ #ifndef PLATFORM_N64 #include "game/stagetable.h" #include "video.h" +#include "platform.h" #endif #define GUNLOADSTATE_FLUX 0 diff --git a/src/game/dlights.c b/src/game/dlights.c index 2dd9af0fe..93d59f826 100644 --- a/src/game/dlights.c +++ b/src/game/dlights.c @@ -28,6 +28,7 @@ #include "lib/lib_317f0.h" #include "data.h" #include "types.h" +#include "platform.h" const char var7f1a78e0[] = "LIGHTS : Hit occured on light %d in room %d\n"; const char var7f1a7910[] = "L2(%d) -> "; diff --git a/src/game/gfxmemory.c b/src/game/gfxmemory.c index f105bce2c..79e61f9bd 100644 --- a/src/game/gfxmemory.c +++ b/src/game/gfxmemory.c @@ -11,6 +11,7 @@ #include "lib/str.h" #include "data.h" #include "types.h" +#include "platform.h" /** * This file handles memory usage for graphics related tasks. diff --git a/src/game/menu.c b/src/game/menu.c index 31ebba11c..8df5e4478 100644 --- a/src/game/menu.c +++ b/src/game/menu.c @@ -51,6 +51,7 @@ #ifndef PLATFORM_N64 #include "video.h" #include "input.h" +#include "platform.h" #define BLUR_OFS 10 #else #define BLUR_OFS 30 diff --git a/src/game/nbomb.c b/src/game/nbomb.c index e3e3dcb9d..d0e59433c 100644 --- a/src/game/nbomb.c +++ b/src/game/nbomb.c @@ -24,6 +24,7 @@ #include "lib/lib_317f0.h" #include "data.h" #include "types.h" +#include "platform.h" s16 var8009cb00; s32 var8009cb04; diff --git a/src/game/player.c b/src/game/player.c index 4c72eb226..4d2eb6389 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -73,6 +73,7 @@ #ifndef PLATFORM_N64 #include "video.h" #include "input.h" +#include "platform.h" #endif s32 g_DefaultWeapons[2]; diff --git a/src/game/setuppads.c b/src/game/setuppads.c index 241d31479..52a7cba11 100644 --- a/src/game/setuppads.c +++ b/src/game/setuppads.c @@ -11,6 +11,7 @@ #include "lib/model.h" #include "data.h" #include "types.h" +#include "platform.h" /** * The function assumes that a pad file's data has been loaded from the ROM diff --git a/src/game/tex.c b/src/game/tex.c index f63a00c23..f7d226b15 100644 --- a/src/game/tex.c +++ b/src/game/tex.c @@ -8,6 +8,7 @@ #include "gbiex.h" #include "textures.h" #include "types.h" +#include "platform.h" #define TXMODE_WRAP 0 #define TXMODE_CLAMP 1 diff --git a/src/game/texdecompress.c b/src/game/texdecompress.c index 1e39dc2f6..40e1e4a10 100644 --- a/src/game/texdecompress.c +++ b/src/game/texdecompress.c @@ -12,6 +12,7 @@ #include "types.h" #ifndef PLATFORM_N64 #include "mod.h" +#include "platform.h" #endif struct texture *g_Textures; diff --git a/src/lib/modelasm_c.c b/src/lib/modelasm_c.c index ea24e12c8..6570424bb 100644 --- a/src/lib/modelasm_c.c +++ b/src/lib/modelasm_c.c @@ -5,6 +5,7 @@ #include "lib/model.h" #include "lib/mtx.h" #include "types.h" +#include "platform.h" struct t0slot { u16 unk00; diff --git a/src/lib/mp3.c b/src/lib/mp3.c index e94af6431..1d20d9151 100644 --- a/src/lib/mp3.c +++ b/src/lib/mp3.c @@ -6,6 +6,7 @@ #include "lib/mp3.h" #include "mp3/mp3.h" #include "types.h" +#include "platform.h" /** * These two ABI commands are used in this file, but the format of the data diff --git a/src/lib/mp3/mp3.h b/src/lib/mp3/mp3.h index eab395a1c..96447a84b 100644 --- a/src/lib/mp3/mp3.h +++ b/src/lib/mp3/mp3.h @@ -2,6 +2,7 @@ #define _IN_LIB_MP3_MP3_H #include #include "types.h" +#include "platform.h" struct mp3decfourbytes { u8 bytes[2]; diff --git a/src/lib/vi.c b/src/lib/vi.c index 992264dcb..884ee8d19 100644 --- a/src/lib/vi.c +++ b/src/lib/vi.c @@ -16,6 +16,7 @@ #include "types.h" #ifndef PLATFORM_N64 #include "video.h" +#include "platform.h" #endif #define TO_U16_A(x) ((u16)(x))