aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2012-04-21 01:31:42 +0100
committerD G Turner2012-04-21 01:55:05 +0100
commita5745434d30f0039db0f5ca7b5ff6781b777d819 (patch)
tree0c3f37269e85dcf901bdf3c2dca7eda9645be3f7
parentf351a1d7ba28db0924e602e9ee9677edf4ac72f0 (diff)
downloadscummvm-rg350-a5745434d30f0039db0f5ca7b5ff6781b777d819.tar.gz
scummvm-rg350-a5745434d30f0039db0f5ca7b5ff6781b777d819.tar.bz2
scummvm-rg350-a5745434d30f0039db0f5ca7b5ff6781b777d819.zip
CRUISE: Fix update of background animations while waiting for user.
This is the third and final part of the patch supplied by Ignaz Forster on bug #3423955 ("CRUISE: Slow / unresponsive game behaviour") for avoiding blocking graphical updates during user wait loops. The removal of the continue statement fixes the update of background animations while waiting for user to respond i.e. try opening a locked door on the upper deck of the boat and check the sea background animation, but it also has the side effect of allowing hotspots to respond during this period if the user clicks fast enough. However, this bug was also present in the original interpreter, and a workaround has been added to inhibit this.
-rw-r--r--engines/cruise/cruise_main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index fe113deebf..911041c1a4 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -1872,6 +1872,14 @@ void CruiseEngine::mainLoop() {
// readKeyboard();
bool isUserWait = userWait != 0;
+ // WORKAROUND: This prevents hotspots responding during
+ // delays i.e. Menu opening if you click fast on another
+ // hotspot after trying to open a locked door, which
+ // occurred with the original interpreter.
+ if (userDelay) {
+ currentMouseButton = 0;
+ }
+
playerDontAskQuit = processInput();
if (playerDontAskQuit)
break;
@@ -1883,7 +1891,6 @@ void CruiseEngine::mainLoop() {
if (userDelay && !userWait) {
userDelay--;
- continue;
}
if (isUserWait & !userWait) {