diff options
author | Filippos Karapetis | 2012-11-06 20:44:09 +0200 |
---|---|---|
committer | Filippos Karapetis | 2012-11-06 20:44:09 +0200 |
commit | 05ff55e162821a2717a4bf5975787ed6710c8100 (patch) | |
tree | 3f6a818a95b16466771f54fa9582009178909107 | |
parent | 023f6f10c7c88a118788503e6188b44c5fce2ce5 (diff) | |
download | scummvm-rg350-05ff55e162821a2717a4bf5975787ed6710c8100.tar.gz scummvm-rg350-05ff55e162821a2717a4bf5975787ed6710c8100.tar.bz2 scummvm-rg350-05ff55e162821a2717a4bf5975787ed6710c8100.zip |
AGI: Some cleanup of the debug console
- Merge the two different room debug commands in Mickey
- Remove the "crc" stub console command
-rw-r--r-- | engines/agi/console.cpp | 22 | ||||
-rw-r--r-- | engines/agi/console.h | 4 |
2 files changed, 6 insertions, 20 deletions
diff --git a/engines/agi/console.cpp b/engines/agi/console.cpp index dd06736290..b9a64bc572 100644 --- a/engines/agi/console.cpp +++ b/engines/agi/console.cpp @@ -35,7 +35,6 @@ Console::Console(AgiEngine *vm) : GUI::Debugger() { DCmd_Register("debug", WRAP_METHOD(Console, Cmd_Debug)); DCmd_Register("cont", WRAP_METHOD(Console, Cmd_Cont)); DCmd_Register("agiver", WRAP_METHOD(Console, Cmd_Agiver)); - DCmd_Register("crc", WRAP_METHOD(Console, Cmd_Crc)); DCmd_Register("flags", WRAP_METHOD(Console, Cmd_Flags)); DCmd_Register("logic0", WRAP_METHOD(Console, Cmd_Logic0)); DCmd_Register("objs", WRAP_METHOD(Console, Cmd_Objs)); @@ -119,12 +118,6 @@ bool Console::Cmd_RunOpcode(int argc, const char **argv) { return true; } -bool Console::Cmd_Crc(int argc, const char **argv) { - DebugPrintf("command removed from scummvm\n"); - - return true; -} - bool Console::Cmd_Agiver(int argc, const char **argv) { int ver, maj, min; @@ -278,22 +271,17 @@ bool Console::Cmd_BT(int argc, const char **argv) { MickeyConsole::MickeyConsole(MickeyEngine *mickey) : GUI::Debugger() { _mickey = mickey; - DCmd_Register("curRoom", WRAP_METHOD(MickeyConsole, Cmd_CurRoom)); - DCmd_Register("gotoRoom", WRAP_METHOD(MickeyConsole, Cmd_GotoRoom)); + DCmd_Register("room", WRAP_METHOD(MickeyConsole, Cmd_Room)); DCmd_Register("drawPic", WRAP_METHOD(MickeyConsole, Cmd_DrawPic)); DCmd_Register("drawObj", WRAP_METHOD(MickeyConsole, Cmd_DrawObj)); } -bool MickeyConsole::Cmd_CurRoom(int argc, const char **argv) { +bool MickeyConsole::Cmd_Room(int argc, const char **argv) { + if (argc == 2) + _mickey->debugGotoRoom(atoi(argv[1])); + _mickey->debugCurRoom(); - return true; -} -bool MickeyConsole::Cmd_GotoRoom(int argc, const char **argv) { - if (argc != 2) - DebugPrintf("Usage: %s <Room number>\n", argv[0]); - else - _mickey->debugGotoRoom(atoi(argv[1])); return true; } diff --git a/engines/agi/console.h b/engines/agi/console.h index 5f69460907..f8025e0562 100644 --- a/engines/agi/console.h +++ b/engines/agi/console.h @@ -49,7 +49,6 @@ private: bool Cmd_SetFlag(int argc, const char **argv); bool Cmd_SetObj(int argc, const char **argv); bool Cmd_RunOpcode(int argc, const char **argv); - bool Cmd_Crc(int argc, const char **argv); bool Cmd_Agiver(int argc, const char **argv); bool Cmd_Flags(int argc, const char **argv); bool Cmd_Vars(int argc, const char **argv); @@ -75,8 +74,7 @@ public: private: MickeyEngine *_mickey; - bool Cmd_CurRoom(int argc, const char **argv); - bool Cmd_GotoRoom(int argc, const char **argv); + bool Cmd_Room(int argc, const char **argv); bool Cmd_DrawPic(int argc, const char **argv); bool Cmd_DrawObj(int argc, const char **argv); }; |