[Scummvm-cvs-logs] SF.net SVN: scummvm: [32988] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Jul 10 14:05:38 CEST 2008


Revision: 32988
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32988&view=rev
Author:   lordhoto
Date:     2008-07-10 05:05:38 -0700 (Thu, 10 Jul 2008)

Log Message:
-----------
Added filename to unknown opcode/command warnings of EMC scripts.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/script.cpp
    scummvm/trunk/engines/kyra/script.h

Modified: scummvm/trunk/engines/kyra/script.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script.cpp	2008-07-10 11:28:51 UTC (rev 32987)
+++ scummvm/trunk/engines/kyra/script.cpp	2008-07-10 12:05:38 UTC (rev 32988)
@@ -132,6 +132,8 @@
 
 	scriptData->opcodes = opcodes;
 
+	strncpy(scriptData->filename, filename, 13);
+
 	return true;
 }
 
@@ -205,7 +207,7 @@
 	}
 
 	if (opcode > 18) {
-		error("Script unknown command: %d", opcode);
+		error("Script unknown command: %d in file '%s' at offset 0x%.08X", opcode, script->dataPtr->filename, instOffset);
 	} else {
 		debugC(5, kDebugLevelScript, "[0x%.08X] EMCInterpreter::%s([%d/%u])", instOffset, _commands[opcode].desc, _parameter, (uint)_parameter);
 		(this->*(_commands[opcode].proc))(script);
@@ -388,7 +390,7 @@
 		script->retValue = (*(*script->dataPtr->opcodes)[opcode])(script);
 	} else {
 		script->retValue = 0;
-		warning("calling unimplemented opcode(0x%.02X/%d)", opcode, opcode);
+		warning("Calling unimplemented opcode(0x%.02X/%d) from file '%s'", opcode, opcode, script->dataPtr->filename);
 	}
 }
 

Modified: scummvm/trunk/engines/kyra/script.h
===================================================================
--- scummvm/trunk/engines/kyra/script.h	2008-07-10 11:28:51 UTC (rev 32987)
+++ scummvm/trunk/engines/kyra/script.h	2008-07-10 12:05:38 UTC (rev 32988)
@@ -36,6 +36,8 @@
 typedef Common::Functor1<EMCState*, int> Opcode;
 
 struct EMCData {
+	char filename[13];
+
 	byte *text;
 	uint16 *data;
 	uint16 *ordr;


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