diff options
author | James Brown | 2002-12-20 13:50:24 +0000 |
---|---|---|
committer | James Brown | 2002-12-20 13:50:24 +0000 |
commit | 4e373ef467187a66edccc05daadeb0e83a09f0e7 (patch) | |
tree | d4dea4a0edfb45a22c663264d431023263ea5e20 | |
parent | 799da2baeff6dc35990bfbf85fa4531c1b3bc8ed (diff) | |
download | scummvm-rg350-4e373ef467187a66edccc05daadeb0e83a09f0e7.tar.gz scummvm-rg350-4e373ef467187a66edccc05daadeb0e83a09f0e7.tar.bz2 scummvm-rg350-4e373ef467187a66edccc05daadeb0e83a09f0e7.zip |
Add room command to debugger
svn-id: r6029
-rw-r--r-- | scumm/debugger.cpp | 14 | ||||
-rw-r--r-- | scumm/debugger.h | 5 |
2 files changed, 15 insertions, 4 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp index bbb927b616..7c50c9a659 100644 --- a/scumm/debugger.cpp +++ b/scumm/debugger.cpp @@ -53,6 +53,7 @@ void ScummDebugger::attach(Scumm *s) if (_dcmd_count < 1) { // We need to register our commands DCmd_Register("exit", &ScummDebugger::Cmd_Exit); DCmd_Register("quit", &ScummDebugger::Cmd_Exit); + DCmd_Register("room", &ScummDebugger::Cmd_Room); } } @@ -160,7 +161,7 @@ bool ScummDebugger::RunCommand(char *input) { DebugProc cmd; cmd = _dcmds[i].function; - return (this->*cmd)(); + return (this->*cmd)(parm); } } @@ -245,7 +246,16 @@ bool ScummDebugger::RunCommand(char *input) { } // Commands -bool ScummDebugger::Cmd_Exit() { +bool ScummDebugger::Cmd_Exit(char _parameter[255][255]) { _detach_now = true; return false; } + +bool ScummDebugger::Cmd_Room(char _parameter[255][255]) { + int room = atoi(_parameter[1]); + _s->_actors[_s->_vars[_s->VAR_EGO]].room = room; + _s->startScene(room, 0, 0); + _s->_fullRedraw = 1; + + return true; +} diff --git a/scumm/debugger.h b/scumm/debugger.h index 3c80fe4699..b3972ed2b4 100644 --- a/scumm/debugger.h +++ b/scumm/debugger.h @@ -26,7 +26,7 @@ class Scumm; class ScummDebugger; -typedef bool (ScummDebugger::*DebugProc)(); +typedef bool (ScummDebugger::*DebugProc)(char parm[255][255]); enum { DVAR_INT, @@ -68,7 +68,8 @@ protected: bool RunCommand(char *input); // Commands - bool Cmd_Exit(); + bool Cmd_Exit(char _parameter[255][255]); + bool Cmd_Room(char _parameter[255][255]); #ifdef USE_CONSOLE static bool ScummDebugger::debuggerInputCallback(ConsoleDialog *console, const char *input, void *refCon); |