mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 09:56:30 +00:00
Added command variation for dumping quotes and vocab
svn-id: r48038
This commit is contained in:
parent
e32497c54c
commit
1b877ceb5b
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user