diff options
author | Strangerke | 2014-04-05 23:36:10 +0200 |
---|---|---|
committer | Strangerke | 2014-04-05 23:36:10 +0200 |
commit | 88dcc7e0d64d3cc1c0963d90dcaad7ea112420df (patch) | |
tree | 5c723afa6d3e8705beea9ed98c92fd67474ec5f4 | |
parent | 0b9c802bf0095568d71db5d10b3b6dbe075934fb (diff) | |
download | scummvm-rg350-88dcc7e0d64d3cc1c0963d90dcaad7ea112420df.tar.gz scummvm-rg350-88dcc7e0d64d3cc1c0963d90dcaad7ea112420df.tar.bz2 scummvm-rg350-88dcc7e0d64d3cc1c0963d90dcaad7ea112420df.zip |
MADS: Add debugger command to display quotes
-rw-r--r-- | engines/mads/debugger.cpp | 10 | ||||
-rw-r--r-- | engines/mads/debugger.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/mads/debugger.cpp b/engines/mads/debugger.cpp index 58bf8388e4..276340f240 100644 --- a/engines/mads/debugger.cpp +++ b/engines/mads/debugger.cpp @@ -37,6 +37,7 @@ Debugger::Debugger(MADSEngine *vm) : GUI::Debugger(), _vm(vm) { DCmd_Register("play_sound", WRAP_METHOD(Debugger, Cmd_PlaySound)); DCmd_Register("show_codes", WRAP_METHOD(Debugger, Cmd_ShowCodes)); DCmd_Register("dump_file", WRAP_METHOD(Debugger, Cmd_DumpFile)); + DCmd_Register("show_quote", WRAP_METHOD(Debugger, Cmd_ShowQuote)); } static int strToInt(const char *s) { @@ -168,4 +169,13 @@ bool Debugger::Cmd_DumpFile(int argc, const char **argv) { return true; } +bool Debugger::Cmd_ShowQuote(int argc, const char **argv) { + if (argc != 2) + DebugPrintf("Usage: %s <quote number>\n", argv[0]); + else + DebugPrintf("%s", _vm->_game->getQuote(strToInt(argv[1])).c_str()); + + return true; +} + } // End of namespace MADS diff --git a/engines/mads/debugger.h b/engines/mads/debugger.h index de450b1446..b2b0949923 100644 --- a/engines/mads/debugger.h +++ b/engines/mads/debugger.h @@ -41,6 +41,7 @@ protected: bool Cmd_PlaySound(int argc, const char **argv); bool Cmd_ShowCodes(int argc, const char **argv); bool Cmd_DumpFile(int argc, const char **argv); + bool Cmd_ShowQuote(int argc, const char **argv); public: bool _showMousePos; public: |