]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/util-pre.qh
f246200378ff5adcccb374212c0972797f4c9661
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util-pre.qh
1 #ifndef UTIL_PRE_H
2 #define UTIL_PRE_H
3
4 #ifndef NOCOMPAT
5     #define COMPAT_NO_MOD_IS_XONOTIC
6 #endif
7
8 #ifndef QCC_SUPPORT_ACCUMULATE
9     #ifdef GMQCC
10         #define QCC_SUPPORT_ACCUMULATE
11     #endif
12 #endif
13
14 #ifndef QCC_SUPPORT_NIL
15     #ifdef GMQCC
16         #define QCC_SUPPORT_NIL
17     #endif
18 #endif
19
20 #ifndef QCC_SUPPORT_INT
21     #define int float
22
23     #define stoi(s) stof(s)
24     #define stob(s) stof(s)
25     #define itos(i) ftos(i)
26 #else
27     #define stoi(s) ((int) stof(s))
28     #define stob(s) ((bool) stof(s))
29     #define itos(i) ftos(i)
30 #endif
31
32 #ifndef QCC_SUPPORT_BOOL
33     #define bool float
34
35     // Boolean Constants
36     const int true      = 1;
37     const int false = 0;
38 #endif
39
40 // Transitional aliases
41 [[deprecated("use true")]] [[alias("true")]] const bool TRUE;
42 [[deprecated("use false")]] [[alias("false")]] const bool FALSE;
43
44 #endif