[Scummvm-cvs-logs] SF.net SVN: scummvm:[33359] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Mon Jul 28 10:25:06 CEST 2008


Revision: 33359
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33359&view=rev
Author:   peres001
Date:     2008-07-28 08:25:06 +0000 (Mon, 28 Jul 2008)

Log Message:
-----------
Some instrumentation for script debugging.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/exec.h
    scummvm/trunk/engines/parallaction/exec_br.cpp
    scummvm/trunk/engines/parallaction/exec_ns.cpp

Modified: scummvm/trunk/engines/parallaction/exec.h
===================================================================
--- scummvm/trunk/engines/parallaction/exec.h	2008-07-28 08:12:10 UTC (rev 33358)
+++ scummvm/trunk/engines/parallaction/exec.h	2008-07-28 08:25:06 UTC (rev 33359)
@@ -143,10 +143,6 @@
 	~CommandExec_br();
 };
 
-
-
-
-
 class ProgramExec {
 protected:
 	struct ParallactionStruct2 {
@@ -157,6 +153,8 @@
 		bool		suspend;
 	} _ctxt;
 
+	const char **_instructionNames;
+
 	OpcodeSet	_opcodes;
 
 	uint16	_modCounter;

Modified: scummvm/trunk/engines/parallaction/exec_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/exec_br.cpp	2008-07-28 08:12:10 UTC (rev 33358)
+++ scummvm/trunk/engines/parallaction/exec_br.cpp	2008-07-28 08:25:06 UTC (rev 33359)
@@ -61,8 +61,6 @@
 #define INST_STOP		30
 #define INST_ENDSCRIPT	31
 
-
-
 #define SetOpcodeTable(x) table = &x;
 
 typedef Common::Functor0Mem<void, CommandExec_br> OpcodeV1;
@@ -73,6 +71,8 @@
 #define INSTRUCTION_OPCODE(op) table->push_back(new OpcodeV2(this, &ProgramExec_br::instOp_##op))
 #define DECLARE_INSTRUCTION_OPCODE(op) void ProgramExec_br::instOp_##op()
 
+extern const char *_instructionNamesRes_br[];
+
 void Parallaction_br::setupSubtitles(char *s, char *s2, int y) {
 	debugC(5, kDebugExec, "setupSubtitles(%s, %s, %i)", s, s2, y);
 
@@ -602,6 +602,7 @@
 }
 
 ProgramExec_br::ProgramExec_br(Parallaction_br *vm) : ProgramExec_ns(vm), _vm(vm) {
+	_instructionNames = _instructionNamesRes_br;
 }
 
 ProgramExec_br::~ProgramExec_br() {

Modified: scummvm/trunk/engines/parallaction/exec_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/exec_ns.cpp	2008-07-28 08:12:10 UTC (rev 33358)
+++ scummvm/trunk/engines/parallaction/exec_ns.cpp	2008-07-28 08:25:06 UTC (rev 33359)
@@ -61,9 +61,9 @@
 #define INSTRUCTION_OPCODE(op) table->push_back(new OpcodeV2(this, &ProgramExec_ns::instOp_##op))
 #define DECLARE_INSTRUCTION_OPCODE(op) void ProgramExec_ns::instOp_##op()
 
+extern const char *_instructionNamesRes_ns[];
 
 
-
 DECLARE_INSTRUCTION_OPCODE(on) {
 	InstructionPtr inst = *_ctxt.inst;
 
@@ -394,7 +394,7 @@
 
 			(*it)->_status = kProgramRunning;
 
-			debugC(9, kDebugExec, "Animation: %s, instruction: %i", a->_name, (*inst)->_index); //_instructionNamesRes[(*inst)->_index - 1]);
+			debugC(9, kDebugExec, "anim: %s, inst[%02i]: %s", a->_name, (*inst)->_index, _instructionNames[(*inst)->_index - 1]);
 
 			_ctxt.inst = inst;
 			_ctxt.anim = AnimationPtr(a);
@@ -755,6 +755,7 @@
 }
 
 ProgramExec_ns::ProgramExec_ns(Parallaction_ns *vm) : _vm(vm) {
+	_instructionNames = _instructionNamesRes_ns;
 }
 
 ProgramExec_ns::~ProgramExec_ns() {


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