Fix credits screen

# Conflicts:
#	source/exhumed/src/exhumed.cpp
This commit is contained in:
sirlemonhead 2019-11-26 14:44:01 +00:00 committed by Christoph Oelckers
parent f34507813f
commit 82767751a7

View file

@ -1342,6 +1342,7 @@ void DoCredits()
int var_20 = 0; int var_20 = 0;
if (videoGetRenderMode() == REND_CLASSIC)
FadeOut(0); FadeOut(0);
int nCreditsIndex = FindGString("CREDITS"); int nCreditsIndex = FindGString("CREDITS");
@ -1357,36 +1358,27 @@ void DoCredits()
nCreditsIndex++; nCreditsIndex++;
} }
// vars int y = 100 - ((10 * (nCreditsIndex - nStart - 1)) / 2);
int eax = (10 * (nCreditsIndex - nStart - 1)) / 2;
if (eax < 0) {
eax++;
}
eax >>= 1;
int y = 100 - eax;
int edi = nStart;
for (int i = nStart; i < nCreditsIndex; i++) for (int i = nStart; i < nCreditsIndex; i++)
{ {
// var 24 == int nWidth = MyGetStringWidth(gString[i]);
myprintext((320 - nWidth) / 2, y, gString[i], 0);
int nWidth = MyGetStringWidth(gString[edi]);
myprintext((320 - nWidth) / 2, y, gString[edi], 0);
edi++;
y += 10; y += 10;
} }
videoNextPage(); videoNextPage();
nCreditsIndex++;
if (videoGetRenderMode() == REND_CLASSIC)
FadeIn(); FadeIn();
while ((int)totalclock + 600 > (int)totalclock) int nDuration = (int)totalclock + 600;
while ((int)totalclock <= nDuration)
{ {
handleevents();
if(inputState.GetKeyStatus(sc_F12)) if(inputState.GetKeyStatus(sc_F12))
{ {
var_20++; var_20++;
@ -1399,6 +1391,7 @@ void DoCredits()
} }
} }
if (videoGetRenderMode() == REND_CLASSIC)
FadeOut(0); FadeOut(0);
} }