aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorTorbjörn Andersson2017-11-26 11:13:08 +0100
committerDavid Turner2018-01-14 15:34:16 +0000
commitc7b8bc81691f845bb379aa5e97729c0fe9096850 (patch)
tree1419eb642487322267f33907746641880c8c1509 /engines/zvision
parent1eeafb4e30f9ccc92ece32b7078841ff94b3c7fb (diff)
downloadscummvm-rg350-c7b8bc81691f845bb379aa5e97729c0fe9096850.tar.gz
scummvm-rg350-c7b8bc81691f845bb379aa5e97729c0fe9096850.tar.bz2
scummvm-rg350-c7b8bc81691f845bb379aa5e97729c0fe9096850.zip
ZVISION: Workaround for bug #6770
Explicitly check if the time tunnel is open (and therefore shown in close-up) before executing the scripts that draw the lever that is shown in the normal view. This apparently doesn't happen in the original engine, which suggests there may be a ScummVM bug. But it still doesn't seem like the *wrong* thing to do here.
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/scripting/scr_file_handling.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/zvision/scripting/scr_file_handling.cpp b/engines/zvision/scripting/scr_file_handling.cpp
index a8344ad5f4..cfbde110ad 100644
--- a/engines/zvision/scripting/scr_file_handling.cpp
+++ b/engines/zvision/scripting/scr_file_handling.cpp
@@ -141,6 +141,24 @@ bool ScriptManager::parseCriteria(Common::SeekableReadStream &stream, Common::Li
criteriaList.back().push_back(entry);
}
+ // WORKAROUND for a script bug in Zork: Grand Inquisitor, room me2j
+ // (Closing the Time Tunnels). When the time tunnel is open the game
+ // shows a close-up of only the tunnel, instead of showing the entire
+ // booth. However, the scripts that draw the lever in its correct
+ // state do not test this flag, causing it to be drawn when it should
+ // not be. This bug does not happen in the original game, suggesting
+ // a ScummVM bug. But I'm not aware of any other such glitches, and it
+ // still seems like a correct way of working around bug #6770.
+ if (_engine->getGameId() == GID_GRANDINQUISITOR && key == 9536) {
+ Puzzle::CriteriaEntry entry;
+ entry.key = 9404; // me2j_time_tunnel_open
+ entry.criteriaOperator = Puzzle::EQUAL_TO;
+ entry.argumentIsAKey = false;
+ entry.argument = 0;
+
+ criteriaList.back().push_back(entry);
+ }
+
while (!stream.eos() && !line.contains('}')) {
Puzzle::CriteriaEntry entry;