diff options
-rw-r--r-- | engines/scumm/actor.cpp | 9 | ||||
-rw-r--r-- | engines/scumm/boxes.cpp | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 844192588f..25ce3f5007 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -691,6 +691,7 @@ void Actor_v3::walkActor() { int Actor::remapDirection(int dir, bool is_walking) { int specdir; byte flags; + byte mask; bool flipX; bool flipY; @@ -769,6 +770,14 @@ int Actor::remapDirection(int dir, bool is_walking) { case 6: return 180; } + + // MM C64 stores flags as a part of the mask + if (_vm->_game.version == 0) { + mask = _vm->getMaskFromBox(_walkbox); + // face the wall if climbing/descending a ladder + if ((mask & 0x8C) == 0x84) + return 0; + } } // OR 1024 in to signal direction interpolation should be done return normalizeAngle(dir) | 1024; diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp index dc6f10696f..fb8e128415 100644 --- a/engines/scumm/boxes.cpp +++ b/engines/scumm/boxes.cpp @@ -614,10 +614,8 @@ BoxCoords ScummEngine::getBoxCoordinates(int boxnum) { box->lr.x = bp->c64.x2; box->lr.y = bp->c64.y2; - if (bp->c64.mask & 0x88) { + if ((bp->c64.mask & 0x88) == 0x88) { // walkbox for (right/left) corner - // TODO: ladders (incl. man-eating plant) have mask 0x8A, - // must those walkboxes be adjusted? if (bp->c64.mask & 0x04) box->ur = box->ul; else |