aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/animate.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2017-11-29 22:43:52 +0100
committerAdrian Frühwirth2018-04-22 22:54:18 +0200
commit65861bb914a3174a2922ba8f9c6435db0cc70f35 (patch)
tree27a56b3cf8521653a4e5f5a41c29224c9c126f66 /engines/sci/graphics/animate.cpp
parent10abb0c646fee1ddf516330ab4736c6ab087569e (diff)
downloadscummvm-rg350-65861bb914a3174a2922ba8f9c6435db0cc70f35.tar.gz
scummvm-rg350-65861bb914a3174a2922ba8f9c6435db0cc70f35.tar.bz2
scummvm-rg350-65861bb914a3174a2922ba8f9c6435db0cc70f35.zip
SCI: Change workaround for PalVary / Animate race condition
The new approach is to delay kAnimate briefly (with an 68ms timeout) while there is a zero-tick PalVary running, so that it has time to trigger. The previous workaround would immediately process a zero-tick PalVaryInit/PalVaryReverse. This caused problems in QfG3 (bug #10304) where it interfered with PalVaryPause. The previous workaround could also be modified to handle pause/resume, but this new approach should be closer to SSCI's behaviour, which used a timer for a zero-tick PalVary too. This fixes bug #10304, and keeps #5298 fixed too.
Diffstat (limited to 'engines/sci/graphics/animate.cpp')
-rw-r--r--engines/sci/graphics/animate.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index 317e98feab..8875162394 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -650,6 +650,11 @@ void GfxAnimate::animateShowPic() {
}
void GfxAnimate::kernelAnimate(reg_t listReference, bool cycle, int argc, reg_t *argv) {
+ // If necessary, delay this kAnimate for a running PalVary.
+ // See delayForPalVaryWorkaround() for details.
+ if (_screen->_picNotValid)
+ _palette->delayForPalVaryWorkaround();
+
byte old_picNotValid = _screen->_picNotValid;
if (getSciVersion() >= SCI_VERSION_1_1)