summaryrefslogtreecommitdiffstats
path: root/src/core/Frontend.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-29 15:50:20 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:32:44 +0200
commit2592da2273a580df7d854eecf4e0ac48a7a86162 (patch)
treea8cc1c69f2f9c84525452b910e4a56fb1521ae2e /src/core/Frontend.cpp
parentMake times more accurate (diff)
downloadre3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar
re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.gz
re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.bz2
re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.lz
re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.xz
re3-2592da2273a580df7d854eecf4e0ac48a7a86162.tar.zst
re3-2592da2273a580df7d854eecf4e0ac48a7a86162.zip
Diffstat (limited to '')
-rw-r--r--src/core/Frontend.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 4677e4c9..3057ceac 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -950,12 +950,7 @@ CMenuManager::DisplayHelperText()
m_nHelperTextAlpha -= 2;
}
#else
- static float fadeAlpha = 0.0f; // To keep it precisely
- if (m_nHelperTextAlpha >= 255 && fadeAlpha < 250) fadeAlpha = m_nHelperTextAlpha;
-
- // -2 per every 33 ms (1000.f/30.f - original frame limiter fps)
- fadeAlpha -= (frameTime / 33.0f) * 2.0f;
- m_nHelperTextAlpha = fadeAlpha;
+ m_nHelperTextAlpha -= 2 * CTimer::GetLogicalFramesPassed();
#endif
if (m_nHelperTextAlpha < 1)
ResetHelperText();
@@ -2686,11 +2681,7 @@ CMenuManager::DrawFrontEndNormal()
static float fadeAlpha = 0.0f;
if (m_nMenuFadeAlpha < 255) {
- if (m_nMenuFadeAlpha == 0 && fadeAlpha > 1.0f) fadeAlpha = 0.0f;
-
- // +20 per every 33 ms (1000.f/30.f - original frame limiter fps)
- fadeAlpha += (frameTime) * 20.f / 33.f;
- m_nMenuFadeAlpha = fadeAlpha;
+ m_nMenuFadeAlpha += 20 * CTimer::GetLogicalFramesPassed();
} else {
// TODO: what is this? waiting mouse?
if(field_518 == 4){
@@ -2950,12 +2941,7 @@ CMenuManager::DrawFrontEndNormal()
// Famous transparent menu bug
#ifdef FIX_BUGS
- static float fadeAlpha = 0.0f;
- if (m_nMenuFadeAlpha == 0 && fadeAlpha > 1.0f) fadeAlpha = 0.0f;
-
- // +20 per every 33 ms (1000.f/30.f - original frame limiter fps)
- fadeAlpha += (frameTime) * 20.f / 33.f;
- m_nMenuFadeAlpha = fadeAlpha;
+ m_nMenuFadeAlpha += 20 * CTimer::GetLogicalFramesPassed();
#else
static uint32 LastFade = 0;