aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2009-07-18 13:39:21 +0000
committerTravis Howell2009-07-18 13:39:21 +0000
commit1d40f7849965e8b758b88197820daf9c6af4d120 (patch)
tree93a33bf76819390f8fb6ac949b904c14f7c2f110
parentd9c2544a4c5ad3127c7c5046375d342a349489eb (diff)
downloadscummvm-rg350-1d40f7849965e8b758b88197820daf9c6af4d120.tar.gz
scummvm-rg350-1d40f7849965e8b758b88197820daf9c6af4d120.tar.bz2
scummvm-rg350-1d40f7849965e8b758b88197820daf9c6af4d120.zip
Add workaround for bug #1668393 - ZAK FM-TOWNS: Crash when entering Hostel from outside.
svn-id: r42590
-rw-r--r--engines/scumm/script_v5.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 1ce38fd800..00dec269bd 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1138,9 +1138,19 @@ void ScummEngine_v5::o5_ifClassOfIs() {
while ((_opcode = fetchScriptByte()) != 0xFF) {
cls = getVarOrDirectWord(PARAM_1);
- b = getClass(obj, cls);
- if (((cls & 0x80) && !b) || (!(cls & 0x80) && b))
- cond = false;
+
+ // WORKAROUND bug #1668393: Due to a script bug, the wrong opcode is used
+ // to check the state of the inside door (object 465) of the Hostel on Mars,
+ // when opening the Hostel door from the outside.
+ if (_game.id == GID_ZAK && _game.platform == Common::kPlatformFMTowns &&
+ vm.slot[_currentScript].number == 205 && _currentRoom == 185 &&
+ obj == 465 && cls == 0) {
+ cond = (getState(obj) == 0);
+ } else {
+ b = getClass(obj, cls);
+ if (((cls & 0x80) && !b) || (!(cls & 0x80) && b))
+ cond = false;
+ }
}
jumpRelative(cond);
}