]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Check features, not compilers
authorTimePath <andrew.hardaker1995@gmail.com>
Mon, 26 Jan 2015 08:56:51 +0000 (19:56 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 26 Jan 2015 08:56:51 +0000 (19:56 +1100)
qcsrc/common/animdecide.qc
qcsrc/common/util-pre.qh
qcsrc/common/util.qh

index 4a3873991a885c580b11408290bb380ec2a10b08..8bd689c18740721dbeb37ba09688dd21962c8bc1 100644 (file)
@@ -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)
index 8b35ed9e141392ccc8360f93351e1b132ea9f204..bba5af1f4ffb85b5d1070311414529669d1619a0 100644 (file)
@@ -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
index d4e3ccd5a91276547ab4c786683dab082bfef4ee..6cac5fa56ce856c0afd6602d954bd1d705d7b646 100644 (file)
@@ -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