diff options
author | Paul Gilbert | 2010-11-21 05:31:13 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-11-21 05:31:13 +0000 |
commit | cb2a20cbd05bd8d137eda0adf75609186271255d (patch) | |
tree | dc4422607bd536163335b565839b8d26f43e2532 | |
parent | f2498b54cec805d14cfdb0d99d9dd455f4b29a95 (diff) | |
download | scummvm-rg350-cb2a20cbd05bd8d137eda0adf75609186271255d.tar.gz scummvm-rg350-cb2a20cbd05bd8d137eda0adf75609186271255d.tar.bz2 scummvm-rg350-cb2a20cbd05bd8d137eda0adf75609186271255d.zip |
CRUISE: Bugfix for #3064846 - Raoul appearing in Book screen
svn-id: r54405
-rw-r--r-- | engines/cruise/cruise_main.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index ac814b3279..6b487fadc9 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -1886,11 +1886,27 @@ void CruiseEngine::mainLoop() { currentMouseButton = 0; } - manageScripts(&relHead); - manageScripts(&procHead); - - removeFinishedScripts(&relHead); - removeFinishedScripts(&procHead); + // FIXME: I suspect that the original game does multiple script executions between game frames; the bug with + // Raoul appearing when looking at the book is being there are 3 script iterations separation between the + // scene being changed to the book, and the Raoul actor being frozen/disabled. This loop is a hack to ensure + // that when a background changes, a few extra script executions are done + bool bgChanged; + int numIterations = 1; + + while (numIterations-- > 0) { + bgChanged = backgroundChanged[masterScreen]; + + manageScripts(&relHead); + manageScripts(&procHead); + + removeFinishedScripts(&relHead); + removeFinishedScripts(&procHead); + + if (!bgChanged && backgroundChanged[masterScreen]) { + bgChanged = true; + numIterations += 2; + } + } processAnimation(); |