DVARs (MW2): Difference between revisions
Aerosoul94 (talk | contribs) No edit summary |
No edit summary |
||
| Line 44: | Line 44: | ||
float max; | float max; | ||
} value, vector; | } value, vector; | ||
}; | }; //0x8 | ||
union DvarValue | union DvarValue | ||
| Line 55: | Line 55: | ||
const char *string; | const char *string; | ||
char color[4]; | char color[4]; | ||
}; | }; //0x10 | ||
struct dvar_s | struct dvar_s | ||
{ | { | ||
const char *name; | const char *name; //0x0 | ||
//The description was removed for the latest updates (TU7 and TU8 on Xbox 360) | //The description was removed for the latest updates (TU7 and TU8 on Xbox 360) | ||
// const char *description; | // const char *description; | ||
unsigned __int16 flags; | unsigned __int16 flags; //0x4 | ||
char type; | char type; //0x6 | ||
bool modified; | bool modified; //0x7 | ||
DvarValue current; | DvarValue current; //0x8 | ||
DvarValue latched; | DvarValue latched; //0x18 | ||
DvarValue reset; | DvarValue reset; //0x28 | ||
DvarLimits domain; | DvarLimits domain; //0x38 | ||
dvar_s * next; | dvar_s * next; //0x40 | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 19:23, 13 June 2014
/* dvar->flags */
#define DVAR_ARCHIVE 1
#define DVAR_LATCH 2
#define DVAR_CHEAT 4
#define DVAR_USER_CREATED 0x100
#define DVAR_SAVED 0x200
#define DVAR_SERVERINFO 0x400
#define DVAR_INIT 0x800
#define DVAR_CHANGEABLE_RESET 0x1000
#define DVAR_ROM 0x2000
#define DVAR_EXTERNAL 0x4000
#define DVAR_AUTOEXEC 0x8000
/* dvar->type */
#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_DEV_TWEAK 9
#define DVAR_TYPE_COUNT 10
union DvarLimits
{
struct {
int stringCount;
const char **strings;
} enumeration;
struct {
int min;
int max;
} integer;
struct {
float min;
float max;
} value, vector;
}; //0x8
union DvarValue
{
bool enabled;
int integer;
unsigned int unsignedInt;
float value;
float vector[4];
const char *string;
char color[4];
}; //0x10
struct dvar_s
{
const char *name; //0x0
//The description was removed for the latest updates (TU7 and TU8 on Xbox 360)
// const char *description;
unsigned __int16 flags; //0x4
char type; //0x6
bool modified; //0x7
DvarValue current; //0x8
DvarValue latched; //0x18
DvarValue reset; //0x28
DvarLimits domain; //0x38
dvar_s * next; //0x40
};