aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-05-11 17:49:42 +0000
committerJames Brown2002-05-11 17:49:42 +0000
commit572829b212a1d53dcddf58df12379cdc585b1095 (patch)
tree70c091e66f46c941b0be2cb185e2e8d5c0c45263
parentc2b26a45907040bdbd717e05b52d18d293db7f75 (diff)
downloadscummvm-rg350-572829b212a1d53dcddf58df12379cdc585b1095.tar.gz
scummvm-rg350-572829b212a1d53dcddf58df12379cdc585b1095.tar.bz2
scummvm-rg350-572829b212a1d53dcddf58df12379cdc585b1095.zip
Zak walkbox locking fixes.
svn-id: r4278
-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;
}