]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move TRUE and FALSE definitions to util-pre.qh and hide them under a definition check...
authorMario <zacjardine@y7mail.com>
Fri, 23 Jan 2015 05:08:11 +0000 (16:08 +1100)
committerMario <zacjardine@y7mail.com>
Fri, 23 Jan 2015 05:08:11 +0000 (16:08 +1100)
qcsrc/client/csqc_constants.qc
qcsrc/common/util-pre.qh
qcsrc/dpdefs/csprogsdefs.qc
qcsrc/dpdefs/menudefs.qc
qcsrc/dpdefs/progsdefs.qc
qcsrc/server/sys-post.qh
qcsrc/warpzonelib/mathlib.qh

index 4d966476f3eb91d7ac835c62994ac296f1d005ad..919fbc768068e39f7a365457fe10ce2b42968902 100644 (file)
@@ -49,12 +49,6 @@ const float          CONTENT_SLIME                                   = -4;
 const float            CONTENT_LAVA                                    = -5;
 const float            CONTENT_SKY                                             = -6;
 
-// Boolean Constants
-const float            true                                                    = 1;
-const float            false                                                   = 0;
-const float    TRUE                                                    = 1;
-const float    FALSE                                                   = 0;
-
 // Vector / Hull Constants
 const vector   VEC_1                                                   = '1 1 1';
 const vector   VEC_0                                                   = '0 0 0';
index 634b0fdf1d6b06c82ec8080c26d535da25986670..6e2cffa30772175e7b15b902cc45c8751924e12e 100644 (file)
@@ -1,3 +1,17 @@
 #ifndef NOCOMPAT
 # define COMPAT_NO_MOD_IS_XONOTIC
 #endif
+
+#ifndef QCC_SUPPORT_INT
+#define int float
+#endif
+
+#ifndef QCC_SUPPORT_BOOL
+#define bool float
+
+// Boolean Constants
+const float true       = 1;
+const float false      = 0;
+const float TRUE       = 1;
+const float FALSE      = 0;
+#endif
index 8f4ec8b414f34fc2a42177f15cda496f59aa1a9b..50586fcc850ee2f781d247f7349ecddbbfb64bd6 100644 (file)
@@ -253,12 +253,6 @@ const float MOVE_NORMAL                                            = 0;
 const float MOVE_NOMONSTERS                                    = 1;
 const float MOVE_MISSILE                                       = 2;
 
-// Boolean Constants
-const float true       = 1;
-const float false      = 0;
-const float TRUE       = 1;
-const float FALSE      = 0;
-
 const float EXTRA_LOW = -99999999;
 const float EXTRA_HIGH = 99999999;
 
@@ -393,7 +387,7 @@ string(entity ent) etos = #65;
 string(string s) precache_file = #68;
 void(entity e) makestatic = #69;
 
-void(string var, string val) cvar_set = #72;
+void(string name, string value) cvar_set = #72;
 
 void(vector pos, string samp, float vol, float atten) ambientsound = #74;
 string(string s) precache_model2 = #75;
index 0d6c253709540b5f4f82ce8a9d50d7472a2dd21f..58a2ef585fdc272b1d1622469fc4f1eefa7b9816 100644 (file)
@@ -37,18 +37,6 @@ float FILE_READ = 0;
 float FILE_APPEND = 1;
 float FILE_WRITE = 2;
 
-///////////////////////////
-// logical constants (just for completeness)
-
-float TRUE     = 1;
-float FALSE = 0;
-
-///////////////////////////
-// boolean constants
-
-float true = 1;
-float false = 0;
-
 ///////////////////////////
 // msg constants
 
index 2ccd843145b0db8807a777d9285bf2e5e60478b8..c25d4ef45ebb49d1f0395cb00a64343cd57d507b 100644 (file)
@@ -225,9 +225,6 @@ void                end_sys_fields;                 // flag for structure dumping
 // constants
 //
 
-float  FALSE                                   = 0;
-float  TRUE                                    = 1;
-
 // edict.flags
 float  FL_FLY                                  = 1;
 float  FL_SWIM                                 = 2;
@@ -490,7 +487,7 @@ void(string s) changelevel = #70;
 
 //#71 was removed
 
-void(string var, string val) cvar_set = #72;   // sets cvar.value
+void(string name, string value) cvar_set = #72;        // sets cvar.value
 
 void(entity client, string s, ...) centerprint = #73;  // sprint, but in middle
 
index 9c389da4392455956528709533d398bcf1af8ee1..10b1abcef9909e7299f567bd9d53844f9a0c3519 100644 (file)
@@ -9,6 +9,6 @@
 #undef cvar_string
 #undef cvar
 
-var float(string var) cvar;
-var string(string var) cvar_string;
-var void(string var, string val) cvar_set;
+var float(string name) cvar;
+var string(string name) cvar_string;
+var void(string name, string value) cvar_set;
index 9c8b969fbaedbb2d2ddb02592617e623235fa676..18d402a360ddf337877b009bac80547837a9021f 100644 (file)
@@ -3,8 +3,6 @@
 // The commented-out functions need no implementation because DarkPlaces offers
 // them as builtins. They are listed here anyway for completeness sake.
 
-#define int float
-
 #define FP_NAN 0
 #define FP_INFINITE 1
 #define FP_ZERO 2