diff options
author | Paul Gilbert | 2010-02-13 11:45:54 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-02-13 11:45:54 +0000 |
commit | 1b877ceb5b207c4ad95b4323980eca5159656ff2 (patch) | |
tree | 96f8aa55452b23e7305647cc20afc4e623109536 | |
parent | e32497c54c1790cc9b3fffc638b43b6c52391f09 (diff) | |
download | scummvm-rg350-1b877ceb5b207c4ad95b4323980eca5159656ff2.tar.gz scummvm-rg350-1b877ceb5b207c4ad95b4323980eca5159656ff2.tar.bz2 scummvm-rg350-1b877ceb5b207c4ad95b4323980eca5159656ff2.zip |
Added command variation for dumping quotes and vocab
svn-id: r48038
-rw-r--r-- | engines/m4/console.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/engines/m4/console.cpp b/engines/m4/console.cpp index 25d568f8ac..e445b6e8d4 100644 --- a/engines/m4/console.cpp +++ b/engines/m4/console.cpp @@ -342,11 +342,23 @@ bool MadsConsole::cmdObject(int argc, const char **argv) { } bool MadsConsole::cmdMessage(int argc, const char **argv) { - VALIDATE_MADS; - - if (argc == 1) + if (argc == 1) { DebugPrintf("message 'objnum'\n"); - else { + } else if (!strcmp(argv[1], "list_quotes")) { + // Dump the quotes list + FILE *destFile = fopen("mads_quotes.txt", "wb"); + for (uint i = 0; i < _vm->globals()->getQuotesSize(); ++i) + fprintf(destFile, "%.3d - %s\n", i, _vm->globals()->getQuote(i)); + fclose(destFile); + + } else if (!strcmp(argv[1], "list_vocab")) { + // Dump the vocab list + FILE *destFile = fopen("mads_vocab.txt", "wb"); + for (uint i = 1; i <= _vm->globals()->getVocabSize(); ++i) + fprintf(destFile, "%.3d/%.3x - %s\n", i, i, _vm->globals()->getVocab(i)); + fclose(destFile); + + } else { int messageIdx = strToInt(argv[1]); if ((argc != 3) || (strcmp(argv[2], "idx") != 0)) |