aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/debugger.cpp
diff options
context:
space:
mode:
authorStrangerke2014-04-05 23:36:10 +0200
committerStrangerke2014-04-05 23:36:10 +0200
commit88dcc7e0d64d3cc1c0963d90dcaad7ea112420df (patch)
tree5c723afa6d3e8705beea9ed98c92fd67474ec5f4 /engines/mads/debugger.cpp
parent0b9c802bf0095568d71db5d10b3b6dbe075934fb (diff)
downloadscummvm-rg350-88dcc7e0d64d3cc1c0963d90dcaad7ea112420df.tar.gz
scummvm-rg350-88dcc7e0d64d3cc1c0963d90dcaad7ea112420df.tar.bz2
scummvm-rg350-88dcc7e0d64d3cc1c0963d90dcaad7ea112420df.zip
MADS: Add debugger command to display quotes
Diffstat (limited to 'engines/mads/debugger.cpp')
-rw-r--r--engines/mads/debugger.cpp10
1 files changed, 10 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