aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/console.cpp13
-rw-r--r--engines/mohawk/console.h1
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