diff options
author | Filip Gawin <filip.gawin@zoho.com> | 2020-02-25 20:01:56 +0100 |
---|---|---|
committer | Filip Gawin <filip.gawin@zoho.com> | 2020-03-22 17:30:54 +0100 |
commit | 8f01eab5ab97c498fd308c091ad9c555b2f67b56 (patch) | |
tree | c7b9b88d8b77ab3559be411dbbfeda98e3294c7b /src/render/Hud.cpp | |
parent | Implement ProcessGarages + small cleanup (diff) | |
download | re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.gz re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.bz2 re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.lz re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.xz re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.zst re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.zip |
Diffstat (limited to 'src/render/Hud.cpp')
-rw-r--r-- | src/render/Hud.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index b87f7c71..f0134062 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -611,15 +611,15 @@ void CHud::Draw() /* DrawClock */ - CFont::SetJustifyOff();
- CFont::SetCentreOff();
- CFont::SetBackgroundOff();
- CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
- CFont::SetBackGroundOnlyTextOff();
- CFont::SetPropOff();
- CFont::SetFontStyle(FONT_HEADING);
- CFont::SetRightJustifyOn();
- CFont::SetRightJustifyWrap(0.0); + CFont::SetJustifyOff(); + CFont::SetCentreOff(); + CFont::SetBackgroundOff(); + CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f)); + CFont::SetBackGroundOnlyTextOff(); + CFont::SetPropOff(); + CFont::SetFontStyle(FONT_HEADING); + CFont::SetRightJustifyOn(); + CFont::SetRightJustifyWrap(0.0f); sprintf(sTemp, "%02d:%02d", CClock::GetHours(), CClock::GetMinutes()); AsciiToUnicode(sTemp, sPrint); @@ -702,21 +702,21 @@ void CHud::Draw() AsciiToUnicode(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer, sTimer); CFont::SetPropOn(); - CFont::SetBackgroundOff();
- CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f));
- CFont::SetCentreOff();
- CFont::SetRightJustifyOn();
- CFont::SetRightJustifyWrap(0.0f);
+ CFont::SetBackgroundOff(); + CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f)); + CFont::SetCentreOff(); + CFont::SetRightJustifyOn(); + CFont::SetRightJustifyWrap(0.0f); CFont::SetFontStyle(FONT_HEADING); - CFont::SetColor(CRGBA(244, 20, 20, 255));
- CFont::SetWrapx(SCREEN_SCALE_X(640.0f));
- CFont::SetPropOff();
+ CFont::SetColor(CRGBA(244, 20, 20, 255)); + CFont::SetWrapx(SCREEN_SCALE_X(640.0f)); + CFont::SetPropOff(); CFont::SetBackGroundOnlyTextOn(); - CFont::SetColor(CRGBA(0, 0, 0, 255));
+ CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(2.0f), sTimer); - CFont::SetColor(CRGBA(0, 106, 164, 255));
+ 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); @@ -728,7 +728,7 @@ void CHud::Draw() } if (CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText[0]) { - CFont::SetPropOn();
+ CFont::SetPropOn(); CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f)); CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(TIMER_RIGHT_OFFSET) - SCREEN_SCALE_X(61.0f) + SCREEN_SCALE_Y(2.0f), SCREEN_SCALE_Y(132.0f) + SCREEN_SCALE_Y(2.0f), TheText.Get(CUserDisplay::OnscnTimer.m_sEntries[0].m_aCounterText)); @@ -773,7 +773,7 @@ void CHud::Draw() fStep = 2.0f; PagerXOffset += fStep * CTimer::GetTimeStep(); if (PagerXOffset > 150.0f) { - PagerXOffset = 150.0; + PagerXOffset = 150.0f; PagerOn = 0; } } @@ -934,13 +934,13 @@ void CHud::Draw() BigMessageInUse[0] += CTimer::GetTimeStep(); if (BigMessageInUse[0] >= 120.0f) { - BigMessageInUse[0] = 120.0; + BigMessageInUse[0] = 120.0f; BigMessageAlpha[0] -= (CTimer::GetTimeStepInMilliseconds() * 0.3f); } if (BigMessageAlpha[0] <= 0.0f) { m_BigMessage[0][0] = 0; - BigMessageAlpha[0] = 0.0; + BigMessageAlpha[0] = 0.0f; } } else { @@ -977,7 +977,7 @@ void CHud::Draw() BigMessageAlpha[2] += (CTimer::GetTimeStepInSeconds() * 255.0f); if (BigMessageAlpha[2] > 255.0f) - BigMessageAlpha[2] = 255.0; + BigMessageAlpha[2] = 255.0f; CFont::SetBackgroundOff(); @@ -997,12 +997,12 @@ void CHud::Draw() CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(82.0f), m_BigMessage[2]); } else { - BigMessageAlpha[2] = 0.0; - BigMessageInUse[2] = 1.0; + BigMessageAlpha[2] = 0.0f; + BigMessageInUse[2] = 1.0f; } } else { - BigMessageInUse[2] = 0.0; + BigMessageInUse[2] = 0.0f; } } } @@ -1231,12 +1231,12 @@ void CHud::DrawAfterFade() BigMessageInUse[1] += CTimer::GetTimeStep(); if (BigMessageInUse[1] >= 120.0f) { - BigMessageInUse[1] = 120.0; + BigMessageInUse[1] = 120.0f; BigMessageAlpha[1] -= (CTimer::GetTimeStepInMilliseconds() * 0.3f); } if (BigMessageAlpha[1] <= 0) { m_BigMessage[1][0] = 0; - BigMessageAlpha[1] = 0.0; + BigMessageAlpha[1] = 0.0f; } } else { |