aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/console.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2016-08-13 08:57:06 +0200
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit9ab0d53cd3d8008b55d64cea832191f5ef2155ce (patch)
tree457dfd8bfaf5da2816acab8f49eb800484c6f115 /engines/mohawk/console.cpp
parentab9b241e50a54384635f3bc35dbb775e0fa3a909 (diff)
downloadscummvm-rg350-9ab0d53cd3d8008b55d64cea832191f5ef2155ce.tar.gz
scummvm-rg350-9ab0d53cd3d8008b55d64cea832191f5ef2155ce.tar.bz2
scummvm-rg350-9ab0d53cd3d8008b55d64cea832191f5ef2155ce.zip
MOHAWK: Add console commands to dump Riven cards and stacks to stdout
Diffstat (limited to 'engines/mohawk/console.cpp')
-rw-r--r--engines/mohawk/console.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 417d9dd63f..3f6f241a23 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -379,11 +379,13 @@ bool MystConsole::Cmd_QuickTest(int argc, const char **argv) {
RivenConsole::RivenConsole(MohawkEngine_Riven *vm) : GUI::Debugger(), _vm(vm) {
registerCmd("changeCard", WRAP_METHOD(RivenConsole, Cmd_ChangeCard));
registerCmd("curCard", WRAP_METHOD(RivenConsole, Cmd_CurCard));
+ registerCmd("dumpCard", WRAP_METHOD(RivenConsole, Cmd_DumpCard));
registerCmd("var", WRAP_METHOD(RivenConsole, Cmd_Var));
registerCmd("playSound", WRAP_METHOD(RivenConsole, Cmd_PlaySound));
registerCmd("playSLST", WRAP_METHOD(RivenConsole, Cmd_PlaySLST));
registerCmd("stopSound", WRAP_METHOD(RivenConsole, Cmd_StopSound));
registerCmd("curStack", WRAP_METHOD(RivenConsole, Cmd_CurStack));
+ registerCmd("dumpStack", WRAP_METHOD(RivenConsole, Cmd_DumpStack));
registerCmd("changeStack", WRAP_METHOD(RivenConsole, Cmd_ChangeStack));
registerCmd("hotspots", WRAP_METHOD(RivenConsole, Cmd_Hotspots));
registerCmd("zipMode", WRAP_METHOD(RivenConsole, Cmd_ZipMode));
@@ -542,6 +544,32 @@ bool RivenConsole::Cmd_ZipMode(int argc, const char **argv) {
return true;
}
+bool RivenConsole::Cmd_DumpCard(int argc, const char **argv) {
+ if (argc != 1) {
+ debugPrintf("Usage: dumpCard\n");
+ return true;
+ }
+
+ _vm->getCard()->dump();
+
+ debugPrintf("Card dump complete.\n");
+
+ return true;
+}
+
+bool RivenConsole::Cmd_DumpStack(int argc, const char **argv) {
+ if (argc != 1) {
+ debugPrintf("Usage: dumpStack\n");
+ return true;
+ }
+
+ _vm->getStack()->dump();
+
+ debugPrintf("Stack dump complete.\n");
+
+ return true;
+}
+
bool RivenConsole::Cmd_DumpScript(int argc, const char **argv) {
if (argc < 4) {
debugPrintf("Usage: dumpScript <stack> <CARD or HSPT> <card>\n");