Hud Elements

From COD Engine Research
Revision as of 07:13, 8 August 2014 by Aerosoul94 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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,
};
 
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;
#ifdef WAW || 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 showinkillcam;
#endif
};

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,
};
 
#pragma pack(push, 4)
struct hudelem_s
{
	float x;
	float y;
	float z;
	float fontScale;
#ifdef BO2
	float fromFontScale;
	float fontScaleStartTime;
#endif
	hudelem_color_t color;
	hudelem_color_t fromColor;
	int fadeStartTime;
	int scaleStartTime;
	float fromX;
	float fromY;
	int moveStartTime;
	int time;
	int duration;
	int value;
	int sort;
	hudelem_color_t glowColor;
	int fxBirthTime;
#ifdef BO2
	int flags;
#endif
	__int16 targetEntNum;
	__int16 fontscaleTime;
	__int16 fadeTime;
	__int16 label;
	__int16 width;
	__int16 height;
	__int16 fromWidth;
	__int16 fromHeight;
	__int16 scaleTime;
	__int16 moveTime;
	__int16 text;
	__int16 fxLetterTime;
	__int16 fxDecayStartTime;
	__int16 fxDecayDuration;
	__int16 fxRedactDecayStartTime;
	__int16 fxRedactDecayDuration;
#ifdef BO1
	__int16 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;
};