diff options
author | Travis Howell | 2010-10-25 08:03:55 +0000 |
---|---|---|
committer | Travis Howell | 2010-10-25 08:03:55 +0000 |
commit | 4f0cc6a435d725e62d38a4c7bdbd597f7f142972 (patch) | |
tree | db84e6f8ebb6401b6b20a6dad9ef64915451aa23 /engines/scumm/actor.cpp | |
parent | f228c76b35ba5362ffac6fa7cc86fe1acd5fa8f7 (diff) | |
download | scummvm-rg350-4f0cc6a435d725e62d38a4c7bdbd597f7f142972.tar.gz scummvm-rg350-4f0cc6a435d725e62d38a4c7bdbd597f7f142972.tar.bz2 scummvm-rg350-4f0cc6a435d725e62d38a4c7bdbd597f7f142972.zip |
SCUMM: Add patch #3093541 - MMC64: Actor Walk / Object Fix.
svn-id: r53806
Diffstat (limited to 'engines/scumm/actor.cpp')
-rw-r--r-- | engines/scumm/actor.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 25ce3f5007..eba3bbb078 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -1052,9 +1052,17 @@ static int checkXYInBoxBounds(int boxnum, int x, int y, int &destX, int &destY) // yDist must be divided by 4, as we are using 8x2 pixels // blocks for actor coordinates). int xDist = ABS(x - destX); - int yDist = ABS(y - destY) / 4; + int yDist; int dist; + // MM C64: This fixes the trunk bug (#3070065), as well + // as the fruit bowl, however im not sure if its + // the proper solution or not. + if( g_scumm->_game.version == 0 ) + yDist = ABS(y - destY); + else + yDist = ABS(y - destY) / 4; + if (xDist < yDist) dist = (xDist >> 1) + yDist; else @@ -1082,6 +1090,7 @@ AdjustBoxResult Actor_v2::adjustXYToBeInBox(const int dstX, const int dstY) { abr.x = foundX; abr.y = foundY; abr.box = box; + break; } if (dist < bestDist) { |