[Scummvm-cvs-logs] CVS: scummvm/scumm debugger.cpp,1.30,1.31

Jonathan Gray khalek at users.sourceforge.net
Mon May 5 03:03:02 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv15109

Modified Files:
	debugger.cpp 
Log Message:
patch #732518 loom learn drafts debugger command by erik

Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/debugger.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- debugger.cpp	3 May 2003 21:49:19 -0000	1.30
+++ debugger.cpp	5 May 2003 10:02:04 -0000	1.31
@@ -760,23 +760,42 @@
 
 	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) {
+		// 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 (argc == 2 && strcmp(argv[1], "fix") == 0) {
-		for (i = 0; i < 16; i++) {
-			_s->_vars[base + 2 * i + 1] = odds[i];
+		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];





More information about the Scummvm-git-logs mailing list