[Scummvm-cvs-logs] SF.net SVN: scummvm:[48038] scummvm/trunk/engines/m4/console.cpp
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sat Feb 13 12:45:54 CET 2010
Revision: 48038
http://scummvm.svn.sourceforge.net/scummvm/?rev=48038&view=rev
Author: dreammaster
Date: 2010-02-13 11:45:54 +0000 (Sat, 13 Feb 2010)
Log Message:
-----------
Added command variation for dumping quotes and vocab
Modified Paths:
--------------
scummvm/trunk/engines/m4/console.cpp
Modified: scummvm/trunk/engines/m4/console.cpp
===================================================================
--- scummvm/trunk/engines/m4/console.cpp 2010-02-12 21:15:30 UTC (rev 48037)
+++ scummvm/trunk/engines/m4/console.cpp 2010-02-13 11:45:54 UTC (rev 48038)
@@ -342,11 +342,23 @@
}
bool MadsConsole::cmdMessage(int argc, const char **argv) {
- VALIDATE_MADS;
+ if (argc == 1) {
+ DebugPrintf("message 'objnum'\n");
+ } 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);
- if (argc == 1)
- DebugPrintf("message 'objnum'\n");
- else {
+ } 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))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list