[Scummvm-cvs-logs] SF.net SVN: scummvm:[49331] scummvm/trunk/engines/sci/engine/kscripts.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sun May 30 22:01:25 CEST 2010


Revision: 49331
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49331&view=rev
Author:   thebluegr
Date:     2010-05-30 20:01:25 +0000 (Sun, 30 May 2010)

Log Message:
-----------
kScriptID can be used to load scripts with no exports. Don't throw warnings in this case if no export is requested, as it's perfectly normal behavior

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kscripts.cpp

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-05-30 18:45:07 UTC (rev 49330)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2010-05-30 20:01:25 UTC (rev 49331)
@@ -194,8 +194,14 @@
 	Script *scr = s->_segMan->getScript(scriptSeg);
 
 	if (!scr->_numExports) {
-		// FIXME: Is this fatal? This occurs in SQ4CD
-		warning("Script 0x%x does not have a dispatch table", script);
+		// This is normal. Some scripts don't have a dispatch (exports) table,
+		// and this call is probably used to load them in memory, ignoring
+		// the return value. If only one argument is passed, this call is done
+		// only to load the script in memory. Thus, don't show any warning,
+		// as no return value is expected
+		if (argc == 2)
+			warning("Script 0x%x does not have a dispatch table and export %d "
+					"was requested from it", script, index);
 		return NULL_REG;
 	}
 


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