diff options
| author | Max Horn | 2004-09-27 23:10:19 +0000 |
|---|---|---|
| committer | Max Horn | 2004-09-27 23:10:19 +0000 |
| commit | f974de7e166af55dfa728ef0f917c504d51a4e6e (patch) | |
| tree | 9647ab1ae034c814d139d667938bf5bb9246e53c /scumm/akos.cpp | |
| parent | 193c3bc8ee5e6b7dac74286fd5fa2d6dd41b99a6 (diff) | |
| download | scummvm-rg350-f974de7e166af55dfa728ef0f917c504d51a4e6e.tar.gz scummvm-rg350-f974de7e166af55dfa728ef0f917c504d51a4e6e.tar.bz2 scummvm-rg350-f974de7e166af55dfa728ef0f917c504d51a4e6e.zip | |
Well, it *looks* as if that clipping code could be simplified. We'll see if somebody starts to yell about the changes, though :-)
svn-id: r15313
Diffstat (limited to 'scumm/akos.cpp')
| -rw-r--r-- | scumm/akos.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 169076d4f5..61af2f4f91 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -1218,35 +1218,13 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { dst.left = _actorX + xmoveCur; } - src.top = src.left = 0; - src.right = _width - 1; - src.bottom = _height - 1; - dst.top = _actorY + ymoveCur; dst.right = dst.left + _width - 1; dst.bottom = dst.top + _height - 1; - 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; - } + dst.clip(_clipOverride); + src = dst; + src.moveTo(0, 0); _vm->markRectAsDirty(kMainVirtScreen, dst); |
