[Scummvm-cvs-logs] SF.net SVN: scummvm:[46250] scummvm/trunk/engines/scumm/script_v5.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Dec 4 15:25:34 CET 2009


Revision: 46250
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46250&view=rev
Author:   fingolfin
Date:     2009-12-04 14:25:31 +0000 (Fri, 04 Dec 2009)

Log Message:
-----------
Fix bug 2908376: FOA: Won't launch in Win32

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/script_v5.cpp

Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp	2009-12-04 13:49:43 UTC (rev 46249)
+++ scummvm/trunk/engines/scumm/script_v5.cpp	2009-12-04 14:25:31 UTC (rev 46250)
@@ -1753,6 +1753,12 @@
 
 	case 13:	// SO_SAVE_STRING
 		{
+			// This subopcode is used in Indy 4 to save the IQ points data.
+			// No other game uses it. We use this to replace the given filename by
+			// one based on the targetname ("TARGET.iq").
+			// This way, the iq data of each Indy 4 variant a user might have stays
+			// separate. Moreover, the filename now clearly reflects to which target
+			// it belongs (as it should).
 			Common::String filename;
 			char chr;
 
@@ -1760,7 +1766,7 @@
 			while ((chr = fetchScriptByte()))
 				filename += chr;
 
-			if (filename.hasPrefix("iq-") || filename.hasPrefix("IQ-") || filename.hasSuffix("-iq") || filename.hasSuffix("-IQ")) {
+			if (_game.id == GID_INDY4) {
 				filename = _targetName + ".iq";
 			} else {
 				error("SO_SAVE_STRING: Unsupported filename %s", filename.c_str());
@@ -1778,6 +1784,8 @@
 		}
 	case 14:	// SO_LOAD_STRING
 		{
+			// This subopcode is used in Indy 4 to load the IQ points data.
+			// See SO_SAVE_STRING for details
 			Common::String filename;
 			char chr;
 
@@ -1785,7 +1793,7 @@
 			while ((chr = fetchScriptByte()))
 				filename += chr;
 
-			if (filename.hasPrefix("iq-") || filename.hasPrefix("IQ-") || filename.hasSuffix("-iq") || filename.hasSuffix("-IQ")) {
+			if (_game.id == GID_INDY4) {
 				filename = _targetName + ".iq";
 			} else {
 				error("SO_LOAD_STRING: Unsupported filename %s", filename.c_str());


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