From 3e75de970988fde8ebf2fd05a81399c2e7ba763b Mon Sep 17 00:00:00 2001 From: Xinerki Date: Thu, 21 May 2020 15:46:53 +0300 Subject: radardisc shadow thank tomasak --- src/render/Hud.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/render') diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index 7289d70c..7c33ea5b 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -909,7 +909,17 @@ void CHud::Draw() #else rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT)); #endif - rect.Grow(4.0f); + + // shadow, might not be exactly accurate numbers + rect.Translate(0.f, 4.f); + rect.Grow(6.0f); + rect.top += 2.f; + rect.bottom -= 2.f; + Sprites[HUD_RADARDISC].Draw(rect, CRGBA(0, 0, 0, 255)); + + rect.Translate(0.f, -4.f); + rect.top -= 2.f; + rect.bottom += 2.f; Sprites[HUD_RADARDISC].Draw(rect, RADARDISC_COLOR); CRadar::DrawBlips(); } -- 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.cpp | 22 ++++++++++++++++++++++ src/render/Hud.h | 1 + 2 files changed, 23 insertions(+) (limited to 'src/render') diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index 7c33ea5b..a2eed48b 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -1476,6 +1476,28 @@ void CHud::GetRidOfAllHudMessages() } } +void CHud::ReloadTXD() +{ + for (int i = 0; i < NUM_HUD_SPRITES; ++i) { + Sprites[i].Delete(); + } + + int HudTXD = CTxdStore::FindTxdSlot("hud"); + CTxdStore::RemoveTxdSlot(HudTXD); + + debug("Reloading HUD.TXD...\n"); + + HudTXD = CTxdStore::AddTxdSlot("hud"); + CTxdStore::LoadTxd(HudTXD, "MODELS/HUD.TXD"); + CTxdStore::AddRef(HudTXD); + CTxdStore::PopCurrentTxd(); + CTxdStore::SetCurrentTxd(HudTXD); + + for (int i = 0; i < NUM_HUD_SPRITES; i++) { + Sprites[i].SetTexture(WeaponFilenames[i].name, WeaponFilenames[i].mask); + } +} + void CHud::Initialise() { m_Wants_To_Draw_Hud = true; 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.cpp | 2 ++ src/render/Hud.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/render') diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index a2eed48b..4e12ceb5 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -1476,6 +1476,7 @@ void CHud::GetRidOfAllHudMessages() } } +#ifdef RELOADABLES void CHud::ReloadTXD() { for (int i = 0; i < NUM_HUD_SPRITES; ++i) { @@ -1497,6 +1498,7 @@ void CHud::ReloadTXD() Sprites[i].SetTexture(WeaponFilenames[i].name, WeaponFilenames[i].mask); } } +#endif void CHud::Initialise() { 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 e0345732c02ecaf329d13ac7dd005bcac7596bf7 Mon Sep 17 00:00:00 2001 From: Xinerki Date: Thu, 21 May 2020 17:50:08 +0300 Subject: wasted/busted text color how did nobody change it yet --- src/render/Hud.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/render') diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index 4e12ceb5..ff2af2d7 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -38,7 +38,7 @@ CRGBA COUNTER_COLOR(97, 194, 247, 255); CRGBA PAGER_COLOR(32, 162, 66, 205); CRGBA RADARDISC_COLOR(255, 255, 255, 255); CRGBA BIGMESSAGE_COLOR(85, 119, 133, 255); -CRGBA WASTEDBUSTED_COLOR(170, 123, 87, 255); +CRGBA WASTEDBUSTED_COLOR(255, 150, 225, 255); CRGBA ODDJOB_COLOR(89, 115, 150, 255); CRGBA ODDJOB2_COLOR(156, 91, 40, 255); CRGBA MISSIONTITLE_COLOR(220, 172, 2, 255); -- 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/Credits.cpp | 56 ++++++++++++++++---------------- src/render/Fluff.cpp | 4 +-- src/render/Hud.cpp | 88 +++++++++++++++++++++++++++++++++----------------- src/render/Hud.h | 1 + 4 files changed, 90 insertions(+), 59 deletions(-) (limited to 'src/render') diff --git a/src/render/Credits.cpp b/src/render/Credits.cpp index dc0b0252..60e69583 100644 --- a/src/render/Credits.cpp +++ b/src/render/Credits.cpp @@ -128,12 +128,12 @@ CCredits::Render(void) PrintCreditText(1.7f, 1.7f, TheText.Get("CRED040"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); PrintCreditText(1.4f, 0.82f, TheText.Get("CRED041"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.5, lineoffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED042"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED043"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.5, lineoffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED044"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); @@ -176,7 +176,7 @@ CCredits::Render(void) PrintCreditSpace(2.0f, lineoffset); PrintCreditSpace(2.0f, lineoffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED061"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.5, lineoffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED062"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); @@ -191,7 +191,7 @@ CCredits::Render(void) PrintCreditText(1.7f, 1.7f, TheText.Get("CRED068"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED069"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.5, lineoffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED070"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); @@ -220,7 +220,7 @@ CCredits::Render(void) PrintCreditText(1.7f, 1.7f, TheText.Get("CRED262"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED085"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.5, lineoffset); PrintCreditText(1.7f, 1.7f, TheText.Get("CRED086"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); @@ -265,76 +265,76 @@ CCredits::Render(void) PrintCreditText(1.0, 1.0, TheText.Get("CRED108"), lineoffset, scrolloffset); PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED109"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED110"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); PrintCreditText(1.7f, 1.0f, TheText.Get("CRED111"), lineoffset, scrolloffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED112"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED113"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED114"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED115"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED116"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED117"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED118"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED119"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED120"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED121"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED122"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED123"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED124"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED125"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED126"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED127"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED128"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED129"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED130"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED131"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED132"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED133"), lineoffset, scrolloffset); - if(CMenuManager::m_PrefsLanguage == LANGUAGE_ITALIAN) + if(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_ITALIAN) PrintCreditSpace(1.0, lineoffset); PrintCreditText(1.0, 1.0, TheText.Get("CRED134"), lineoffset, scrolloffset); PrintCreditSpace(2.0f, lineoffset); diff --git a/src/render/Fluff.cpp b/src/render/Fluff.cpp index 59ac1652..1056d6ff 100644 --- a/src/render/Fluff.cpp +++ b/src/render/Fluff.cpp @@ -382,7 +382,7 @@ void CScrollBar::Update() m_pMessage = FindTimeMessage(); break; case 6: - if (CMenuManager::m_PrefsLanguage == LANGUAGE_FRENCH || CMenuManager::m_PrefsLanguage == LANGUAGE_GERMAN) + if (FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_FRENCH || FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_GERMAN) m_pMessage = FindTimeMessage(); else m_pMessage = "WWW.GRANDTHEFTAUTO3.COM "; @@ -602,7 +602,7 @@ void CScrollBar::Update() m_pMessage = "FREE FLUFFY DICE WITH ALL PURCHASES. . ."; break; case 9: - if (CMenuManager::m_PrefsLanguage == LANGUAGE_FRENCH || CMenuManager::m_PrefsLanguage == LANGUAGE_GERMAN) + if (FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_FRENCH || FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_GERMAN) m_pMessage = "QUICK, TAKE A LOOK AT OUR CURRENT STOCK )CAUSE THESE AUTOS ARE MOVIN) FAST . . . "; else m_pMessage = "HTTP:((ROCKSTARGAMES.COM(GRANDTHEFTAUTO3(CAPITALAUTOS "; diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index 7289d70c..96149573 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -102,6 +102,7 @@ uint32 CHud::m_WeaponState; uint32 CHud::m_WeaponTimer; uint32 CHud::m_LastDisplayScore; +uint32 CHud::m_LastWanted; CSprite2d CHud::Sprites[NUM_HUD_SPRITES]; @@ -483,33 +484,46 @@ void CHud::Draw() /* DrawWantedLevel */ - CFont::SetBackgroundOff(); - CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y)); - CFont::SetJustifyOff(); - CFont::SetCentreOff(); - CFont::SetRightJustifyOn(); - CFont::SetPropOn(); - CFont::SetFontStyle(FONT_HEADING); - CFont::SetDropShadowPosition(2); // TODO(Miami): Remove that, VC keeps that open above + if (m_LastWanted == playerPed->m_pWanted->m_nWantedLevel) + alpha = CHud::DrawFadeState(HUD_WANTED_FADING, 0); + else { + alpha = CHud::DrawFadeState(HUD_WANTED_FADING, 1); + m_LastWanted = playerPed->m_pWanted->m_nWantedLevel; + } - AsciiToUnicode("]", sPrintIcon); + if (m_WantedState != FADED_OUT) { + CFont::SetBackgroundOff(); + CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y)); + CFont::SetJustifyOff(); + CFont::SetCentreOff(); + CFont::SetRightJustifyOn(); + CFont::SetPropOn(); + CFont::SetFontStyle(FONT_HEADING); + CFont::SetDropShadowPosition(2); // TODO(Miami): Remove that, VC keeps that open above + CFont::SetDropColor(CRGBA(0,0,0,alpha)); // TODO(Miami): Remove that, VC keeps that open above - for (int i = 0; i < 6; i++) { - if (playerPed->m_pWanted->m_nWantedLevel > i - && (CTimer::GetTimeInMilliseconds() > playerPed->m_pWanted->m_nLastWantedLevelChange - + 2000 || CTimer::GetFrameCounter() & 4)) { + AsciiToUnicode("]", sPrintIcon); - CFont::SetColor(WANTED_COLOR); - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); + for (int i = 0; i < 6; i++) { + if (playerPed->m_pWanted->m_nWantedLevel > i + && (CTimer::GetTimeInMilliseconds() > playerPed->m_pWanted->m_nLastWantedLevelChange + + 2000 || CTimer::GetFrameCounter() & 4)) { - // TODO(Miami): There is one more condition in here - }else if (playerPed->m_pWanted->m_nWantedLevel <= i) { - CFont::SetColor(NOTWANTED_COLOR); - CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); + WANTED_COLOR.a = alpha; + CFont::SetColor(WANTED_COLOR); + CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); + + // TODO(Miami): There is one more condition in here + } + else if (playerPed->m_pWanted->m_nWantedLevel <= i) { + NOTWANTED_COLOR.a = alpha; + CFont::SetColor(NOTWANTED_COLOR); + CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); + } } - } - CFont::SetDropShadowPosition(0); // TODO(Miami): Remove that, VC keeps that open + CFont::SetDropShadowPosition(0); // TODO(Miami): Remove that, VC keeps that open + } /* DrawZoneName @@ -1503,20 +1517,28 @@ void CHud::Initialise() PagerSoundPlayed = 0; PagerXOffset = 150.0f; - m_WantedFadeTimer = 0; +#ifdef HUD_AUTO_FADE + m_EnergyLostState = START_FADE_OUT; + m_WantedState = START_FADE_OUT; + m_DisplayScoreState = START_FADE_OUT; + m_WeaponState = START_FADE_OUT; +#else + m_EnergyLostState = FADE_DISABLED; m_WantedState = FADE_DISABLED; + m_DisplayScoreState = FADE_DISABLED; + m_WeaponState = FADE_DISABLED; +#endif + m_WantedFadeTimer = 0; m_WantedTimer = 0; m_EnergyLostFadeTimer = 0; - m_EnergyLostState = FADE_DISABLED; m_EnergyLostTimer = 0; m_DisplayScoreFadeTimer = 0; - m_DisplayScoreState = FADE_DISABLED; m_DisplayScoreTimer = 0; m_WeaponFadeTimer = 0; - m_WeaponState = FADE_DISABLED; m_WeaponTimer = 0; m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney; + m_LastWanted = 0; CTxdStore::PopCurrentTxd(); } @@ -1542,20 +1564,28 @@ void CHud::ReInitialise() { PagerSoundPlayed = 0; PagerXOffset = 150.0f; - m_WantedFadeTimer = 0; +#ifdef HUD_AUTO_FADE + m_EnergyLostState = START_FADE_OUT; + m_WantedState = START_FADE_OUT; + m_DisplayScoreState = START_FADE_OUT; + m_WeaponState = START_FADE_OUT; +#else + m_EnergyLostState = FADE_DISABLED; m_WantedState = FADE_DISABLED; + m_DisplayScoreState = FADE_DISABLED; + m_WeaponState = FADE_DISABLED; +#endif + m_WantedFadeTimer = 0; m_WantedTimer = 0; m_EnergyLostFadeTimer = 0; - m_EnergyLostState = FADE_DISABLED; m_EnergyLostTimer = 0; m_DisplayScoreFadeTimer = 0; - m_DisplayScoreState = FADE_DISABLED; m_DisplayScoreTimer = 0; m_WeaponFadeTimer = 0; - m_WeaponState = FADE_DISABLED; m_WeaponTimer = 0; m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney; + m_LastWanted = 0; } wchar LastBigMessage[6][128]; 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