[Scummvm-cvs-logs] SF.net SVN: scummvm: [31526] scummvm/trunk/engines/agos/subroutine.cpp

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Thu Apr 17 06:18:53 CEST 2008


Revision: 31526
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31526&view=rev
Author:   Kirben
Date:     2008-04-16 21:18:53 -0700 (Wed, 16 Apr 2008)

Log Message:
-----------
Fix Bug #1555117 - SIMON2: Cannot load Savegame.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/subroutine.cpp

Modified: scummvm/trunk/engines/agos/subroutine.cpp
===================================================================
--- scummvm/trunk/engines/agos/subroutine.cpp	2008-04-16 23:12:15 UTC (rev 31525)
+++ scummvm/trunk/engines/agos/subroutine.cpp	2008-04-17 04:18:53 UTC (rev 31526)
@@ -540,6 +540,18 @@
 	if (++_recursionDepth > 40)
 		error("Recursion error");
 
+	// WORKAROUND: If the game is saved, right after Simon is thrown in the dungeon of Sordid's Fortress of Doom,
+	// the saved game fails to load correctly. When loading the saved game, the sequence of Simon waking is started, 
+	// before the scene is actually reloaded, due to a script bug. We manually add the extra script code from DOS CD
+	// release, which fixed this particular script bug.
+	if (getGameType() == GType_SIMON2 && !(getFeatures() & GF_TALKIE) && sub->id == 12101) {
+		const byte bit = 228;
+		if ((_bitArrayTwo[bit / 16] & (1 << (bit & 15))) != 0 && (int)readVariable(34) == -1) {
+			_bitArrayTwo[228 / 16] &= ~(1 << (bit & 15));
+			writeVariable(34, 1);
+		}
+	}
+
 	_currentTable = sub;
 restart:
 	while ((byte *)sl != (byte *)sub) {


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