--- Daodan/src/Daodan_Config.h 2014/03/16 23:35:10 984 +++ Daodan/src/Daodan_Config.h 2014/04/07 10:33:27 994 @@ -3,48 +3,41 @@ #include "stdint.h" -void DDrConfig(int argc, char* argv[]); +typedef void (*cmd_callback)(); + +typedef enum { + C_CMD, + C_BOOL, + C_INT, + C_STRING, + EXT_BOOL +} OptionType_t; + +typedef union { + int intBoolVal; + uint8_t* extBoolVal; + char* stringVal; + cmd_callback callback; +} OptionValue_t; + +typedef struct { + char* name; + char* description; + OptionType_t type; + OptionValue_t defaultValue; + OptionValue_t value; +} ConfigOption_t; + +typedef struct { + char* name; + char* description; + ConfigOption_t options[50]; +} ConfigSection_t; -extern bool patch_alttab; -extern bool patch_argb8888; -extern bool patch_binkplay; -extern bool patch_bsl; -extern bool patch_cheater; -extern bool patch_cheatsenabled; -extern bool patch_cheattable; -extern bool patch_clipcursor; -extern bool patch_cooldowntimer; -extern bool patch_daodandisplayenum; -extern bool patch_directinput; -extern bool patch_disablecmdline; -extern bool patch_flatline; -extern bool patch_fonttexturecache; -extern bool patch_getcmdline; -extern bool patch_hdscreens_lowres; -extern bool patch_highres_console; -extern bool patch_kickguns; -extern bool patch_killvtune; -extern bool patch_largetextures; -extern bool patch_levelplugins; -extern bool patch_newweapon; -extern bool patch_nomultibyte; -extern bool patch_optionsvisible; -extern bool patch_particledisablebit; -extern bool patch_pathfinding; -extern bool patch_projaware; -extern bool patch_safeprintf; -extern bool patch_showalllasersights; -extern bool patch_showtriggervolumes; -extern bool patch_throwtest; -extern bool patch_usedaodangl; -extern bool patch_usegettickcount; -extern bool patch_wpfadetime; - -extern bool opt_border; -extern bool opt_gamma; -extern bool opt_topmost; -extern bool opt_usedaodanbsl; -extern bool patch_chinese; +void DDrConfig(int argc, char* argv[]); + +ConfigOption_t* DDrConfig_GetOptOfType(const char* fullOptName, OptionType_t type); +const char* DDrConfig_GetOptionTypeName(OptionType_t type); #endif