aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2003-05-30 22:22:51 +0000
committerMax Horn2003-05-30 22:22:51 +0000
commit877ca1b8597a10e22808b65768b0fec7ee54be62 (patch)
tree735674806fbb4bf8e0201e968951ac42f3b722a5 /scumm
parent32b6333b744496ee6a47547aca1b02464cfa03dd (diff)
downloadscummvm-rg350-877ca1b8597a10e22808b65768b0fec7ee54be62.tar.gz
scummvm-rg350-877ca1b8597a10e22808b65768b0fec7ee54be62.tar.bz2
scummvm-rg350-877ca1b8597a10e22808b65768b0fec7ee54be62.zip
Workaround for bug #746349
svn-id: r8157
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v5.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 0be569f26a..e1901b5991 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -940,6 +940,15 @@ void Scumm_v5::o5_getActorMoving() {
void Scumm_v5::o5_getActorRoom() {
getResultPos();
int act = getVarOrDirectByte(0x80);
+ // FIXME: Workaround for bug #746349. This is a really odd bu
+ //in either the script or in our script engine. Might be a good
+ // idea to investigate this further by e.g. looking at the FOA
+ // engine a bit closer.
+ if (_gameId == GID_INDY4 && _roomResource == 94 && vm.slot[_currentScript].number == 206 && act > _numActors) {
+ setResult(0);
+ return;
+ }
+
Actor *a = derefActor(act, "o5_getActorRoom");
setResult(a->room);
}
@@ -1049,7 +1058,7 @@ void Scumm_v5::o5_getDist() {
o2 = getVarOrDirectWord(0x40);
r = getObjActToObjActDist(o1, o2);
- // FIXME: MI2 race workaround, see bug 597022
+ // FIXME: MI2 race workaround, see bug #597022
if (_gameId == GID_MONKEY2 && vm.slot[_currentScript].number == 40 && r < 60)
r = 60;
@@ -2011,20 +2020,13 @@ void Scumm_v5::o5_startObject() {
void Scumm_v5::o5_startScript() {
int op, script;
int data[16];
- int a, b;
op = _opcode;
script = getVarOrDirectByte(0x80);
getWordVararg(data);
- a = b = 0;
- if (op & 0x40)
- b = 1;
- if (op & 0x20)
- a = 1;
-
- runScript(script, a != 0, b != 0, data);
+ runScript(script, (op & 0x20) != 0, (op & 0x40) != 0, data);
}
void Scumm_v5::o5_stopObjectCode() {