Use CLIP template for clipping in the SAGA engine

svn-id: r29855
This commit is contained in:
Filippos Karapetis 2007-12-13 20:10:13 +00:00
parent 40661e5698
commit 1e483cc857
5 changed files with 11 additions and 44 deletions

View file

@ -207,15 +207,8 @@ void Sprite::drawClip(Surface *ds, const Rect &clipRect, const Point &spritePoin
bufRowPointer = (byte *)ds->pixels + ds->pitch * spritePointer.y;
srcRowPointer = spriteBuffer;
clipWidth = width;
if (width > (clipRect.right - spritePointer.x)) {
clipWidth = (clipRect.right - spritePointer.x);
}
clipHeight = height;
if (height > (clipRect.bottom - spritePointer.y)) {
clipHeight = (clipRect.bottom - spritePointer.y);
}
clipWidth = CLIP(width, 0, clipRect.right - spritePointer.x);
clipHeight = CLIP(height, 0, clipRect.bottom - spritePointer.y);
jo = 0;
io = 0;