From 90b61c0bd48f907d640c9f9846b5570f10e0f069 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Tue, 30 Nov 2010 21:06:40 +0000 Subject: MOHAWK: add changePage Living Books debug command svn-id: r54688 --- engines/mohawk/console.cpp | 13 +++++++++++++ engines/mohawk/console.h | 1 + 2 files changed, 14 insertions(+) (limited to 'engines/mohawk') 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 \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 -- cgit v1.2.3