MOHAWK: add changePage Living Books debug command

svn-id: r54688
This commit is contained in:
Alyssa Milburn 2010-11-30 21:06:40 +00:00
parent 26b372cfd2
commit 90b61c0bd4
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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