]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/lib/_all.inc
Cleanup: further split default columns layout and move the space separator to the...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / _all.inc
1 #ifndef NOCOMPAT
2         #define COMPAT_NO_MOD_IS_XONOTIC
3 #endif
4
5 #include "compiler.qh"
6
7 #ifndef QCC_SUPPORT_INT
8         #define int float
9 #endif
10
11 #ifndef QCC_SUPPORT_BOOL
12         #define bool float
13 #endif
14
15 #if defined(CSQC)
16         #include <dpdefs/csprogsdefs.qh>
17         #include <dpdefs/keycodes.qh>
18 #elif defined(SVQC)
19         #include <server/sys-pre.qh>
20         #include <dpdefs/progsdefs.qh>
21         #include <dpdefs/dpextensions.qh>
22         #include <server/sys-post.qh>
23 #elif defined(MENUQC)
24         #include <dpdefs/menudefs.qh>
25         #include <dpdefs/keycodes.qh>
26 #endif
27
28 #define USING(name, T) typedef T name
29
30 #include "bool.qh"
31 #include "int.qh"
32
33 #include "macro.qh"
34
35 #if NDEBUG
36     #define TC(T, sym) MACRO_BEGIN MACRO_END
37 #else
38     #define TC(T, sym) MACRO_BEGIN \
39         if (!is_##T(sym)) { \
40             LOG_WARNINGF("Type check failed: " #sym " :: " #T); \
41             isnt_##T(sym); \
42         } \
43     MACRO_END
44 #endif
45
46 #define   is_float(        this) (true || ftoe(this))
47 #define isnt_float(        this)
48 #define   is_vector(       this) (true || vtos(this))
49 #define isnt_vector(       this)
50 #define   is_string(       this) (true || stof(this))
51 #define isnt_string(       this)
52 #define   is_entity(       this) (true || etof(this))
53 #define isnt_entity(       this)
54 bool      is_int(    float this) { return this == floor(this); }
55 void    isnt_int(    float this) { print(ftos(this)); }
56 bool      is_bool(   float this) { return this == true || this == false; }
57 void    isnt_bool(   float this) { print(ftos(this)); }
58
59 #include "warpzone/mathlib.qc"
60
61 #include "accumulate.qh"
62 #include "angle.qc"
63 #include "arraylist.qh"
64 #include "bits.qh"
65 #include "color.qh"
66 #include "counting.qh"
67 #include "cvar.qh"
68 #include "defer.qh"
69 #include "draw.qh"
70 #include "enumclass.qh"
71 #include "file.qh"
72 #include "functional.qh"
73 #include "i18n.qh"
74 #include "iter.qh"
75 #include "json.qc"
76 #include "lazy.qh"
77 #include "linkedlist.qh"
78 #include "log.qh"
79 #include "map.qh"
80 #include "markdown.qh"
81 #include "math.qh"
82 #include "misc.qh"
83 #include "net.qh"
84 #include "nil.qh"
85 #include "noise.qh"
86 #include "oo.qh"
87 #include "p2mathlib.qc"
88 #include "progname.qh"
89 #include "random.qc"
90 #include "registry.qh"
91 #include "registry_net.qh"
92 #include "replicate.qh"
93 #include "self.qh"
94 #include "sortlist.qc"
95 #include "sort.qh"
96 #include "spawnfunc.qh"
97 #include "static.qh"
98 #include "stats.qh"
99 #include "string.qh"
100 #include "struct.qh"
101 #include "test.qc"
102 #include "unsafe.qh"
103 #include "urllib.qc"
104 #include "vector.qh"
105 #include "yenc.qh"