diff options
author | Jonathan Gray | 2003-05-05 10:02:04 +0000 |
---|---|---|
committer | Jonathan Gray | 2003-05-05 10:02:04 +0000 |
commit | d12ff07ce21395d9510ce198d5f0daef35b04c42 (patch) | |
tree | d65c449e41c8eaf2f8b0d7d8f4bc9ec38cd5d570 /scumm/debugger.cpp | |
parent | 98d5dd518e5059389c16a59f4c5805b9d6f16a3e (diff) | |
download | scummvm-rg350-d12ff07ce21395d9510ce198d5f0daef35b04c42.tar.gz scummvm-rg350-d12ff07ce21395d9510ce198d5f0daef35b04c42.tar.bz2 scummvm-rg350-d12ff07ce21395d9510ce198d5f0daef35b04c42.zip |
patch #732518 loom learn drafts debugger command by erik
svn-id: r7342
Diffstat (limited to 'scumm/debugger.cpp')
-rw-r--r-- | scumm/debugger.cpp | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp index b128b394c9..babda06a6a 100644 --- a/scumm/debugger.cpp +++ b/scumm/debugger.cpp @@ -760,23 +760,42 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) { base = (_s->_gameId == GID_LOOM) ? 50 : 100; - // During the testing of EGA Loom we had some trouble with the drafts - // data structure being overwritten. I don't expect this command is - // particularly useful any more, but it will attempt to repair the - // (probably) static part of it. - - if (argc == 2 && strcmp(argv[1], "fix") == 0) { - for (i = 0; i < 16; i++) { - _s->_vars[base + 2 * i + 1] = odds[i]; + if (argc == 2) { + // We had to debug a problem at the end of the game that only + // happened if you interrupted the intro at a specific point. + // That made it useful with a command to learn all the drafts + // and notes. + + if (strcmp(argv[1], "learn") == 0) { + for (i = 0; i < 16; i++) + _s->_vars[base + 2 * i] |= 0x2000; + _s->_vars[base + 72] = 8; + + // In theory, we could run script 18 here to redraw + // the distaff, but I don't know if that's a safe + // thing to do. + + Debug_Printf("Learned all drafts and notes.\n"); + return true; + } + + // During the testing of EGA Loom we had some trouble with the + // drafts data structure being overwritten. I don't expect + // this command is particularly useful any more, but it will + // attempt to repair the (probably) static part of it. + + if (strcmp(argv[1], "fix") == 0) { + for (i = 0; i < 16; i++) + _s->_vars[base + 2 * i + 1] = odds[i]; + Debug_Printf( + "An attempt has been made to repair\n" + "the internal drafts data structure.\n" + "Continue on your own risk.\n"); + return true; } - Debug_Printf( - "An attempt has been made to repair\n" - "the internal drafts data structure.\n" - "Continue on your own risk.\n"); - return true; } - // More useful, list the drafts. + // Probably the most useful command for ordinary use: list the drafts. for (i = 0; i < 16; i++) { draft = _s->_vars[base + i * 2]; |