#ifndef SKIN_H #define SKIN_H #if defined(CSQC) #elif defined(MENUQC) #include "../common/util-pre.qh" #include "sys-pre.qh" #include "../dpdefs/menudefs.qc" #include "../dpdefs/keycodes.qc" #include "sys-post.qh" #include "config.qh" #include "../warpzonelib/mathlib.qh" #include "../common/util.qh" #include "../common/test.qh" #include "oo/base.qh" #include "../common/playerstats.qh" #include "../common/teams.qh" #include "../common/constants.qh" #include "../common/mapinfo.qh" #include "../common/campaign_common.qh" #include "../common/weapons/weapons.qh" #include "../common/counting.qh" #include "../common/command/markup.qh" #include "../common/command/rpn.qh" #include "../common/command/generic.qh" #include "../common/command/shared_defs.qh" #include "../common/urllib.qh" #include "../common/monsters/monsters.qh" #include "command/menu_cmd.qh" #include "menu.qh" #include "draw.qh" #elif defined(SVQC) #endif #define SKINBEGIN #define SKINVECTOR(name,def) vector SKIN##name = def #define SKINFLOAT(name,def) float SKIN##name = def //#define SKINSTRING(name,def) const string SKIN##name = def #define SKINSTRING(name,def) string SKIN##name = def #define SKINEND #include "skin-customizables.inc" #undef SKINEND #undef SKINBEGIN #undef SKINSTRING #undef SKINFLOAT #undef SKINVECTOR #define SKINBEGIN void Skin_ApplySetting(string key, string value) { switch(key) { #define SKINVECTOR(name,def) case #name: SKIN##name = stov(value); break #define SKINFLOAT(name,def) case #name: SKIN##name = stof(value); break //#define SKINSTRING(name,def) case #name: break #define SKINSTRING(name,def) case #name: SKIN##name = strzone(value); break // I know this leaks memory when skin is read multiple times. Screw it. #define SKINEND case "": break; case "//": break; default: dprint("Invalid key in skin file: ", key, "\n"); } } #include "skin-customizables.inc" #undef SKINEND #undef SKINSTRING #undef SKINFLOAT #undef SKINVECTOR #undef SKINBEGIN #endif