diff options
Diffstat (limited to 'engines/saga/sprite.cpp')
-rw-r--r-- | engines/saga/sprite.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index f36f25f385..4c364b1263 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -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; |