diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-02-01 17:40:54 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-02-01 17:40:54 +0100 |
commit | 3d69148497d9d6415b2a67348fac4531a5952adf (patch) | |
tree | 870248f43478e8f768271f41672b3de4d6f58e92 /src/render/Hud.cpp | |
parent | Fix damage bar assert crash (diff) | |
download | re3-3d69148497d9d6415b2a67348fac4531a5952adf.tar re3-3d69148497d9d6415b2a67348fac4531a5952adf.tar.gz re3-3d69148497d9d6415b2a67348fac4531a5952adf.tar.bz2 re3-3d69148497d9d6415b2a67348fac4531a5952adf.tar.lz re3-3d69148497d9d6415b2a67348fac4531a5952adf.tar.xz re3-3d69148497d9d6415b2a67348fac4531a5952adf.tar.zst re3-3d69148497d9d6415b2a67348fac4531a5952adf.zip |
Diffstat (limited to 'src/render/Hud.cpp')
-rw-r--r-- | src/render/Hud.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index 1d6a6474..be7329e2 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -701,14 +701,7 @@ void CHud::Draw() } if (CTimer::GetFrameCounter() & 4 || !CounterFlashTimer) { - if (CUserDisplay::OnscnTimer.m_sEntries[0].m_nType) { - int counter = atoi(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer); -#ifdef FIX_BUGS - counter = min(counter, 100); -#endif - CSprite2d::DrawRect(CRect(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(8.0f), SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(11.0f) + SCREEN_SCALE_Y(8.0f)), CRGBA(0, 106, 164, 80)); - CSprite2d::DrawRect(CRect(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(8.0f), SCREEN_SCALE_X(counter) / 2.0f + SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET + 50.0f) + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(11.0f) + SCREEN_SCALE_Y(8.0f)), CRGBA(0, 106, 164, 255)); - } else { + if (CUserDisplay::OnscnTimer.m_sEntries[0].m_nType == COUNTER_DISPLAY_NUMBER) { AsciiToUnicode(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer, sTimer); CFont::SetPropOn(); @@ -728,6 +721,13 @@ void CHud::Draw() CFont::SetColor(CRGBA(0, 106, 164, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET), SCREEN_SCALE_Y(132.0f), sTimer); + } else { + int counter = atoi(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer); +#ifdef FIX_BUGS + counter = min(counter, 100); +#endif + CSprite2d::DrawRect(CRect(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(8.0f), SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(11.0f) + SCREEN_SCALE_Y(8.0f)), CRGBA(0, 106, 164, 80)); + CSprite2d::DrawRect(CRect(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(100.0f) / 2 + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(8.0f), SCREEN_SCALE_X(counter) / 2.0f + SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET + 50.0f) + SCREEN_SCALE_X(4.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(11.0f) + SCREEN_SCALE_Y(8.0f)), CRGBA(0, 106, 164, 255)); } if (CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText[0]) { |