Fix Cinema screens not showing correct cinemas on the correct levels

This commit is contained in:
sirlemonhead 2019-11-01 22:05:32 +00:00 committed by Christoph Oelckers
parent 85dec18ee7
commit f0b1a37615

View file

@ -1952,6 +1952,12 @@ void DoCinemaText(short nVal)
WaitVBL(); WaitVBL();
videoNextPage(); videoNextPage();
// TEMP
int time = (int)totalclock + 4;
while ((int)totalclock < time) {
HandleAsync();
}
if (!bContinue) { if (!bContinue) {
return; return;
} }
@ -2021,7 +2027,7 @@ void GoToTheCinema(int nVal)
StopAllSounds(); StopAllSounds();
NoClip(); NoClip();
overwritesprite(0, 0, 764, 100, 2, kPalNormal); overwritesprite(0, 0, kMovieTile, 100, 2, kPalNormal);
videoNextPage(); videoNextPage();
// int386(16, (const union REGS *)&val, (union REGS *)&val) // int386(16, (const union REGS *)&val, (union REGS *)&val)
@ -2099,7 +2105,7 @@ void GoToTheCinema(int nVal)
} }
short nBeforeScene[] = { 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; short nBeforeScene[] = { 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
void CheckBeforeScene(int nLevel) void CheckBeforeScene(int nLevel)
@ -2110,12 +2116,14 @@ void CheckBeforeScene(int nLevel)
return; return;
} }
if (nBeforeScene[nLevel]) short nScene = nBeforeScene[nLevel];
if (nScene)
{ {
if (!nCinemaSeen[nLevel]) if (!nCinemaSeen[nScene])
{ {
GoToTheCinema(nLevel); GoToTheCinema(nScene);
nCinemaSeen[nLevel] = 1; nCinemaSeen[nScene] = 1;
} }
} }
} }