X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fcommon%2Futil.qh;fp=data%2Fqcsrc%2Fcommon%2Futil.qh;h=97298d89114d52caf010c158ad96b5f63b29001c;hp=ec704494393eebf68662fd5f5a2e287391a31884;hb=b2df32d96df3e954d54f6e4b9bbb6c98d77ef507;hpb=045633c16560b0d75e3670d753c8898d5d4dda95 diff --git a/data/qcsrc/common/util.qh b/data/qcsrc/common/util.qh index ec704494..97298d89 100644 --- a/data/qcsrc/common/util.qh +++ b/data/qcsrc/common/util.qh @@ -5,7 +5,7 @@ #define func __merge__##otherfunc \ #else \ #define func otherfunc \ - #endif + #endif \ // 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 // NOTE: s IS allowed to be a tempstring @@ -15,7 +15,7 @@ string wordwrap(string s, float l); void wordwrap_sprint(string s, float l); #endif #endif -void wordwrap_cb(string s, float l, void(string) callback) +void wordwrap_cb(string s, float l, void(string) callback); #ifndef SVQC string draw_currentSkin; @@ -111,7 +111,11 @@ vector mi_pictexcoord3; // texcoords of the image corners (after transforming, t void get_mi_min_max_texcoords(float mode); #endif +#ifndef GMQCC #define FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(x) void reference_##x() { x = x; } +#else +#define FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(x) +#endif float almost_equals(float a, float b); float almost_in_bounds(float a, float b, float c); @@ -192,8 +196,15 @@ void WriteInt24_t(float dest, float val); #endif // the NULL function -const var void func_null(void); FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(func_null) -const var string string_null; +#ifdef GMQCC +#define null nil +#define func_null nil +#define string_null nil +#else +#define null SUB_null +var void func_null(void); +var string string_null; +#endif float float2range11(float f); float float2range01(float f);