/* dvar->flags */
#define DVAR_SCRIPT_DEFINED 0x10
union DvarLimits
{
struct {
int stringCount;
const char *const *strings;
} enumeration;
struct {
int min;
int max;
} integer;
struct {
float min;
float max;
} value, vector;
};
union DvarValue
{
bool enabled;
int integer;
unsigned int unsignedInt;
float value;
float vector[4];
const char *string;
char color[4];
};
struct dvar_t
{
const char *name;
unsigned int flags;
enum : char
{
DVAR_TYPE_BOOL = 0x0,
DVAR_TYPE_FLOAT = 0x1,
DVAR_TYPE_FLOAT_2 = 0x2,
DVAR_TYPE_FLOAT_3 = 0x3,
DVAR_TYPE_FLOAT_4 = 0x4,
DVAR_TYPE_INT = 0x5,
DVAR_TYPE_ENUM = 0x6,
DVAR_TYPE_STRING = 0x7,
DVAR_TYPE_COLOR = 0x8,
DVAR_TYPE_FLOAT_3_COLOR = 0x9,
DVAR_TYPE_COUNT = 0xA,
} type;
bool modified;
DvarValue current;
DvarValue latched;
DvarValue reset;
DvarLimits domain;
dvar_t *hashNext;
};