HOPKINS: Add debugger command to change scene

This commit is contained in:
Strangerke 2013-03-29 07:50:07 +01:00
parent 1100216f86
commit a2c282bc5c
2 changed files with 12 additions and 0 deletions

View File

@ -32,6 +32,7 @@ Debugger::Debugger(HopkinsEngine *vm) : GUI::Debugger() {
_vm = vm;
DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
DCmd_Register("rects", WRAP_METHOD(Debugger, cmd_DirtyRects));
DCmd_Register("teleport", WRAP_METHOD(Debugger, cmd_Teleport));
}
// Turns dirty rects on or off
@ -45,5 +46,15 @@ bool Debugger::cmd_DirtyRects(int argc, const char **argv) {
}
}
// Change room number
bool Debugger::cmd_Teleport(int argc, const char **argv) {
if (argc != 2) {
DebugPrintf("%s: [Room number]\n", argv[0]);
return true;
} else {
_vm->_globals->_exitId = atoi(argv[1]);
return false;
}
}
} // End of namespace Hopkins

View File

@ -39,6 +39,7 @@ public:
virtual ~Debugger() {}
bool cmd_DirtyRects(int argc, const char **argv);
bool cmd_Teleport(int argc, const char **argv);
};
} // End of namespace Hopkins