]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/menu/skin.qh
particles: volume weighting = negative count, absolute weighting = positive count
[divverent/nexuiz.git] / data / qcsrc / menu / skin.qh
1 #define SKINBEGIN
2 #define SKINVECTOR(name,def) var vector SKIN##name = def
3 #define SKINFLOAT(name,def) var float SKIN##name = def
4 #define SKINSTRING(name,def) const string SKIN##name = def
5 #define SKINEND
6 #include "skin-customizables.inc"
7 #undef SKINEND
8 #undef SKINBEGIN
9 #undef SKINSTRING
10 #undef SKINFLOAT
11 #undef SKINVECTOR
12
13 #define SKINBEGIN void Skin_ApplySetting(string key, string value) { switch(key) {
14 #define SKINVECTOR(name,def) case #name: SKIN##name = stov(value); break
15 #define SKINFLOAT(name,def) case #name: SKIN##name = stof(value); break
16 #define SKINSTRING(name,def) case #name: break
17 #define SKINEND case "": break; case "//": break; default: print("Invalid key in skin file: ", key, "\n"); } }
18 #include "skin-customizables.inc"
19 #undef SKINEND
20 #undef SKINSTRING
21 #undef SKINFLOAT
22 #undef SKINVECTOR
23 #undef SKINBEGIN