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
This commit is contained in:
parent
193c3bc8ee
commit
f974de7e16
2 changed files with 6 additions and 51 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue