From a4c01b784b8e65f416a007b06caa8eb8a4c3dd12 Mon Sep 17 00:00:00 2001 From: Fabien Romano Date: Thu, 1 Jan 2026 21:06:40 +0100 Subject: [PATCH] fix build on OpenBSD (#621) * fix build on OpenBSD * Update src/port/Game.cpp * Update ceremony_and_credits.c --- src/ending/ceremony_and_credits.c | 2 +- src/port/Game.cpp | 2 +- src/port/Game.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ending/ceremony_and_credits.c b/src/ending/ceremony_and_credits.c index 4af1c5ac7..fef0f95c4 100644 --- a/src/ending/ceremony_and_credits.c +++ b/src/ending/ceremony_and_credits.c @@ -998,7 +998,7 @@ void func_80284154(CinematicCamera* camera) { void func_80284184(CinematicCamera* camera) { f32 trophy; - if (gTrophyIndex != NULL) { + if (gTrophyIndex != NULL_OBJECT_ID) { trophy = ((gObjectList[gTrophyIndex].pos[1] - camera->lookAt[1]) * 0.9f) + camera->lookAt[1]; f32_lerp(&camera->pos[1], trophy, 0.5); } diff --git a/src/port/Game.cpp b/src/port/Game.cpp index dd4c4b6a5..ee958daba 100644 --- a/src/port/Game.cpp +++ b/src/port/Game.cpp @@ -70,7 +70,7 @@ HarbourMastersIntro gMenuIntro; TrackEditor::Editor gEditor; -s32 gTrophyIndex = NULL; +s32 gTrophyIndex = NULL_OBJECT_ID; /** Spawner Registries **/ Registry gTrackRegistry; diff --git a/src/port/Game.h b/src/port/Game.h index 743aecb75..a457be7ad 100644 --- a/src/port/Game.h +++ b/src/port/Game.h @@ -239,6 +239,7 @@ __attribute__((format(printf, 1, 2))) #if defined(_MSC_VER) __declspec(noreturn) #elif defined(__APPLE__) +#elif defined(__OpenBSD__) #elif defined(__cplusplus) || (__STDC_VERSION__ >= 202311) [[noreturn]] #elif defined(__GNUC__)