]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/skin.qh
#include this
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / skin.qh
1 #ifndef SKIN_H
2 #define SKIN_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     #include "oo/base.qh"
16     #include "../common/playerstats.qh"
17     #include "../common/teams.qh"
18     #include "../common/constants.qh"
19     #include "../common/mapinfo.qh"
20     #include "../common/campaign_common.qh"
21     #include "../common/weapons/weapons.qh"
22     #include "../common/counting.qh"
23     #include "../common/command/markup.qh"
24     #include "../common/command/rpn.qh"
25     #include "../common/command/generic.qh"
26     #include "../common/command/shared_defs.qh"
27     #include "../common/urllib.qh"
28     #include "../common/monsters/monsters.qh"
29     #include "command/menu_cmd.qh"
30     #include "menu.qh"
31     #include "draw.qh"
32 #elif defined(SVQC)
33 #endif
34
35 #define SKINBEGIN
36 #define SKINVECTOR(name,def) vector SKIN##name = def
37 #define SKINFLOAT(name,def) float SKIN##name = def
38 //#define SKINSTRING(name,def) const string SKIN##name = def
39 #define SKINSTRING(name,def) string SKIN##name = def
40 #define SKINEND
41 #include "skin-customizables.inc"
42 #undef SKINEND
43 #undef SKINBEGIN
44 #undef SKINSTRING
45 #undef SKINFLOAT
46 #undef SKINVECTOR
47
48 #define SKINBEGIN void Skin_ApplySetting(string key, string value) { switch(key) {
49 #define SKINVECTOR(name,def) case #name: SKIN##name = stov(value); break
50 #define SKINFLOAT(name,def) case #name: SKIN##name = stof(value); break
51 //#define SKINSTRING(name,def) case #name: break
52 #define SKINSTRING(name,def) case #name: SKIN##name = strzone(value); break
53         // I know this leaks memory when skin is read multiple times. Screw it.
54 #define SKINEND case "": break; case "//": break; default: dprint("Invalid key in skin file: ", key, "\n"); } }
55 #include "skin-customizables.inc"
56 #undef SKINEND
57 #undef SKINSTRING
58 #undef SKINFLOAT
59 #undef SKINVECTOR
60 #undef SKINBEGIN
61 #endif