aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-02-12 09:52:13 +0000
committerTravis Howell2006-02-12 09:52:13 +0000
commit30c5480bd32782e4dbc4efcaca60bb42a9cb2b82 (patch)
tree25a2aa319a2fc673b5f8c61e63ed193cdc52416a
parent2873ae81867e7b78a1b334abf0a65910c867b5b0 (diff)
downloadscummvm-rg350-30c5480bd32782e4dbc4efcaca60bb42a9cb2b82.tar.gz
scummvm-rg350-30c5480bd32782e4dbc4efcaca60bb42a9cb2b82.tar.bz2
scummvm-rg350-30c5480bd32782e4dbc4efcaca60bb42a9cb2b82.zip
Actor room is only checked in SCUMM 7+
svn-id: r20597
-rw-r--r--engines/scumm/intern_he.h1
-rw-r--r--engines/scumm/script_v5.cpp2
-rw-r--r--engines/scumm/script_v6.cpp9
-rw-r--r--engines/scumm/script_v6he.cpp41
-rw-r--r--engines/scumm/script_v72he.cpp2
-rw-r--r--engines/scumm/script_v7he.cpp2
-rw-r--r--engines/scumm/script_v80he.cpp2
-rw-r--r--engines/scumm/script_v90he.cpp2
8 files changed, 13 insertions, 48 deletions
diff --git a/engines/scumm/intern_he.h b/engines/scumm/intern_he.h
index 26a9e0a40f..de10999fcd 100644
--- a/engines/scumm/intern_he.h
+++ b/engines/scumm/intern_he.h
@@ -75,7 +75,6 @@ protected:
void o60_setState();
void o60_roomOps();
void o60_actorOps();
- void o60_wait();
void o60_kernelSetFunctions();
void o60_kernelGetFunctions();
void o60_openFile();
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 7a048d0a01..917baa8930 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -2551,7 +2551,7 @@ void ScummEngine_v5::o5_wait() {
case 1: // SO_WAIT_FOR_ACTOR
{
Actor *a = derefActorSafe(getVarOrDirectByte(PARAM_1), "o5_wait");
- if (a && a->isInCurrentRoom() && a->_moving)
+ if (a && a->_moving)
break;
return;
}
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index 77709eed21..f28591d266 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -2192,8 +2192,13 @@ void ScummEngine_v6::o6_wait() {
offs = fetchScriptWordSigned();
actnum = pop();
a = derefActor(actnum, "o6_wait:168");
- if (a->isInCurrentRoom() && a->_moving)
- break;
+ if (_version >= 7) {
+ if (a->isInCurrentRoom() && a->_moving)
+ break;
+ } else {
+ if (a->_moving)
+ break;
+ }
return;
case 169: // SO_WAIT_FOR_MESSAGE Wait for message
if (VAR(VAR_HAVE_MSG))
diff --git a/engines/scumm/script_v6he.cpp b/engines/scumm/script_v6he.cpp
index ce3f76bc18..5c08a7e336 100644
--- a/engines/scumm/script_v6he.cpp
+++ b/engines/scumm/script_v6he.cpp
@@ -277,7 +277,7 @@ void ScummEngine_v60he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
- OPCODE(o60_wait),
+ OPCODE(o6_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorAnimCounter1),
/* AC */
@@ -737,45 +737,6 @@ void ScummEngine_v60he::o60_actorOps() {
}
}
-void ScummEngine_v60he::o60_wait() {
- int actnum;
- int offs = -2;
- Actor *a;
- byte subOp = fetchScriptByte();
-
- switch (subOp) {
- case 168: // SO_WAIT_FOR_ACTOR Wait for actor
- offs = fetchScriptWordSigned();
- actnum = pop();
- a = derefActor(actnum, "o60_wait:168");
- if (a->_moving)
- break;
- return;
- case 169: // SO_WAIT_FOR_MESSAGE Wait for message
- if (VAR(VAR_HAVE_MSG))
- break;
- return;
- case 170: // SO_WAIT_FOR_CAMERA Wait for camera
- if (camera._cur.x / 8 != camera._dest.x / 8)
- break;
- return;
- case 171: // SO_WAIT_FOR_SENTENCE
- if (_sentenceNum) {
- if (_sentence[_sentenceNum - 1].freezeCount && !isScriptInUse(VAR(VAR_SENTENCE_SCRIPT)))
- return;
- break;
- }
- if (!isScriptInUse(VAR(VAR_SENTENCE_SCRIPT)))
- return;
- break;
- default:
- error("o60_wait: default case 0x%x", subOp);
- }
-
- _scriptPointer += offs;
- o6_breakHere();
-}
-
void ScummEngine_v60he::o60_kernelSetFunctions() {
int args[29];
int num;
diff --git a/engines/scumm/script_v72he.cpp b/engines/scumm/script_v72he.cpp
index 021a74dcc3..0a10e5c22b 100644
--- a/engines/scumm/script_v72he.cpp
+++ b/engines/scumm/script_v72he.cpp
@@ -256,7 +256,7 @@ void ScummEngine_v72he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
- OPCODE(o60_wait),
+ OPCODE(o6_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorAnimCounter1),
/* AC */
diff --git a/engines/scumm/script_v7he.cpp b/engines/scumm/script_v7he.cpp
index f615266131..10644ba03d 100644
--- a/engines/scumm/script_v7he.cpp
+++ b/engines/scumm/script_v7he.cpp
@@ -253,7 +253,7 @@ void ScummEngine_v70he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
- OPCODE(o60_wait),
+ OPCODE(o6_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorAnimCounter1),
/* AC */
diff --git a/engines/scumm/script_v80he.cpp b/engines/scumm/script_v80he.cpp
index 307ab75d3f..517ce46650 100644
--- a/engines/scumm/script_v80he.cpp
+++ b/engines/scumm/script_v80he.cpp
@@ -255,7 +255,7 @@ void ScummEngine_v80he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
- OPCODE(o60_wait),
+ OPCODE(o6_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o6_getActorAnimCounter1),
/* AC */
diff --git a/engines/scumm/script_v90he.cpp b/engines/scumm/script_v90he.cpp
index 0536506534..5f01b5ac5d 100644
--- a/engines/scumm/script_v90he.cpp
+++ b/engines/scumm/script_v90he.cpp
@@ -253,7 +253,7 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o6_pop),
/* A8 */
OPCODE(o6_getActorWidth),
- OPCODE(o60_wait),
+ OPCODE(o6_wait),
OPCODE(o6_getActorScaleX),
OPCODE(o90_getActorAnimProgress),
/* AC */