[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.212,2.213

Travis Howell kirben at users.sourceforge.net
Fri Nov 14 03:27:05 CET 2003


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

Modified Files:
	script_v2.cpp 
Log Message:

Another try at zak copy protection bypass.


Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.212
retrieving revision 2.213
diff -u -d -r2.212 -r2.213
--- script_v2.cpp	10 Nov 2003 09:16:41 -0000	2.212
+++ script_v2.cpp	14 Nov 2003 11:26:18 -0000	2.213
@@ -548,6 +548,10 @@
 
 }
 
+#ifndef BYPASS_COPY_PROT
+#define BYPASS_COPY_PROT
+#endif
+
 void ScummEngine_v2::o2_getBitVar() {
 	getResultPos();
 	int var = fetchScriptWord();
@@ -557,7 +561,15 @@
 	int bit_offset = bit_var & 0x0f;
 	bit_var >>= 4;
 
-	setResult((_scummVars[bit_var] & (1 << bit_offset)) ? 1 : 0);
+#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);
 }
 
 void ScummEngine_v2::ifStateCommon(byte type) {





More information about the Scummvm-git-logs mailing list