From 572829b212a1d53dcddf58df12379cdc585b1095 Mon Sep 17 00:00:00 2001 From: James Brown Date: Sat, 11 May 2002 17:49:42 +0000 Subject: Zak walkbox locking fixes. svn-id: r4278 --- object.cpp | 6 ++++++ script_v1.cpp | 11 +++++++---- 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; } -- cgit v1.2.3