aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/script_v2.cpp16
-rw-r--r--engines/scumm/script_v3.cpp11
-rw-r--r--engines/scumm/script_v5.cpp8
-rw-r--r--engines/scumm/scumm_v2.h1
-rw-r--r--engines/scumm/scumm_v3.h3
5 files changed, 18 insertions, 21 deletions
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index fcb3878eb4..5a7a3f138a 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -98,7 +98,7 @@ void ScummEngine_v2::setupOpcodes() {
OPCODE(0x2e, o2_delay);
OPCODE(0x2f, o2_ifNotState04);
/* 30 */
- OPCODE(0x30, o2_setBoxFlags);
+ OPCODE(0x30, o3_setBoxFlags);
OPCODE(0x31, o2_getBitVar);
OPCODE(0x32, o2_setCameraAt);
OPCODE(0x33, o2_roomOps);
@@ -258,7 +258,7 @@ void ScummEngine_v2::setupOpcodes() {
OPCODE(0xae, o2_waitForMessage);
OPCODE(0xaf, o2_ifNotState04);
/* B0 */
- OPCODE(0xb0, o2_setBoxFlags);
+ OPCODE(0xb0, o3_setBoxFlags);
OPCODE(0xb1, o2_getBitVar);
OPCODE(0xb2, o2_setCameraAt);
OPCODE(0xb3, o2_roomOps);
@@ -1404,14 +1404,6 @@ void ScummEngine_v2::o2_delay() {
o5_breakHere();
}
-void ScummEngine_v2::o2_setBoxFlags() {
- int a, b;
-
- a = getVarOrDirectByte(PARAM_1);
- b = fetchScriptByte();
- setBoxFlags(a, b);
-}
-
void ScummEngine_v2::o2_setCameraAt() {
setCameraAtEx(getVarOrDirectByte(PARAM_1) * V12_X_MULTIPLIER);
}
@@ -1595,8 +1587,8 @@ void ScummEngine_v2::o2_getActorWalkBox() {
}
void ScummEngine_v2::o2_dummy() {
- // Opcode 238 is used in maniac and zak but has no purpose
- if (_opcode != 238)
+ // Opcode 0xEE is used in maniac and zak but has no purpose
+ if (_opcode != 0xEE)
warning("o2_dummy invoked (opcode %d)", _opcode);
}
diff --git a/engines/scumm/script_v3.cpp b/engines/scumm/script_v3.cpp
index 73f0002ee6..e171dd9eb3 100644
--- a/engines/scumm/script_v3.cpp
+++ b/engines/scumm/script_v3.cpp
@@ -31,6 +31,17 @@ namespace Scumm {
void ScummEngine_v3::setupOpcodes() {
ScummEngine_v4::setupOpcodes();
+
+ OPCODE(0x30, o3_setBoxFlags);
+ OPCODE(0xb0, o3_setBoxFlags);
+}
+
+void ScummEngine_v3::o3_setBoxFlags() {
+ int a, b;
+
+ a = getVarOrDirectByte(PARAM_1);
+ b = fetchScriptByte();
+ setBoxFlags(a, b);
}
} // End of namespace Scumm
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 957543a257..cbf2650976 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -23,7 +23,6 @@
*
*/
-
#include "scumm/actor.h"
#include "scumm/charset.h"
#include "scumm/object.h"
@@ -1682,13 +1681,6 @@ void ScummEngine_v5::o5_loadRoomWithEgo() {
void ScummEngine_v5::o5_matrixOps() {
int a, b;
- if (_game.version == 3) {
- a = getVarOrDirectByte(PARAM_1);
- b = fetchScriptByte();
- setBoxFlags(a, b);
- return;
- }
-
_opcode = fetchScriptByte();
switch (_opcode & 0x1F) {
case 1:
diff --git a/engines/scumm/scumm_v2.h b/engines/scumm/scumm_v2.h
index 5a29ecee88..e40d6dc40f 100644
--- a/engines/scumm/scumm_v2.h
+++ b/engines/scumm/scumm_v2.h
@@ -143,7 +143,6 @@ protected:
void o2_isLessEqual();
void o2_lights();
void o2_loadRoomWithEgo();
- void o2_setBoxFlags();
void o2_panCameraTo();
void o2_pickupObject();
void o2_putActor();
diff --git a/engines/scumm/scumm_v3.h b/engines/scumm/scumm_v3.h
index a9b8428a57..87d92216a7 100644
--- a/engines/scumm/scumm_v3.h
+++ b/engines/scumm/scumm_v3.h
@@ -62,6 +62,9 @@ protected:
virtual void loadCharset(int no);
virtual void processKeyboard(Common::KeyState lastKeyHit);
+
+ /* Version 3 script opcodes */
+ void o3_setBoxFlags();
};
/**