From 5942382ad4643b9cab526b161b4d04dc71babdc5 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 25 Oct 2010 07:07:23 +0000 Subject: SCUMM: Add patch #3093051 - MMC64: Ladder facing patch. svn-id: r53799 --- engines/scumm/actor.cpp | 9 +++++++++ engines/scumm/boxes.cpp | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'engines/scumm') 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 -- cgit v1.2.3