From a6972714b7ce5b7834e55a3b23acf28cf51a78ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Tue, 19 May 2020 17:39:19 +0300 Subject: Melee weapons(half-working), Ped and Hud bits --- src/render/Hud.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'src/render/Hud.h') diff --git a/src/render/Hud.h b/src/render/Hud.h index 701e47e2..bae19ee4 100644 --- a/src/render/Hud.h +++ b/src/render/Hud.h @@ -9,6 +9,25 @@ enum eItems ITEM_RADAR = 8 }; +// Thanks for vague name, R* +enum DRAW_FADE_STATE +{ + HUD_WANTED_FADING = 0, + HUD_ENERGY_FADING, + HUD_SCORE_FADING, + HUD_WEAPON_FADING, +}; + +// My name +enum eFadeOperation +{ + FADED_OUT = 0, + START_FADE_OUT, + FADING_IN, + FADING_OUT, + FADE_DISABLED = 5, +}; + enum eSprites { HUD_FIST, @@ -32,6 +51,10 @@ enum eSprites NUM_HUD_SPRITES, }; +// TODO(Miami): Make those 0.7f - 1.25f once fonts have been ported +#define HUD_TEXT_SCALE_X 0.8f +#define HUD_TEXT_SCALE_Y 1.35f + class CHud { public: @@ -82,6 +105,21 @@ public: static int16 PagerTimer; static int16 PagerOn; + static uint32 m_WantedFadeTimer; + static uint32 m_WantedState; + static uint32 m_WantedTimer; + static uint32 m_EnergyLostFadeTimer; + static uint32 m_EnergyLostState; + static uint32 m_EnergyLostTimer; + static uint32 m_DisplayScoreFadeTimer; + static uint32 m_DisplayScoreState; + static uint32 m_DisplayScoreTimer; + static uint32 m_WeaponFadeTimer; + static uint32 m_WeaponState; + static uint32 m_WeaponTimer; + + static uint32 m_LastDisplayScore; + public: static void Draw(); static void DrawAfterFade(); @@ -95,4 +133,5 @@ public: static void SetVehicleName(wchar *name); static void SetZoneName(wchar *name); static void Shutdown(); + static float DrawFadeState(DRAW_FADE_STATE, int); }; -- cgit v1.2.3 From 46c6b0d29d218fdbea82a85939c6cef9f56437c6 Mon Sep 17 00:00:00 2001 From: Xinerki Date: Thu, 21 May 2020 16:25:46 +0300 Subject: fancy HUD.TXD reloader TODO: make optional with defines, also add more reload options --- src/render/Hud.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/render/Hud.h') diff --git a/src/render/Hud.h b/src/render/Hud.h index bae19ee4..3f4b218e 100644 --- a/src/render/Hud.h +++ b/src/render/Hud.h @@ -124,6 +124,7 @@ public: static void Draw(); static void DrawAfterFade(); static void GetRidOfAllHudMessages(); + static void ReloadTXD(); static void Initialise(); static void ReInitialise(); static void SetBigMessage(wchar *message, int16 style); -- cgit v1.2.3 From 6692f5b2aa11e5cac51a61b41164316030152b16 Mon Sep 17 00:00:00 2001 From: Xinerki Date: Thu, 21 May 2020 16:47:48 +0300 Subject: make reloadables optional --- src/render/Hud.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/render/Hud.h') diff --git a/src/render/Hud.h b/src/render/Hud.h index 3f4b218e..9d2c5f8b 100644 --- a/src/render/Hud.h +++ b/src/render/Hud.h @@ -124,7 +124,9 @@ public: static void Draw(); static void DrawAfterFade(); static void GetRidOfAllHudMessages(); +#ifdef RELOADABLES static void ReloadTXD(); +#endif static void Initialise(); static void ReInitialise(); static void SetBigMessage(wchar *message, int16 style); -- cgit v1.2.3 From a5f23a03424cf312add998edce6ef4122c0a29d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Fri, 22 May 2020 02:44:01 +0300 Subject: VC CMenuManager struct, ctor etc. --- src/render/Hud.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/render/Hud.h') diff --git a/src/render/Hud.h b/src/render/Hud.h index bae19ee4..4c02827b 100644 --- a/src/render/Hud.h +++ b/src/render/Hud.h @@ -119,6 +119,7 @@ public: static uint32 m_WeaponTimer; static uint32 m_LastDisplayScore; + static uint32 m_LastWanted; public: static void Draw(); -- cgit v1.2.3