More smooth fadeout for the map title. (#165)

This commit is contained in:
CommonLoon102 2019-09-14 06:47:20 +00:00 committed by Christoph Oelckers
parent 996dfde6d0
commit 4423164ca5

View file

@ -1242,8 +1242,8 @@ void viewDrawMapTitle(void)
if (!gShowMapTitle || gGameMenuMgr.m_bActive)
return;
int const fadeStartTic = int(1.f*kTicsPerSec);
int const fadeEndTic = int(1.25f*kTicsPerSec);
int const fadeStartTic = int((videoGetRenderMode() == REND_CLASSIC ? 1.25f : 1.f)*kTicsPerSec);
int const fadeEndTic = int(1.5f*kTicsPerSec);
if (gLevelTime > fadeEndTic)
return;
uint8_t const alpha = clamp((gLevelTime-fadeStartTic)*255/(fadeEndTic-fadeStartTic), 0, 255);