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