diff options
author | Travis Howell | 2005-03-30 14:12:57 +0000 |
---|---|---|
committer | Travis Howell | 2005-03-30 14:12:57 +0000 |
commit | b93b50809a302c994f36bea82a4178e5e9ca61dc (patch) | |
tree | e1f669b9c162bfcb337b4d04e7f36ce554a6cb80 /scumm/akos.cpp | |
parent | 41f910b5adf58f387ed491e2fbf17468ec4b3490 (diff) | |
download | scummvm-rg350-b93b50809a302c994f36bea82a4178e5e9ca61dc.tar.gz scummvm-rg350-b93b50809a302c994f36bea82a4178e5e9ca61dc.tar.bz2 scummvm-rg350-b93b50809a302c994f36bea82a4178e5e9ca61dc.zip |
Correct return values were lost in last commit.
Also revert cleanup from scumm/akos.cpp revision 1.185.
Clipping isn't compatible, due to possible negative values.
svn-id: r17294
Diffstat (limited to 'scumm/akos.cpp')
-rw-r--r-- | scumm/akos.cpp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 920141d4af..dc33dec3b4 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -1219,15 +1219,37 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { dst.left = _actorX + xmoveCur; } + src.top = src.left = 0; + src.right = _width; + src.bottom = _height; + dst.top = _actorY + ymoveCur; dst.right = dst.left + _width; dst.bottom = dst.top + _height; - dst.clip(_clipOverride); - src = dst; - src.moveTo(0, 0); + int diff; + diff = dst.left - _clipOverride.left; + if (diff < 0) { + src.left -= diff; + dst.left -= diff; + } + diff = dst.right - _clipOverride.right; + if (diff > 0) { + src.right -= diff; + dst.right -= diff; + } + diff = dst.top - _clipOverride.top; + if (diff < 0) { + src.top -= diff; + dst.top -= diff; + } + diff = dst.bottom - _clipOverride.bottom; + if (diff > 0) { + src.bottom -= diff; + dst.bottom -= diff; + } - markRectAsDirty(dst); + _vm->markRectAsDirty(kMainVirtScreen, dst); if (_draw_top > dst.top) _draw_top = dst.top; |