DVARs (MW2): Difference between revisions
Aerosoul94 (talk | contribs) No edit summary |
Aerosoul94 (talk | contribs) mNo edit summary |
||
| Line 29: | Line 29: | ||
bool enabled; | bool enabled; | ||
int integer; | int integer; | ||
unsigned __int64 integer64; | |||
unsigned int unsignedInt; | unsigned int unsignedInt; | ||
float value; | float value; | ||
Revision as of 18:16, 11 January 2014
union DvarLimits
{
struct {
int stringCount;
const char **strings;
} enumeration;
struct {
int min;
int max;
} integer;
struct {
float min;
float max;
} value, vector;
struct {
unsigned __int64 min;
unsigned __int64 max;
} integer64;
};
union DvarValue
{
bool enabled;
int integer;
unsigned __int64 integer64;
unsigned int unsignedInt;
float value;
float vector[4];
const char *string;
char color[4];
};
#define DVAR_TYPE_BOOL 0
#define DVAR_TYPE_FLOAT 1
#define DVAR_TYPE_FLOAT_2 2
#define DVAR_TYPE_FLOAT_3 3
#define DVAR_TYPE_FLOAT_4 4
#define DVAR_TYPE_INT 5
#define DVAR_TYPE_ENUM 6
#define DVAR_TYPE_STRING 7
#define DVAR_TYPE_COLOR 8
#define DVAR_TYPE_INT64 9
#define DVAR_TYPE_COUNT 10
struct dvar_s
{
const char *name;
//The description was removed for the latest updates (TU7 and TU8 on Xbox 360)
// const char *description;
unsigned __int16 flags;
char type;
bool modified;
DvarValue current;
DvarValue latched;
DvarValue reset;
DvarLimits domain;
dvar_s * next;
};