[Scummvm-cvs-logs] SF.net SVN: scummvm: [32668] scummvm/trunk/engines/made/script.cpp
john_doe at users.sourceforge.net
john_doe at users.sourceforge.net
Thu Jun 12 13:01:08 CEST 2008
Revision: 32668
http://scummvm.svn.sourceforge.net/scummvm/?rev=32668&view=rev
Author: john_doe
Date: 2008-06-12 04:01:08 -0700 (Thu, 12 Jun 2008)
Log Message:
-----------
Updated script dumper to show opcode offset.
Modified Paths:
--------------
scummvm/trunk/engines/made/script.cpp
Modified: scummvm/trunk/engines/made/script.cpp
===================================================================
--- scummvm/trunk/engines/made/script.cpp 2008-06-11 17:36:21 UTC (rev 32667)
+++ scummvm/trunk/engines/made/script.cpp 2008-06-12 11:01:08 UTC (rev 32668)
@@ -363,8 +363,7 @@
void ScriptInterpreter::cmd_print() {
// TODO: This opcode was used for printing debug messages
- Object *obj = _vm->_dat->getObject(_stack.top());
- const char *text = obj->getString();
+ const char *text = _vm->_dat->getObjectString(_stack.top());
debug(4, "%s", text);
_stack.setTop(0);
}
@@ -672,7 +671,7 @@
debug(1, "Dumping code for object %04X", objectIndex);
Object *obj = _vm->_dat->getObject(objectIndex);
- byte *code = obj->getData(), *codeEnd = code + obj->getSize();
+ byte *code = obj->getData(), *codeStart = code, *codeEnd = code + obj->getSize();
while (code < codeEnd) {
byte opcode = *code++;
@@ -684,6 +683,8 @@
int16 value;
char tempStr[32];
opcodeStats[opcode - 1]++;
+ snprintf(tempStr, 32, "[%04X] ", (uint16)(code - codeStart - 1));
+ codeLine += tempStr;
codeLine += desc;
for (; *sig != '\0'; sig++) {
codeLine += " ";
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