[Scummvm-cvs-logs] scummvm master -> 38b2a8518ff080a6b321f6788af193327e0d0fed

eriktorbjorn eriktorbjorn at telia.com
Fri Nov 16 22:16:40 CET 2012


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8658d008d5 SCUMM: Remove obsolete part of the "drafts" debugger command
38b2a8518f SCUMM: Fix the "drafts" debugger command for Mac Loom


Commit: 8658d008d530eb89aef088d5317dd4d1af23899a
    https://github.com/scummvm/scummvm/commit/8658d008d530eb89aef088d5317dd4d1af23899a
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2012-11-16T12:30:56-08:00

Commit Message:
SCUMM: Remove obsolete part of the "drafts" debugger command

It was never quite clear exactly what "drafts fix" did. It wasn't
guaranteed to work on all versions of Loom - or at all - and I
haven't heard any reports about the data structure getting
corrupted for years.

Changed paths:
    engines/scumm/debugger.cpp



diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index dc5acbd..36fed2b 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -741,10 +741,6 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
 		"Silence",      "Shaping",       "Unmaking",
 		"Transcendence"
 	};
-	int odds[] = {
-		15162, 15676, 16190,    64, 16961, 17475, 17989, 18503,
-		   73, 19274,    76,    77, 20302, 20816, 21330,    84
-	};
 
 	const char *notes = "cdefgabC";
 	int i, base, draft;
@@ -801,28 +797,13 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
 			DebugPrintf("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++)
-				_vm->_scummVars[base + 2 * i + 1] = odds[i];
-			DebugPrintf(
-				"An attempt has been made to repair\n"
-				"the internal drafts data structure.\n"
-				"Continue on your own risk.\n");
-			return true;
-		}
 	}
 
 	// Probably the most useful command for ordinary use: list the drafts.
 
 	for (i = 0; i < 16; i++) {
 		draft = _vm->_scummVars[base + i * 2];
-		DebugPrintf("%d %-13s %c%c%c%c %c%c %5d %c\n",
+		DebugPrintf("%d %-13s %c%c%c%c %c%c\n",
 			base + 2 * i,
 			names[i],
 			notes[draft & 0x0007],
@@ -830,9 +811,7 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
 			notes[(draft & 0x01c0) >> 6],
 			notes[(draft & 0x0e00) >> 9],
 			(draft & 0x2000) ? 'K' : ' ',
-			(draft & 0x4000) ? 'U' : ' ',
-			_vm->_scummVars[base + 2 * i + 1],
-			(_vm->_scummVars[base + 2 * i + 1] != odds[i]) ? '!' : ' ');
+			(draft & 0x4000) ? 'U' : ' ');
 	}
 
 	return true;


Commit: 38b2a8518ff080a6b321f6788af193327e0d0fed
    https://github.com/scummvm/scummvm/commit/38b2a8518ff080a6b321f6788af193327e0d0fed
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2012-11-16T13:13:23-08:00

Commit Message:
SCUMM: Fix the "drafts" debugger command for Mac Loom

Mac Loom's drafts appear to be stored from variable 55 and upwards.
I'm working under the assumption that there's either only one
version of Loom for the Mac, or that they all behave the same. I
could be wrong about that.

Changed paths:
    engines/scumm/debugger.cpp



diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 36fed2b..9b6dd1e 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -750,9 +750,9 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
 		return true;
 	}
 
-	// There are 16 drafts, stored from variable 50 or 100 and upwards.
-	// Each draft occupies two variables. Even-numbered variables contain
-	// the notes for each draft, and a number of flags:
+	// There are 16 drafts, stored from variable 50, 55 or 100 and upwards.
+	// Each draft occupies two variables, the first of which contains the
+	// notes for the draft and a number of flags.
 	//
 	// +---+---+---+---+-----+-----+-----+-----+
 	// | A | B | C | D | 444 | 333 | 222 | 111 |
@@ -767,13 +767,16 @@ bool ScummDebugger::Cmd_PrintDraft(int argc, const char **argv) {
 	// 222 The second note
 	// 111 The first note
 	//
-	// I don't yet know what the odd-numbered variables are used for.
-	// Possibly they store information on where and/or how the draft can
-	// be used. They appear to remain constant throughout the game.
+	// I don't yet know what the second variable is used for. Possibly to
+	// store information on where and/or how the draft can be used. They
+	// appear to remain constant throughout the game.
 
 	if (_vm->_game.version == 4 || _vm->_game.platform == Common::kPlatformPCEngine) {
 		// DOS CD version / PC-Engine version
 		base = 100;
+	} else if (_vm->_game.platform == Common::kPlatformMacintosh) {
+		// Macintosh version
+		base = 55;
 	} else {
 		// All (?) other versions
 		base = 50;






More information about the Scummvm-git-logs mailing list