aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--object.cpp6
-rw-r--r--script_v1.cpp11
2 files changed, 13 insertions, 4 deletions
diff --git a/object.cpp b/object.cpp
index c3d7c001e3..ae8982953a 100644
--- a/object.cpp
+++ b/object.cpp
@@ -31,6 +31,9 @@ bool Scumm::getClass(int obj, int cls)
checkRange(32, 1, cls, "Class %d out of range in getClass");
if (_features & GF_SMALL_HEADER) {
+ if (cls == 31) // CLASS_PLAYERONLY
+ cls = 23;
+
if (cls == 32) // CLASS_TOUCHABLE
cls = 24;
}
@@ -46,6 +49,9 @@ void Scumm::putClass(int obj, int cls, bool set)
if (_features & GF_SMALL_HEADER) {
+ if (cls == 31) // CLASS_PLAYERONLY
+ cls = 23;
+
if (cls == 32) // CLASS_TOUCHABLE
cls = 24;
}
diff --git a/script_v1.cpp b/script_v1.cpp
index 90e26b8117..f66a9000f7 100644
--- a/script_v1.cpp
+++ b/script_v1.cpp
@@ -1644,10 +1644,13 @@ void Scumm::o5_matrixOps()
if (_features & GF_OLD256) {
a = getVarOrDirectByte(0x80);
b = fetchScriptByte();
- if (b == 0x40) // Lock Box
- setBoxFlags(a, 0x80);
- else
- setBoxFlags(a, 0);
+
+ if (b & 0x40) { // We don't use the locked
+ b &= ~0x40; // flag, so convert it to
+ b |= 0x80; // invisible
+ }
+
+ setBoxFlags(a, b);
return;
}