aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTravis Howell2010-10-25 07:07:23 +0000
committerTravis Howell2010-10-25 07:07:23 +0000
commit5942382ad4643b9cab526b161b4d04dc71babdc5 (patch)
treece7c6e99de4e8b88b44b15d6fad544f78132e4a5 /engines/scumm
parent8e10c5bc3b98030df8232091f38295b001cfe2f7 (diff)
downloadscummvm-rg350-5942382ad4643b9cab526b161b4d04dc71babdc5.tar.gz
scummvm-rg350-5942382ad4643b9cab526b161b4d04dc71babdc5.tar.bz2
scummvm-rg350-5942382ad4643b9cab526b161b4d04dc71babdc5.zip
SCUMM: Add patch #3093051 - MMC64: Ladder facing patch.
svn-id: r53799
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/actor.cpp9
-rw-r--r--engines/scumm/boxes.cpp4
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