Hud Elements: Difference between revisions
Aerosoul94 (talk | contribs) No edit summary |
mNo edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 34: | Line 34: | ||
#define HUDELEMFLAG_HIDEWHENDEAD 0x2 | #define HUDELEMFLAG_HIDEWHENDEAD 0x2 | ||
#define HUDELEMFLAG_HIDEWHENINMENU 0x4 | #define HUDELEMFLAG_HIDEWHENINMENU 0x4 | ||
# | #if !defined(COD4) && !defined(WAW) // MW2 or later | ||
#define | #define HUDELEMFLAG_WAYPOINT_PINTOEDGE 0x8 | ||
#ifndef MW2 | #define HUDELEMFLAG_WAYPOINT_FADEATEDGE 0x10 | ||
#define | #define HUDELEMFLAG_WAYPOINT_ROTATEATEDGE 0x20 | ||
#define HUDELEMFLAG_WAYPOINT_OFFSCREENONLY 0x40 | |||
#define HUDELEMFLAG_LOWRES_BACKGROUND 0x100 | |||
#ifndef MW2 // MW3 or later | |||
#define HUDELEM_FLAG_IS_CONSTANTSIZE 0x200 | |||
#define HUDELEM_FLAG_DRAW_3D 0x400 | |||
#define HUDELEMFLAG_HIDEWHENIN3RDPERSON 0x800 | |||
#define HUDELEMFLAG_HIDEWHENINDEMO 0x1000 | #define HUDELEMFLAG_HIDEWHENINDEMO 0x1000 | ||
#ifdef GHOSTS | #ifdef GHOSTS // Ghosts | ||
#define | #define HUDELEMFLAG_ENTITY_LINKED 0x2000 | ||
#define HUDELEMFLAG_HUDLIGHTING 0x4000 | |||
#endif | #endif | ||
#endif | #endif | ||
| Line 81: | Line 88: | ||
int height; | int height; | ||
int materialIndex; | int materialIndex; | ||
# | #if defined(WAW) || defined(COD4) | ||
int offscreenMaterialIdx; | int offscreenMaterialIdx; | ||
#endif | #endif | ||
| Line 115: | Line 122: | ||
int archived; | int archived; | ||
#ifdef GHOSTS | #ifdef GHOSTS | ||
int | int currentShowInKillcam; | ||
#endif | #endif | ||
}; | }; | ||
| Line 147: | Line 154: | ||
#define HUDELEMFLAG_HIDEWHENDEAD 0x2 | #define HUDELEMFLAG_HIDEWHENDEAD 0x2 | ||
#define HUDELEMFLAG_HIDEWHENINMENU 0x4 | #define HUDELEMFLAG_HIDEWHENINMENU 0x4 | ||
#define | #define HUDELEMFLAG_WAYPOINT_PINTOEDGE 0x8 | ||
#define | #define HUDELEMFLAG_WAYPOINT_FADEATEDGE 0x10 | ||
#define HUDELEMFLAG_WAYPOINT_ROTATEATEDGE 0x20 | |||
#define HUDELEMFLAG_WAYPOINT_OFFSCREENONLY 0x40 | |||
#define HUDELEMFLAG_LOWRES_BACKGROUND 0x100 | |||
#define HUDELEMFLAG_IS_CONSTANTSIZE 0x200 | |||
#define HUDELEMFLAG_DRAW_3D 0x400 | |||
#define HUDELEMFLAG_HIDEWHENIN3RDPERSON 0x800 | |||
#define HUDELEMFLAG_HIDEWHENINDEMO 0x1000 | #define HUDELEMFLAG_HIDEWHENINDEMO 0x1000 | ||
#define HUDELEMFLAG_POSITIONINWORLD 0x4000 | #define HUDELEMFLAG_POSITIONINWORLD 0x4000 | ||
| Line 218: | Line 231: | ||
int team; // 0xB0 | int team; // 0xB0 | ||
int archived; // 0xB4 | int archived; // 0xB4 | ||
int | int currentShowInKillcam; // 0xB8 | ||
}; | }; | ||
</source> | </source> | ||
| Line 280: | Line 293: | ||
#ifdef BO2 | #ifdef BO2 | ||
float fromFontScale; | float fromFontScale; | ||
int fontScaleStartTime; | |||
#endif | #endif | ||
hudelem_color_t color; | hudelem_color_t color; | ||
| Line 291: | Line 304: | ||
int time; | int time; | ||
int duration; | int duration; | ||
float value; | |||
float sort; | |||
hudelem_color_t glowColor; | hudelem_color_t glowColor; | ||
int fxBirthTime; | int fxBirthTime; | ||
#ifdef BO2 | #ifdef BO2 | ||
int flags; | unsigned int flags; | ||
#endif | #endif | ||
short targetEntNum; | short targetEntNum; | ||
| Line 309: | Line 322: | ||
short moveTime; | short moveTime; | ||
short text; | short text; | ||
short fxLetterTime; | unsigned short fxLetterTime; | ||
short fxDecayStartTime; | unsigned short fxDecayStartTime; | ||
short fxDecayDuration; | unsigned short fxDecayDuration; | ||
short fxRedactDecayStartTime; | unsigned short fxRedactDecayStartTime; | ||
short fxRedactDecayDuration; | unsigned short fxRedactDecayDuration; | ||
#ifdef BO1 | #ifdef BO1 | ||
short flags; | short flags; | ||
Latest revision as of 15:03, 12 January 2015
Modern Warfare 1, 2, 3, Ghosts & World at War
enum he_type_t : int
{
HE_TYPE_FREE = 0x0,
HE_TYPE_TEXT = 0x1,
HE_TYPE_VALUE = 0x2,
HE_TYPE_PLAYERNAME = 0x3,
HE_TYPE_MATERIAL = 0x4,
HE_TYPE_TIMER_DOWN = 0x5,
HE_TYPE_TIMER_UP = 0x6,
HE_TYPE_TIMER_STATIC = 0x7,
HE_TYPE_TENTHS_TIMER_DOWN = 0x8,
HE_TYPE_TENTHS_TIMER_UP = 0x9,
HE_TYPE_TENTHS_TIMER_STATIC = 0xA,
HE_TYPE_CLOCK_DOWN = 0xB,
HE_TYPE_CLOCK_UP = 0xC,
HE_TYPE_WAYPOINT = 0xD,
HE_TYPE_MAPNAME = 0xE,
HE_TYPE_GAMETYPE = 0xF,
HE_TYPE_COUNT = 0x10,
};
// hudelem_s->flags
#define HUDELEMFLAG_FOREGROUND 0x1
#define HUDELEMFLAG_HIDEWHENDEAD 0x2
#define HUDELEMFLAG_HIDEWHENINMENU 0x4
#if !defined(COD4) && !defined(WAW) // MW2 or later
#define HUDELEMFLAG_WAYPOINT_PINTOEDGE 0x8
#define HUDELEMFLAG_WAYPOINT_FADEATEDGE 0x10
#define HUDELEMFLAG_WAYPOINT_ROTATEATEDGE 0x20
#define HUDELEMFLAG_WAYPOINT_OFFSCREENONLY 0x40
#define HUDELEMFLAG_LOWRES_BACKGROUND 0x100
#ifndef MW2 // MW3 or later
#define HUDELEM_FLAG_IS_CONSTANTSIZE 0x200
#define HUDELEM_FLAG_DRAW_3D 0x400
#define HUDELEMFLAG_HIDEWHENIN3RDPERSON 0x800
#define HUDELEMFLAG_HIDEWHENINDEMO 0x1000
#ifdef GHOSTS // Ghosts
#define HUDELEMFLAG_ENTITY_LINKED 0x2000
#define HUDELEMFLAG_HUDLIGHTING 0x4000
#endif
#endif
#endif
union hudelem_color_t
{
struct
{
char r;
char g;
char b;
char a;
};
int rgba;
};
struct hudelem_s
{
he_type_t type;
float x;
float y;
float z;
int targetEntNum;
float fontScale;
float fromFontScale;
#ifndef COD4 || WAW
float fontScaleStartTime;
float fontScaleTime;
#endif
int font;
int alignOrg;
int alignScreen;
hudelem_color_t color;
hudelem_color_t fromColor;
int fadeStartTime;
int fadeTime;
int label;
int width;
int height;
int materialIndex;
#if defined(WAW) || defined(COD4)
int offscreenMaterialIdx;
#endif
int fromWidth;
int fromHeight;
int scaleStartTime;
int scaleTime;
float fromX;
float fromY;
int fromAlignOrg;
int fromAlignScreen;
int moveStartTime;
int moveTime;
int time;
int duration;
float value;
int text;
float sort;
hudelem_color_t glowColor;
int fxBirthTime;
int fxLetterTime;
int fxDecayStartTime;
int fxDecayDuration;
int soundID;
int flags;
};
struct game_hudelem_s
{
hudelem_s hud;
int clientNum;
int team;
int archived;
#ifdef GHOSTS
int currentShowInKillcam;
#endif
};Advanced Warfare
enum he_type_t : int
{
HE_TYPE_FREE = 0x0,
HE_TYPE_TEXT = 0x1,
HE_TYPE_VALUE = 0x2,
HE_TYPE_PLAYERNAME = 0x3,
HE_TYPE_MATERIAL = 0x4,
HE_TYPE_TIMER_DOWN = 0x5,
HE_TYPE_TIMER_UP = 0x6,
HE_TYPE_TIMER_STATIC = 0x7,
HE_TYPE_TENTHS_TIMER_DOWN = 0x8,
HE_TYPE_TENTHS_TIMER_UP = 0x9,
HE_TYPE_TENTHS_TIMER_STATIC = 0xA,
HE_TYPE_CLOCK_DOWN = 0xB,
HE_TYPE_CLOCK_UP = 0xC,
HE_TYPE_WAYPOINT = 0xD,
HE_TYPE_MAPNAME = 0xE,
HE_TYPE_GAMETYPE = 0xF,
HE_TYPE_COUNT = 0x10,
};
// hudelem_s->flags
#define HUDELEMFLAG_FOREGROUND 0x1
#define HUDELEMFLAG_HIDEWHENDEAD 0x2
#define HUDELEMFLAG_HIDEWHENINMENU 0x4
#define HUDELEMFLAG_WAYPOINT_PINTOEDGE 0x8
#define HUDELEMFLAG_WAYPOINT_FADEATEDGE 0x10
#define HUDELEMFLAG_WAYPOINT_ROTATEATEDGE 0x20
#define HUDELEMFLAG_WAYPOINT_OFFSCREENONLY 0x40
#define HUDELEMFLAG_LOWRES_BACKGROUND 0x100
#define HUDELEMFLAG_IS_CONSTANTSIZE 0x200
#define HUDELEMFLAG_DRAW_3D 0x400
#define HUDELEMFLAG_HIDEWHENIN3RDPERSON 0x800
#define HUDELEMFLAG_HIDEWHENINDEMO 0x1000
#define HUDELEMFLAG_POSITIONINWORLD 0x4000
#define HUDELEMFLAG_ENABLEHUDLIGHTING 0x10000
union hudelem_color_t
{
struct
{
char r;
char g;
char b;
char a;
};
int rgba;
};
struct hudelem_s
{
int unknown1; // 0x0
int font; // 0x4
int alignOrg; // 0x8
int alignScreen; // 0xC
float x; // 0x10
float y; // 0x14
float z; // 0x18
he_type_t type; // 0x1C
float fontScale; // 0x20
float fromFontScale; // 0x24
float fontScaleStartTime;// 0x28
float fontScaleTime; // 0x2C
hudelem_color_t color; // 0x30
hudelem_color_t fromColor;// 0x34
int fadeStartTime; // 0x38
int fadeTime; // 0x3C
int label; // 0x40
int width; // 0x44
int height; // 0x48
int materialIndex; // 0x4C
int fromWidth; // 0x50
int fromHeight; // 0x54
int scaleStartTime; // 0x58
int scaleTime; // 0x5C
float fromX; // 0x60
float fromY; // 0x64
int fromAlignOrg; // 0x68
int fromAlignScreen; // 0x6C
int moveStartTime; // 0x70
int moveTime; // 0x74
int time; // 0x78
int duration; // 0x7C
float value; // 0x80
int text; // 0x84
float sort; // 0x88
hudelem_color_t glowColor;// 0x8C
int fxBirthTime; // 0x90
int fxLetterTime; // 0x94
int fxDecayStartTime; // 0x98
int fxDecayDuration; // 0x9C
int soundID; // 0xA0
int unknown2; // 0xA4
int flags; // 0xA8
};
struct game_hudelem_s
{
hudelem_s hud; // 0x0
int clientNum; // 0xAC
int team; // 0xB0
int archived; // 0xB4
int currentShowInKillcam; // 0xB8
};Black Ops 1 & 2
union hudelem_color_t
{
struct
{
char r;
char g;
char b;
char a;
};
int rgba;
};
enum he_type_t : char
{
HE_TYPE_FREE = 0x0,
HE_TYPE_TEXT = 0x1,
HE_TYPE_VALUE = 0x2,
HE_TYPE_PLAYERNAME = 0x3,
HE_TYPE_MAPNAME = 0x4,
HE_TYPE_GAMETYPE = 0x5,
HE_TYPE_MATERIAL = 0x6,
HE_TYPE_TIMER_DOWN = 0x7,
HE_TYPE_TIMER_UP = 0x8,
HE_TYPE_TENTHS_TIMER_DOWN = 0x9,
HE_TYPE_TENTHS_TIMER_UP = 0xA,
HE_TYPE_CLOCK_DOWN = 0xB,
HE_TYPE_CLOCK_UP = 0xC,
HE_TYPE_WAYPOINT = 0xD,
HE_TYPE_COUNT = 0xE,
};
// hudelem_s->flags
#define HUDELEMFLAG_FOREGROUND 0x1
#define HUDELEMFLAG_HIDEWHENDEAD 0x2
#define HUDELEMFLAG_HIDEWHENINMENU 0x4
#define HUDELEMFLAG_FONTSTYLE3D_SHADOWED 0x8
#define HUDELEMFLAG_FONTSTYLE3D_SHADOWEDMORE 0x10
#define HUDELEMFLAG_FONT3DUSEGLOWCOLOR 0x20
#define HUDELEMFLAG_HIDEWHENINKILLCAM 0x40
#define HUDELEMFLAG_FADEWHENTARGETED 0x100
#define HUDELEMFLAG_HIDEWHENINDEMO 0x200
#define HUDELEMFLAG_OVERRIDEWHENINDEMO 0x400
#define HUDELEMFLAG_HIDEWHILEREMOTECONTROLLING 0x800
#ifdef BO2
#define HUDELEMFLAG_IMMUNETODEMOGAMEHUDSETTING 0x8000
#define HUDELEMFLAG_IMMUNETODEMOFREECAMERA 0x10000
#endif
#pragma pack(push, 4)
struct hudelem_s
{
float x;
float y;
float z;
float fontScale;
#ifdef BO2
float fromFontScale;
int fontScaleStartTime;
#endif
hudelem_color_t color;
hudelem_color_t fromColor;
int fadeStartTime;
int scaleStartTime;
float fromX;
float fromY;
int moveStartTime;
int time;
int duration;
float value;
float sort;
hudelem_color_t glowColor;
int fxBirthTime;
#ifdef BO2
unsigned int flags;
#endif
short targetEntNum;
short fontscaleTime;
short fadeTime;
short label;
short width;
short height;
short fromWidth;
short fromHeight;
short scaleTime;
short moveTime;
short text;
unsigned short fxLetterTime;
unsigned short fxDecayStartTime;
unsigned short fxDecayDuration;
unsigned short fxRedactDecayStartTime;
unsigned short fxRedactDecayDuration;
#ifdef BO1
short flags;
#endif
he_type_t type;
char font;
char alignOrg;
char alignScreen;
char materialIndex;
char offscreenMaterialIdx;
char fromAlignOrg;
char fromAlignScreen;
char soundID;
bool ui3dWindow;
};
#pragma pack(pop)
struct game_hudelem_s
{
hudelem_s elem;
int clientNum;
int team;
int archived;
};