- fixed Exhumed credits display.

This commit is contained in:
Christoph Oelckers 2021-08-14 10:54:51 +02:00
parent 40730d26b8
commit fb5e8e72ab

View file

@ -747,6 +747,7 @@ class ExCredits : ScreenJob
if (ticks >= pagetime || skiprequest)
{
page++;
pagelines.Clear();
if (page < credits.Size())
credits[page].Split(pagelines, "\n");
else
@ -756,9 +757,8 @@ class ExCredits : ScreenJob
jobstate = finished;
return;
}
pagelines.Clear();
}
pagetime = ticks + 60; //
pagetime = ticks + 90; //
}
}
@ -766,17 +766,17 @@ class ExCredits : ScreenJob
{
int y = 100 - ((10 * (pagelines.Size() - 1)) / 2);
int ptime = clamp((pagetime - ticks - smoothratio) * 1000 / GameTicRate, 0, 2000); // in milliseconds
int light;
if (ptime < 255) light = ptime;
else if (ptime > 2000 - 255) light = 2000 - ptime;
else light = 255;
let colr = Color(255, light, light, light);
for (int i = 0; i < pagelines.Size(); i++)
{
int ptime = clamp((pagetime - ticks - smoothratio) * 1000 / GameTicRate, 0, 2000); // in milliseconds
int light;
if (ptime < 255) light = ptime;
else if (ptime > 2000 - 255) light = 2000 - ptime;
else light = 255;
let colr = Color(light, light, light);
int nStringWidth = SmallFont.StringWidth(pagelines[i]);
Screen.DrawText(SmallFont, Font.CR_UNTRANSLATED, 160 - nStringWidth / 2, y, pagelines[i], DTA_FullscreenScale, FSMode_Fit320x200, DTA_Color, colr);
y += 10;