]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/oo/base.qh
#include this
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / oo / base.qh
1 #ifndef BASE_H
2 #define BASE_H
3
4 #if defined(CSQC)
5 #elif defined(MENUQC)
6         #include "../../common/util-pre.qh"
7     #include "../sys-pre.qh"
8     #include "../../dpdefs/menudefs.qc"
9     #include "../../dpdefs/keycodes.qc"
10     #include "../sys-post.qh"
11     #include "../config.qh"
12     #include "../../warpzonelib/mathlib.qh"
13     #include "../../common/util.qh"
14     #include "../../common/test.qh"
15 #elif defined(SVQC)
16 #endif
17
18 .string classname;
19 entity Object_vtbl;
20 .string vtblname;
21 .entity vtblbase;
22 // THIS LINE INTENTIONALLY LEFT BLANK
23 entity spawnVtbl(entity e, entity b)
24 {
25         entity v;
26         v = spawn();
27         copyentity(e, v);
28         v.vtblname = v.classname;
29         v.classname = "vtbl";
30         if(b)
31                 v.vtblbase = b;
32         else
33                 v.vtblbase = v;
34         return v;
35 }
36 entity spawnObject()
37 {
38         entity e;
39         e = spawn();
40         e.classname = "Object";
41         if(!Object_vtbl)
42                 Object_vtbl = spawnVtbl(e, null_entity);
43         return e;
44 }
45 #endif