ladybird/Ports/quake3/patches/0002-Engine-Add-Serenity-so-q_platform.h.patch

50 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jesse Buhagiar <jooster669@gmail.com>
Date: Fri, 25 Mar 2022 09:39:42 +1100
Subject: [PATCH] Engine: Add Serenity so `q_platform.h`
---
code/qcommon/q_platform.h | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
index 72dbfe1..3bd829d 100644
--- a/code/qcommon/q_platform.h
+++ b/code/qcommon/q_platform.h
@@ -290,6 +290,35 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
+//=================================================================== SERENITY ===
+
+#if defined(__serenity__)
+
+#include <sys/types.h>
+
+#ifndef __serenity__
+ #define __serenity__
+#endif
+
+#define Q3_LITTLE_ENDIAN
+
+#define OS_STRING "serenity"
+
+#define ID_INLINE inline
+#define PATH_SEP '/'
+
+#ifdef __i386__
+#define ARCH_STRING "x86"
+#elif defined __amd64__
+#undef idx64
+#define idx64 1
+#define ARCH_STRING "x86_64"
+#endif
+
+#define DLL_EXT ".so"
+
+#endif
+
//================================================================== Q3VM ===
#ifdef Q3_VM