aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorTravis Howell2003-11-14 11:26:18 +0000
committerTravis Howell2003-11-14 11:26:18 +0000
commit183b82262954055c9ace945cb055965261a9793d (patch)
tree09ac8950dbf7801b48fa44b67b97a47d76121ccb /scumm
parent2658021292926056029e993b308c16c2b4afadbc (diff)
downloadscummvm-rg350-183b82262954055c9ace945cb055965261a9793d.tar.gz
scummvm-rg350-183b82262954055c9ace945cb055965261a9793d.tar.bz2
scummvm-rg350-183b82262954055c9ace945cb055965261a9793d.zip
Another try at zak copy protection bypass.
svn-id: r11295
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v2.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index 650a80c5b2..fd4ddc2446 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -548,6 +548,10 @@ void ScummEngine_v2::o2_setBitVar() {
}
+#ifndef BYPASS_COPY_PROT
+#define BYPASS_COPY_PROT
+#endif
+
void ScummEngine_v2::o2_getBitVar() {
getResultPos();
int var = fetchScriptWord();
@@ -557,7 +561,15 @@ void ScummEngine_v2::o2_getBitVar() {
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) {