From: TimePath Date: Mon, 26 Jan 2015 08:56:51 +0000 (+1100) Subject: Check features, not compilers X-Git-Tag: xonotic-v0.8.1~133^2~25 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2891d470f2b3ccc6acbc04b83e50f30ef7d1d04b;p=xonotic%2Fxonotic-data.pk3dir.git Check features, not compilers --- diff --git a/qcsrc/common/animdecide.qc b/qcsrc/common/animdecide.qc index 4a3873991..8bd689c18 100644 --- a/qcsrc/common/animdecide.qc +++ b/qcsrc/common/animdecide.qc @@ -216,9 +216,7 @@ vector animdecide_getloweranim(entity e) } } // can't get here -#ifdef GMQCC return vec3(e.anim_idle.x, t, ANIMPRIO_IDLE); -#endif } void animdecide_setimplicitstate(entity e, float onground) diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index 8b35ed9e1..bba5af1f4 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -1,18 +1,30 @@ #ifndef NOCOMPAT -# define COMPAT_NO_MOD_IS_XONOTIC + #define COMPAT_NO_MOD_IS_XONOTIC +#endif + +#ifndef QCC_SUPPORT_ACCUMULATE + #ifdef GMQCC + #define QCC_SUPPORT_ACCUMULATE + #endif +#endif + +#ifndef QCC_SUPPORT_NIL + #ifdef GMQCC + #define QCC_SUPPORT_NIL + #endif #endif #ifndef QCC_SUPPORT_INT -#define int float + #define int float -#define stoi(s) stof(s) -#define itos(s) ftos(s) + #define stoi(s) stof(s) + #define itos(s) ftos(s) #endif #ifndef QCC_SUPPORT_BOOL -#define bool float + #define bool float -// Boolean Constants -const bool true = 1; -const bool false = 0; + // Boolean Constants + const bool true = 1; + const bool false = 0; #endif diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index d4e3ccd5a..6cac5fa56 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -1,4 +1,4 @@ -#ifdef GMQCC +#ifdef QCC_SUPPORT_ACCUMULATE # define ACCUMULATE_FUNCTION(func,otherfunc) \ [[accumulate]] void func() { otherfunc(); } # define CALL_ACCUMULATED_FUNCTION(func) \ @@ -233,7 +233,7 @@ void WriteInt72_t(float dest, vector val); #endif // the NULL function -#ifdef GMQCC +#ifdef QCC_SUPPORT_NIL #define func_null nil #define string_null nil #else