[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.215,2.216

Travis Howell kirben at users.sourceforge.net
Wed Nov 26 00:54:03 CET 2003


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

Modified Files:
	script_v2.cpp 
Log Message:

This is how original version handled bypass.


Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.215
retrieving revision 2.216
diff -u -d -r2.215 -r2.216
--- script_v2.cpp	16 Nov 2003 20:52:56 -0000	2.215
+++ script_v2.cpp	26 Nov 2003 08:53:53 -0000	2.216
@@ -552,10 +552,6 @@
 
 }
 
-#ifndef BYPASS_COPY_PROT
-#define BYPASS_COPY_PROT
-#endif
-
 void ScummEngine_v2::o2_getBitVar() {
 	getResultPos();
 	int var = fetchScriptWord();
@@ -565,15 +561,7 @@
 	int bit_offset = bit_var & 0x0f;
 	bit_var >>= 4;
 
-#if defined(BYPASS_COPY_PROT)
-	// The Enchanced version of Zak McKracken included in the
-	// SelectWare Classic Collection bundle has no copy protection
-	// and doesn't include the codes.
-	if (_gameId == GID_ZAK && var == 1467) 
-		setResult(0);
-	else
-#endif
-		setResult((_scummVars[bit_var] & (1 << bit_offset)) ? 1 : 0);
+	setResult((_scummVars[bit_var] & (1 << bit_offset)) ? 1 : 0);
 }
 
 void ScummEngine_v2::ifStateCommon(byte type) {
@@ -1109,8 +1097,20 @@
 	a->putActor(x, y, a->room);
 }
 
+#ifndef BYPASS_COPY_PROT
+#define BYPASS_COPY_PROT
+#endif
+
 void ScummEngine_v2::o2_startScript() {
 	int script = getVarOrDirectByte(PARAM_1);
+
+#if defined(BYPASS_COPY_PROT)
+	// The Enchanced version of Zak McKracken included in the
+	// SelectWare Classic Collection bundle has no copy protection
+	// and doesn't include the codes.
+	if ((_gameId == GID_ZAK) && (script == 15) && (_roomResource == 45))
+		return;
+#endif
 	runScript(script, 0, 0, 0);
 }
 





More information about the Scummvm-git-logs mailing list