[Scummvm-cvs-logs] CVS: scummvm/scumm script.cpp,1.115,1.116

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Mon Jun 16 04:38:02 CEST 2003


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

Modified Files:
	script.cpp 
Log Message:
After some consideration, I've reverted to the old Loom bypassing scheme
since I now believe that the variable is used to indicate that the game is
running in "demo" mode. This way, old savegames will still work.

The new bypassing scheme is still in the file, but commented out. If this
works, we can remove it completely later.


Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- script.cpp	16 Jun 2003 06:18:30 -0000	1.115
+++ script.cpp	16 Jun 2003 11:37:08 -0000	1.116
@@ -130,11 +130,11 @@
 			vm.localvar[slot][i] = vars[i];
 	}
 
-#if defined(BYPASS_COPY_PROT)
+#if defined(BYPASS_COPY_PROT) && 0
 	// Loom will set bit 15 of variable 214 to 1 if the user enters the
 	// wrong code. But this bit is also used later in the game to determine
 	// if the user has already learned the fourth note. Therefore any
-	// interfering directly with this variable is risky.
+	// interfering directly with this variable may be risky.
 	//
 	// Let's try an alternative solution instead. The correct code is
 	// stored in variables 82-85. Each time the user selects a symbol,
@@ -146,6 +146,11 @@
 	// regardless of the player's choice. I don't know why, but it does
 	// mean that it's safer to change local variable 0 than to change
 	// variables 82-85.
+	//
+	// Update: It has since occured to me that bit 15 could be set to
+	// indicate that the game is running in "demo" mode. In that case, this
+	// bypassing mechanism is needlessly complicated after all, and we
+	// could just make every read of that bit return zero.
 	if (_gameId == GID_LOOM && _currentRoom == 69 && vm.slot[slot].number == 203)
 		vm.localvar[slot][0] = _scummVars[81 + _scummVars[98]];
 #endif
@@ -509,8 +514,11 @@
 			var = (var >> 4) & 0xFF;
 
 #if defined(BYPASS_COPY_PROT)
-			// INDY3 checks this during the game...
+			// INDY3, EGA Loom and, apparently, Zak256 check this
+			// during the game...
 			if (_gameId == GID_INDY3 && var == 94 && bit == 4) {
+				return 0;
+			} else if (_gameId == GID_LOOM && var == 214 && bit == 15) {
 				return 0;
 			} else if (_gameId == GID_ZAK256 && var == 151 && bit == 8) {
 				return 0;





More information about the Scummvm-git-logs mailing list