#define itos(i) ftos(i)
#endif
-#ifndef QCC_SUPPORT_BOOL
- #define bool float
-
- // Boolean Constants
- const int true = 1;
- const int false = 0;
-#endif
-
-// Transitional aliases
-[[deprecated("use true")]] [[alias("true")]] const bool TRUE;
-[[deprecated("use false")]] [[alias("false")]] const bool FALSE;
-
#define FOREACH_ARRAY(arr, start, end, cond, body) do { \
for (int i = start; i < end; ++i) { \
const noref entity it = arr[i]; \
return input;
}
-#ifndef MENUQC
-// get true/false value of a string with multiple different inputs
-float InterpretBoolean(string input)
-{
- switch(strtolower(input))
- {
- case "yes":
- case "true":
- case "on":
- return true;
-
- case "no":
- case "false":
- case "off":
- return false;
-
- default: return stof(input);
- }
-}
-#endif
-
#ifdef CSQC
entity ReadCSQCEntity()
{
string MakeConsoleSafe(string input);
-#ifndef MENUQC
-float InterpretBoolean(string input);
-#endif
-
// generic shutdown handler
void Shutdown();
--- /dev/null
+#ifndef BOOL_H
+#define BOOL_H
+
+#ifndef QCC_SUPPORT_BOOL
+ #define bool float
+
+ // Boolean Constants
+ const int true = 1;
+ const int false = 0;
+#endif
+
+// Transitional aliases
+[[deprecated("use true")]] [[alias("true")]] const bool TRUE;
+[[deprecated("use false")]] [[alias("false")]] const bool FALSE;
+
+// get true/false value of a string with multiple different inputs
+float InterpretBoolean(string input)
+{
+ switch (strtolower(input))
+ {
+ case "yes":
+ case "true":
+ case "on":
+ return true;
+
+ case "no":
+ case "false":
+ case "off":
+ return false;
+
+ default: return stof(input);
+ }
+}
+
+float boolean(float value) { // if value is 0 return false (0), otherwise return true (1)
+ return (value == 0) ? false : true;
+}
+
+#endif
+#include "Bool.qh"
+
#include "../warpzonelib/mathlib.qc"
#include "Accumulate.qh"
return msg;
}
-float boolean(float value) { // if value is 0 return false (0), otherwise return true (1)
- return (value == 0) ? false : true;
-}
-
/*
=============
GetCvars