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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Jul 10 14:12:42 CEST 2008


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

Log Message:
-----------
Added filename to unkown command/opcode warnings for TIM scripts.

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

Modified: scummvm/trunk/engines/kyra/script_tim.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.cpp	2008-07-10 12:05:38 UTC (rev 32988)
+++ scummvm/trunk/engines/kyra/script_tim.cpp	2008-07-10 12:12:42 UTC (rev 32989)
@@ -124,6 +124,8 @@
 	for (int i = 0; i < num; ++i)
 		tim->func[i].avtl = tim->avtl + tim->avtl[i];	
 
+	strncpy(tim->filename, filename, 13);
+
 	return tim;
 }
 
@@ -201,12 +203,12 @@
 
 int TIMInterpreter::execCommand(int cmd, const uint16 *param) {
 	if (cmd < 0 || cmd >= _commandsSize) {
-		warning("Calling unimplemented TIM command %d", cmd);
+		warning("Calling unimplemented TIM command %d from file '%s'", cmd, _currentTim->filename);
 		return 0;
 	}
 
 	if (_commands[cmd].proc == 0) {
-		warning("Calling unimplemented TIM command %d", cmd);
+		warning("Calling unimplemented TIM command %d from file '%s'", cmd, _currentTim->filename);
 		return 0;
 	}
 
@@ -261,7 +263,7 @@
 
 	uint16 opcode = *param++;
 	if (opcode > _currentTim->opcodes->size()) {
-		warning("Calling unimplemented TIM opcode(0x%.02X/%d)", opcode, opcode);
+		warning("Calling unimplemented TIM opcode(0x%.02X/%d) form file '%s'", opcode, opcode, _currentTim->filename);
 		return 0;
 	}
 

Modified: scummvm/trunk/engines/kyra/script_tim.h
===================================================================
--- scummvm/trunk/engines/kyra/script_tim.h	2008-07-10 12:05:38 UTC (rev 32988)
+++ scummvm/trunk/engines/kyra/script_tim.h	2008-07-10 12:12:42 UTC (rev 32989)
@@ -37,6 +37,8 @@
 typedef Common::Functor2<const TIM*, const uint16*, int> TIMOpcode;
 
 struct TIM {
+	char filename[13];
+
 	int16 procFunc;
 	uint16 procParam;
 


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