diff options
author | Alyssa Milburn | 2010-11-30 21:06:40 +0000 |
---|---|---|
committer | Alyssa Milburn | 2010-11-30 21:06:40 +0000 |
commit | 90b61c0bd48f907d640c9f9846b5570f10e0f069 (patch) | |
tree | 5541b576942ce106546bbcd260cadad33b6144fc | |
parent | 26b372cfd23f93f6023b4561889384de8a91c883 (diff) | |
download | scummvm-rg350-90b61c0bd48f907d640c9f9846b5570f10e0f069.tar.gz scummvm-rg350-90b61c0bd48f907d640c9f9846b5570f10e0f069.tar.bz2 scummvm-rg350-90b61c0bd48f907d640c9f9846b5570f10e0f069.zip |
MOHAWK: add changePage Living Books debug command
svn-id: r54688
-rw-r--r-- | engines/mohawk/console.cpp | 13 | ||||
-rw-r--r-- | engines/mohawk/console.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp index b81d9c4c0e..2709cac52b 100644 --- a/engines/mohawk/console.cpp +++ b/engines/mohawk/console.cpp @@ -652,6 +652,7 @@ LivingBooksConsole::LivingBooksConsole(MohawkEngine_LivingBooks *vm) : GUI::Debu DCmd_Register("playSound", WRAP_METHOD(LivingBooksConsole, Cmd_PlaySound)); DCmd_Register("stopSound", WRAP_METHOD(LivingBooksConsole, Cmd_StopSound)); DCmd_Register("drawImage", WRAP_METHOD(LivingBooksConsole, Cmd_DrawImage)); + DCmd_Register("changePage", WRAP_METHOD(LivingBooksConsole, Cmd_ChangePage)); } LivingBooksConsole::~LivingBooksConsole() { @@ -694,4 +695,16 @@ bool LivingBooksConsole::Cmd_DrawImage(int argc, const char **argv) { return false; } +bool LivingBooksConsole::Cmd_ChangePage(int argc, const char **argv) { + if (argc == 1) { + DebugPrintf("Usage: changePage <page>\n"); + return true; + } + + if (_vm->tryLoadPageStart(_vm->getCurMode(), atoi(argv[1]))) + return false; + DebugPrintf("no such page %d\n", atoi(argv[1])); + return true; +} + } // End of namespace Mohawk diff --git a/engines/mohawk/console.h b/engines/mohawk/console.h index beba3f8852..a79b63f6f2 100644 --- a/engines/mohawk/console.h +++ b/engines/mohawk/console.h @@ -107,6 +107,7 @@ private: bool Cmd_PlaySound(int argc, const char **argv); bool Cmd_StopSound(int argc, const char **argv); bool Cmd_DrawImage(int argc, const char **argv); + bool Cmd_ChangePage(int argc, const char **argv); }; } // End of namespace Mohawk |