Skip to content

Commit

Permalink
HOPKINS: Add debugger command to change scene
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Mar 29, 2013
1 parent 1100216 commit a2c282b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions engines/hopkins/debugger.cpp
Expand Up @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions engines/hopkins/debugger.h
Expand Up @@ -39,6 +39,7 @@ class Debugger : public GUI::Debugger {
virtual ~Debugger() {}

bool cmd_DirtyRects(int argc, const char **argv);
bool cmd_Teleport(int argc, const char **argv);
};

} // End of namespace Hopkins
Expand Down

0 comments on commit a2c282b

Please sign in to comment.