mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 20:40:47 +00:00
PCExhumed: Fix the timing of credits text when not using CD audio.
# Conflicts: # source/exhumed/src/exhumed.cpp
This commit is contained in:
parent
262f2234c6
commit
20cfbc1786
3 changed files with 22 additions and 36 deletions
|
@ -1233,7 +1233,7 @@ void DoCredits()
|
|||
|
||||
playCDtrack(19, false);
|
||||
|
||||
int var_20 = 0;
|
||||
int nSecretSkipKeyCount = 0;
|
||||
|
||||
if (videoGetRenderMode() == REND_CLASSIC)
|
||||
FadeOut(0);
|
||||
|
@ -1271,14 +1271,14 @@ void DoCredits()
|
|||
|
||||
while ((int)totalclock <= nDuration)
|
||||
{
|
||||
handleevents();
|
||||
HandleAsync();
|
||||
if(inputState.GetKeyStatus(sc_F12))
|
||||
{
|
||||
var_20++;
|
||||
nSecretSkipKeyCount++;
|
||||
|
||||
inputState.ClearKeyStatus(sc_F12);
|
||||
|
||||
if (var_20 > 5) {
|
||||
if (nSecretSkipKeyCount > 5) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1290,6 +1290,7 @@ void DoCredits()
|
|||
|
||||
while (CDplaying())
|
||||
{
|
||||
HandleAsync();
|
||||
inputState.keyGetChar();
|
||||
}
|
||||
|
||||
|
|
|
@ -1119,26 +1119,26 @@ void ReadyCinemaText(uint16_t nVal)
|
|||
ComputeCinemaText(line);
|
||||
}
|
||||
|
||||
uint8_t AdvanceCinemaText()
|
||||
bool AdvanceCinemaText()
|
||||
{
|
||||
int tmp = nHeight + nCrawlY > 0;
|
||||
bool bDoText = nHeight + nCrawlY > 0;
|
||||
|
||||
if (tmp || CDplaying())
|
||||
if (bDoText || CDplaying())
|
||||
{
|
||||
nextclock = (int)totalclock + 14;
|
||||
nextclock = (int)totalclock + 15; // NOTE: Value was 14 in original code but seems a touch too fast now
|
||||
|
||||
if (tmp > 0)
|
||||
if (bDoText)
|
||||
{
|
||||
short y = nCrawlY;
|
||||
int edi = 0;
|
||||
int i = 0;
|
||||
|
||||
while (edi < linecount && y <= 199)
|
||||
while (i < linecount && y <= 199)
|
||||
{
|
||||
if (y >= -10) {
|
||||
myprintext(nLeft[edi], y, gString[line + edi], 0);
|
||||
myprintext(nLeft[i], y, gString[line + i], 0);
|
||||
}
|
||||
|
||||
edi++;
|
||||
i++;
|
||||
y += 10;
|
||||
}
|
||||
|
||||
|
@ -1154,44 +1154,29 @@ uint8_t AdvanceCinemaText()
|
|||
break;
|
||||
}
|
||||
|
||||
if (CDplaying())
|
||||
{
|
||||
if (nextclock <= (int)totalclock) {
|
||||
return kTrue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return kTrue;
|
||||
if (nextclock <= (int)totalclock) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return kFalse;
|
||||
return false;
|
||||
}
|
||||
|
||||
void DoCinemaText(short nVal)
|
||||
{
|
||||
ReadyCinemaText(nVal);
|
||||
|
||||
while (1)
|
||||
bool bContinue = true;
|
||||
|
||||
while (bContinue)
|
||||
{
|
||||
overwritesprite(0, 0, cinematile, 0, 2, kPalNormal);
|
||||
|
||||
uint8_t bContinue = AdvanceCinemaText();
|
||||
bContinue = AdvanceCinemaText();
|
||||
|
||||
WaitVBL();
|
||||
videoNextPage();
|
||||
|
||||
// TEMP
|
||||
int time = (int)totalclock + 4;
|
||||
while ((int)totalclock < time) {
|
||||
HandleAsync();
|
||||
}
|
||||
|
||||
if (!bContinue) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ int LoadCinemaPalette(int nPal);
|
|||
void CinemaFadeIn();
|
||||
|
||||
void ReadyCinemaText(uint16_t nVal);
|
||||
uint8_t AdvanceCinemaText();
|
||||
bool AdvanceCinemaText();
|
||||
|
||||
void DoFailedFinalScene();
|
||||
|
||||
|
|
Loading…
Reference in a new issue