From 78fd335a4260a16664083fbf3333b8fba52e75ea Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 7 Dec 2008 18:49:35 +0000 Subject: More dirty rectangle related changes (dirty rectangle handling is still broken) svn-id: r35281 --- engines/saga/sprite.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/saga/sprite.cpp') diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index 200b0af206..6507b6ebb3 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -33,6 +33,7 @@ #include "saga/font.h" #include "saga/sprite.h" +#include "saga/render.h" namespace Saga { @@ -251,6 +252,8 @@ void Sprite::drawClip(const Rect &clipRect, const Point &spritePointer, int widt bufRowPointer += _vm->_gfx->getBackBufferPitch(); srcRowPointer += width; } + + _vm->_render->addDirtyRect(Common::Rect(spritePointer.x, spritePointer.y, spritePointer.x + clipWidth, spritePointer.y + clipHeight)); } void Sprite::draw(const Rect &clipRect, SpriteList &spriteList, int32 spriteNumber, const Point &screenCoord, int scale) { @@ -391,6 +394,9 @@ void Sprite::drawOccluded(const Rect &clipRect, SpriteList &spriteList, int spri maskRowPointer += maskWidth; sourceRowPointer += width; } + + _vm->_render->addDirtyRect(Common::Rect(clipData.destPoint.x, clipData.destPoint.y, + clipData.destPoint.x + clipData.drawWidth, clipData.destPoint.y + clipData.drawHeight)); } void Sprite::decodeRLEBuffer(const byte *inputBuffer, size_t inLength, size_t outLength) { -- cgit v1.2.3