Add some timing code to the Laptop scene to control the playback speed. This speed isn't likely exact to the original - might need to verify this on one of my old machines.

# Conflicts:
#	source/exhumed/src/menu.cpp
This commit is contained in:
sirlemonhead 2019-12-02 14:05:37 +00:00 committed by Christoph Oelckers
parent 33eeb3956f
commit 5b82f519ff

View file

@ -2279,14 +2279,22 @@ void DoLastLevelCinema()
} }
DoStatic(var_28, var_24); DoStatic(var_28, var_24);
// WaitVBL();
int time = (int)totalclock + 4;
while ((int)totalclock < time) {
HandleAsync();
}
} }
// loc_3AD75 // loc_3AD75
do do
{ {
LABEL_11:
HandleAsync(); HandleAsync();
LABEL_11:
if (strlen(gString[nString]) == 0) if (strlen(gString[nString]) == 0)
break; break;
@ -2331,7 +2339,12 @@ LABEL_11:
overwritesprite(0, 0, kTileLoboLaptop, 0, 2, kPalNormal); overwritesprite(0, 0, kTileLoboLaptop, 0, 2, kPalNormal);
videoNextPage(); videoNextPage();
WaitVBL(); // WaitVBL();
int time = (int)totalclock + 4;
while ((int)totalclock < time) {
HandleAsync();
}
if (CheckForEscape()) if (CheckForEscape())
goto LABEL_28; goto LABEL_28;
} }
@ -2344,7 +2357,7 @@ LABEL_11:
inputState.keyFlushChars(); inputState.keyFlushChars();
inputState.ClearAllKeyStatus(); inputState.ClearAllKeyStatus();
int v11 = kTimerTicks * (var_1C + 2) + (int)totalclock; int v11 = (kTimerTicks * (var_1C + 2)) + (int)totalclock;
do do
{ {
@ -2359,12 +2372,20 @@ LABEL_11:
LABEL_28: LABEL_28:
PlayLocalSound(StaticSound[kSound75], 0); PlayLocalSound(StaticSound[kSound75], 0);
while (1) nEndTime = (int)totalclock + 240;
while (nEndTime > (int)totalclock)
{ {
HandleAsync(); HandleAsync();
DoStatic(var_28, var_24); DoStatic(var_28, var_24);
// WaitVBL();
int time = (int)totalclock + 4;
while ((int)totalclock < time) {
HandleAsync();
}
if (var_28 > 20) { if (var_28 > 20) {
var_28 -= 20; var_28 -= 20;
continue; continue;