aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v2.cpp
diff options
context:
space:
mode:
authorTravis Howell2003-11-26 08:53:53 +0000
committerTravis Howell2003-11-26 08:53:53 +0000
commit4b797730cdd5deb70334f0dafe98f8a3fda7251f (patch)
treeba961f5f8f0118c2a5b65d5bbef76540a208bcb9 /scumm/script_v2.cpp
parentf1a8b7841847a62a8b31d161c52eeda398620016 (diff)
downloadscummvm-rg350-4b797730cdd5deb70334f0dafe98f8a3fda7251f.tar.gz
scummvm-rg350-4b797730cdd5deb70334f0dafe98f8a3fda7251f.tar.bz2
scummvm-rg350-4b797730cdd5deb70334f0dafe98f8a3fda7251f.zip
This is how original version handled bypass.
svn-id: r11368
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r--scumm/script_v2.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp
index fcb1ec7002..6709fe6e72 100644
--- a/scumm/script_v2.cpp
+++ b/scumm/script_v2.cpp
@@ -552,10 +552,6 @@ void ScummEngine_v2::o2_setBitVar() {
}
-#ifndef BYPASS_COPY_PROT
-#define BYPASS_COPY_PROT
-#endif
-
void ScummEngine_v2::o2_getBitVar() {
getResultPos();
int var = fetchScriptWord();
@@ -565,15 +561,7 @@ void ScummEngine_v2::o2_getBitVar() {
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 @@ void ScummEngine_v2::o2_putActor() {
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);
}