763 | | // During the testing of EGA Loom we had some trouble with the drafts |
764 | | // data structure being overwritten. I don't expect this command is |
765 | | // particularly useful any more, but it will attempt to repair the |
766 | | // (probably) static part of it. |
767 | | |
768 | | if (argc == 2 && strcmp(argv[1], "fix") == 0) { |
769 | | for (i = 0; i < 16; i++) { |
770 | | _s->_vars[base + 2 * i + 1] = odds[i]; |
| 763 | if (argc == 2) { |
| 764 | // We had to debug a problem at the end of the game that only |
| 765 | // happened if you interrupted the intro at a specific point. |
| 766 | // That made it useful with a command to learn all the drafts |
| 767 | // and notes. |
| 768 | |
| 769 | if (strcmp(argv[1], "learn") == 0) { |
| 770 | for (i = 0; i < 16; i++) |
| 771 | _s->_vars[base + 2 * i] |= 0x2000; |
| 772 | _s->_vars[base + 72] = 8; |
| 773 | |
| 774 | // In theory, we could run script 18 here to redraw |
| 775 | // the distaff, but I don't know if that's a safe |
| 776 | // thing to do. |
| 777 | |
| 778 | Debug_Printf("Learned all drafts and notes.\n"); |
| 779 | return true; |
| 780 | } |
| 781 | |
| 782 | // During the testing of EGA Loom we had some trouble with the |
| 783 | // drafts data structure being overwritten. I don't expect |
| 784 | // this command is particularly useful any more, but it will |
| 785 | // attempt to repair the (probably) static part of it. |
| 786 | |
| 787 | if (strcmp(argv[1], "fix") == 0) { |
| 788 | for (i = 0; i < 16; i++) |
| 789 | _s->_vars[base + 2 * i + 1] = odds[i]; |
| 790 | Debug_Printf( |
| 791 | "An attempt has been made to repair\n" |
| 792 | "the internal drafts data structure.\n" |
| 793 | "Continue on your own risk.\n"); |
| 794 | return true; |