mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 05:34:27 +00:00
SCI: Add a workaround for script bug #3537232
The bug in question is "SCI: SQ4 Floppy DOS title screen skipping too quickly", and is caused by game scripts not waiting between palette calls
This commit is contained in:
parent
478fd0ed29
commit
99de89c974
@ -645,6 +645,20 @@ reg_t kPaletteAnimate(EngineState *s, int argc, reg_t *argv) {
|
||||
if (paletteChanged)
|
||||
g_sci->_gfxPalette->kernelAnimateSet();
|
||||
|
||||
// WORKAROUND: The game scripts in SQ4 floppy count the number of elapsed
|
||||
// cycles in the intro from the number of successive kAnimate calls during
|
||||
// the palette cycling effect, while showing the SQ4 logo. This worked in
|
||||
// older computers because each animate call took awhile to complete.
|
||||
// Normally, such scripts are handled automatically by our speed throttler,
|
||||
// however in this case there are no calls to kGameIsRestarting (where the
|
||||
// speed throttler gets called) between the different palette animation calls.
|
||||
// Thus, we add a small delay between each animate call to make the whole
|
||||
// palette animation effect slower and visible, and not have the logo screen
|
||||
// get skipped because the scripts don't wait between animation steps. Fixes
|
||||
// bug #3537232.
|
||||
if (g_sci->getGameId() == GID_SQ4 && !g_sci->isCD() && s->currentRoomNumber() == 1)
|
||||
g_sci->sleep(10);
|
||||
|
||||
return s->r_acc;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user