]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/common/util.qh
Get VoreTournament code to compile with gmqcc. To be compiled with the same parameter...
[voretournament/voretournament.git] / data / qcsrc / common / util.qh
index ec704494393eebf68662fd5f5a2e287391a31884..97298d89114d52caf010c158ad96b5f63b29001c 100644 (file)
@@ -5,7 +5,7 @@
        #define func __merge__##otherfunc \\r
        #else \\r
        #define func otherfunc \\r
-       #endif\r
+       #endif \\r
 \r
 // this returns a tempstring containing a copy of s with additional \n newlines added, it also replaces \n in the text with a real newline\r
 // NOTE: s IS allowed to be a tempstring\r
@@ -15,7 +15,7 @@ string wordwrap(string s, float l);
 void wordwrap_sprint(string s, float l);\r
 #endif\r
 #endif\r
-void wordwrap_cb(string s, float l, void(string) callback)\r
+void wordwrap_cb(string s, float l, void(string) callback);\r
 \r
 #ifndef SVQC\r
 string draw_currentSkin;\r
@@ -111,7 +111,11 @@ vector mi_pictexcoord3; // texcoords of the image corners (after transforming, t
 void get_mi_min_max_texcoords(float mode);\r
 #endif\r
 \r
+#ifndef GMQCC\r
 #define FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(x) void reference_##x() { x = x; }\r
+#else\r
+#define FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(x)\r
+#endif\r
 \r
 float almost_equals(float a, float b);\r
 float almost_in_bounds(float a, float b, float c);\r
@@ -192,8 +196,15 @@ void WriteInt24_t(float dest, float val);
 #endif\r
 \r
 // the NULL function\r
-const var void func_null(void); FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(func_null)\r
-const var string string_null;\r
+#ifdef GMQCC\r
+#define null nil\r
+#define func_null nil\r
+#define string_null nil\r
+#else\r
+#define null SUB_null\r
+var void func_null(void);\r
+var string string_null;\r
+#endif\r
 float float2range11(float f);\r
 float float2range01(float f);\r
 \r