[Scummvm-cvs-logs] SF.net SVN: scummvm:[54667] scummvm/branches/branch-1-2-0

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Tue Nov 30 09:27:16 CET 2010


Revision: 54667
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54667&view=rev
Author:   dreammaster
Date:     2010-11-30 08:27:15 +0000 (Tue, 30 Nov 2010)

Log Message:
-----------
Backport of #54405 - Fix for Raoul appearing in Book screen

Modified Paths:
--------------
    scummvm/branches/branch-1-2-0/NEWS
    scummvm/branches/branch-1-2-0/engines/cruise/cruise_main.cpp

Modified: scummvm/branches/branch-1-2-0/NEWS
===================================================================
--- scummvm/branches/branch-1-2-0/NEWS	2010-11-30 07:57:59 UTC (rev 54666)
+++ scummvm/branches/branch-1-2-0/NEWS	2010-11-30 08:27:15 UTC (rev 54667)
@@ -5,6 +5,9 @@
    - Add Hungarian translation.
    - Add Brazilian Portuguese translation.
 
+ Cruise
+   - Fixed a problem with Raoul appearing when examining the Book
+
  Groovie:
    - Fixed a regression that made the Russian version of T7G crash.
 

Modified: scummvm/branches/branch-1-2-0/engines/cruise/cruise_main.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/engines/cruise/cruise_main.cpp	2010-11-30 07:57:59 UTC (rev 54666)
+++ scummvm/branches/branch-1-2-0/engines/cruise/cruise_main.cpp	2010-11-30 08:27:15 UTC (rev 54667)
@@ -1886,12 +1886,28 @@
 			currentMouseButton = 0;
 		}
 
-		manageScripts(&relHead);
-		manageScripts(&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;
 
-		removeFinishedScripts(&relHead);
-		removeFinishedScripts(&procHead);
+		while (numIterations-- > 0) {
+			bgChanged = backgroundChanged[masterScreen];
+		
+			manageScripts(&relHead);
+			manageScripts(&procHead);
 
+			removeFinishedScripts(&relHead);
+			removeFinishedScripts(&procHead);
+
+			if (!bgChanged && backgroundChanged[masterScreen]) {
+				bgChanged = true;
+				numIterations += 2;
+			}
+		}
+
 		processAnimation();
 
 		if (remdo) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list