aboutsummaryrefslogtreecommitdiff
path: root/engines/made/script.h
diff options
context:
space:
mode:
authorBenjamin Haisch2008-05-20 20:00:10 +0000
committerBenjamin Haisch2008-05-20 20:00:10 +0000
commit828a217a03038673dfbd0f88a80f78832b55d872 (patch)
treeccd7503b1f376dd87e4c1b1051137a384b5405ce /engines/made/script.h
parent11697c0eb24aed6c6997c1d6282b69ed3448b1e9 (diff)
downloadscummvm-rg350-828a217a03038673dfbd0f88a80f78832b55d872.tar.gz
scummvm-rg350-828a217a03038673dfbd0f88a80f78832b55d872.tar.bz2
scummvm-rg350-828a217a03038673dfbd0f88a80f78832b55d872.zip
- Implemented "stand-alone" script dumper/disassembler; it can be enabled by defining DUMP_SCRIPTS in script.h and starting with at least debug level 1.
- Commented which script opcodes and extended functions are actually used or not. svn-id: r32202
Diffstat (limited to 'engines/made/script.h')
-rw-r--r--engines/made/script.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/made/script.h b/engines/made/script.h
index 0ec43478ab..459a088cb8 100644
--- a/engines/made/script.h
+++ b/engines/made/script.h
@@ -32,6 +32,11 @@
namespace Made {
+// Define this to dump all game scripts and a usage statistic of all
+// opcodes/extended functions instead of running the actual game.
+// Then run ScummVM with debuglevel 1.
+//#define DUMP_SCRIPTS
+
class MadeEngine;
class ScriptFunctions;
@@ -63,6 +68,8 @@ public:
ScriptInterpreter(MadeEngine *vm);
~ScriptInterpreter();
void runScript(int16 scriptObjectIndex);
+ void dumpScript(int16 objectIndex, int *opcodeStats, int *externStats);
+ void dumpAllScripts();
protected:
MadeEngine *_vm;
@@ -71,7 +78,6 @@ protected:
int16 _runningScriptObjectIndex;
byte *_codeBase, *_codeIp;
bool _terminated;
- bool _dumpScripts;
ScriptFunctions *_functions;
@@ -82,6 +88,9 @@ protected:
struct CommandEntry {
CommandProc proc;
const char *desc;
+#ifdef DUMP_SCRIPTS
+ const char *sig;
+#endif
};
const CommandEntry *_commands;