aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2011-04-04 13:02:12 +0200
committerMax Horn2011-04-04 13:04:17 +0200
commit0725be325f60fa578b918aaaaef1d5f4008d310a (patch)
tree49bec8c1afdcadb4237c45284e9f013eede8a43f /engines
parent449e9cf33923f2685356596f82bc596e1f05407c (diff)
downloadscummvm-rg350-0725be325f60fa578b918aaaaef1d5f4008d310a.tar.gz
scummvm-rg350-0725be325f60fa578b918aaaaef1d5f4008d310a.tar.bz2
scummvm-rg350-0725be325f60fa578b918aaaaef1d5f4008d310a.zip
SCUMM: Extend workaround for bug #1668393 (see bug #3267665)
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/script_v5.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 9e245aa168..ee790f7876 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -530,11 +530,20 @@ void ScummEngine_v5::o5_actorOps() {
void ScummEngine_v5::o5_setClass() {
int obj = getVarOrDirectWord(PARAM_1);
- int newClass;
+ int cls;
while ((_opcode = fetchScriptByte()) != 0xFF) {
- newClass = getVarOrDirectWord(PARAM_1);
- if (newClass == 0) {
+ cls = getVarOrDirectWord(PARAM_1);
+
+ // WORKAROUND bug #1668393: Due to a script bug, the wrong opcode is
+ // used to test and set the state of various objects (e.g. the inside
+ // door (object 465) of the 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 &&
+ (cls == 0 || cls == 1)) {
+ putState(obj, cls);
+ } else if (cls == 0) {
// Class '0' means: clean all class data
_classData[obj] = 0;
if ((_game.features & GF_SMALL_HEADER) && obj <= _numActors) {
@@ -543,7 +552,7 @@ void ScummEngine_v5::o5_setClass() {
a->_forceClip = 0;
}
} else
- putClass(obj, newClass, (newClass & 0x80) ? true : false);
+ putClass(obj, cls, (cls & 0x80) ? true : false);
}
}
@@ -1148,9 +1157,10 @@ void ScummEngine_v5::o5_ifClassOfIs() {
while ((_opcode = fetchScriptByte()) != 0xFF) {
cls = getVarOrDirectWord(PARAM_1);
- // 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.
+ // WORKAROUND bug #1668393: Due to a script bug, the wrong opcode is
+ // used to test and set the state of various objects (e.g. the inside
+ // door (object 465) of the 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) {