aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/console.cpp
diff options
context:
space:
mode:
authorAlyssa Milburn2011-01-22 11:37:37 +0000
committerAlyssa Milburn2011-01-22 11:37:37 +0000
commit86b90fe8a69868d1b28009e36730523652a69d17 (patch)
treeb1b1de423619feb3ca74471417bf0546dc971307 /engines/mohawk/console.cpp
parente23fef92ddecb5a2b7748ab6d64989fd7c28fe38 (diff)
downloadscummvm-rg350-86b90fe8a69868d1b28009e36730523652a69d17.tar.gz
scummvm-rg350-86b90fe8a69868d1b28009e36730523652a69d17.tar.bz2
scummvm-rg350-86b90fe8a69868d1b28009e36730523652a69d17.zip
MOHAWK: Add some debug commands for CSTime.
svn-id: r55417
Diffstat (limited to 'engines/mohawk/console.cpp')
-rw-r--r--engines/mohawk/console.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 146fc5e77b..a59e9dfb55 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -709,6 +709,10 @@ CSTimeConsole::CSTimeConsole(MohawkEngine_CSTime *vm) : GUI::Debugger(), _vm(vm)
DCmd_Register("stopSound", WRAP_METHOD(CSTimeConsole, Cmd_StopSound));
DCmd_Register("drawImage", WRAP_METHOD(CSTimeConsole, Cmd_DrawImage));
DCmd_Register("drawSubimage", WRAP_METHOD(CSTimeConsole, Cmd_DrawSubimage));
+ DCmd_Register("changeCase", WRAP_METHOD(CSTimeConsole, Cmd_ChangeCase));
+ DCmd_Register("changeScene", WRAP_METHOD(CSTimeConsole, Cmd_ChangeScene));
+ DCmd_Register("caseVariable", WRAP_METHOD(CSTimeConsole, Cmd_CaseVariable));
+ DCmd_Register("invItem", WRAP_METHOD(CSTimeConsole, Cmd_InvItem));
}
CSTimeConsole::~CSTimeConsole() {
@@ -754,4 +758,52 @@ bool CSTimeConsole::Cmd_DrawSubimage(int argc, const char **argv) {
return false;
}
+bool CSTimeConsole::Cmd_ChangeCase(int argc, const char **argv) {
+ if (argc < 2) {
+ DebugPrintf("Usage: changeCase <value>\n");
+ return true;
+ }
+
+ error("Can't change case yet"); // FIXME
+ return false;
+}
+
+bool CSTimeConsole::Cmd_ChangeScene(int argc, const char **argv) {
+ if (argc < 2) {
+ DebugPrintf("Usage: changeScene <value>\n");
+ return true;
+ }
+
+ _vm->addEvent(CSTimeEvent(kCSTimeEventNewScene, 0xffff, atoi(argv[1])));
+ return false;
+}
+
+bool CSTimeConsole::Cmd_CaseVariable(int argc, const char **argv) {
+ if (argc < 2) {
+ DebugPrintf("Usage: caseVariable <id> [<value>]\n");
+ return true;
+ }
+
+ if (argc == 2) {
+ DebugPrintf("case variable %d has value %d\n", atoi(argv[1]), _vm->_caseVariable[atoi(argv[1])]);
+ } else {
+ _vm->_caseVariable[atoi(argv[1])] = atoi(argv[2]);
+ }
+ return true;
+}
+
+bool CSTimeConsole::Cmd_InvItem(int argc, const char **argv) {
+ if (argc < 3) {
+ DebugPrintf("Usage: invItem <id> <0 or 1>\n");
+ return true;
+ }
+
+ if (atoi(argv[2])) {
+ _vm->addEvent(CSTimeEvent(kCSTimeEventDropItemInInventory, 0xffff, atoi(argv[1])));
+ } else {
+ _vm->addEvent(CSTimeEvent(kCSTimeEventRemoveItemFromInventory, 0xffff, atoi(argv[1])));
+ }
+ return false;
+}
+
} // End of namespace Mohawk