aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/mainDraw.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2009-08-15 11:50:59 +0000
committerPaul Gilbert2009-08-15 11:50:59 +0000
commit49a4df3c8c3e51d88c03b8f6745c787fb0f6a47e (patch)
tree4cd02e51633795b58c597c003cf7f11b870d9c4f /engines/cruise/mainDraw.cpp
parentaae6c98945122c974292a429cfc1a5ee01605e88 (diff)
downloadscummvm-rg350-49a4df3c8c3e51d88c03b8f6745c787fb0f6a47e.tar.gz
scummvm-rg350-49a4df3c8c3e51d88c03b8f6745c787fb0f6a47e.tar.bz2
scummvm-rg350-49a4df3c8c3e51d88c03b8f6745c787fb0f6a47e.zip
Added Dirty Rect handling functionality
svn-id: r43406
Diffstat (limited to 'engines/cruise/mainDraw.cpp')
-rw-r--r--engines/cruise/mainDraw.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 047f00ee90..61e8f8d85c 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -1121,6 +1121,8 @@ void mainDrawPolygons(int fileIndex, cellStruct *plWork, int X, int scale, int Y
if (spriteY1 == spriteY2)
return;
+ gfxModuleData_addDirtyRect(Common::Rect(spriteX2, spriteY2, spriteX1, spriteY1));
+
var_8 = 0;
memset(polygonMask, 0xFF, (320*200) / 8);
@@ -1177,6 +1179,8 @@ void drawMessage(const gfxEntryStruct *pGfxPtr, int globalX, int globalY, int wi
globalY = 198 - pGfxPtr->height;
}
+ gfxModuleData_addDirtyRect(Common::Rect(globalX, globalY, globalX + width, globalY + height));
+
initialOuput = ouputPtr + (globalY * 320) + globalX;
for (yp = 0; yp < height; yp++) {
@@ -1206,6 +1210,9 @@ void drawSprite(int width, int height, cellStruct *currentObjPtr, const uint8 *d
int x = 0;
int y = 0;
+ // Flag the given area as having been changed
+ gfxModuleData_addDirtyRect(Common::Rect(xs, ys, xs + width - 1, ys + height - 1));
+
cellStruct* plWork = currentObjPtr;
int workBufferSize = height * (width / 8);
@@ -1406,6 +1413,10 @@ void mainDraw(int16 param) {
if (bgPtr) {
gfxModuleData_gfxCopyScreen(bgPtr, gfxModuleData.pPage10);
+ if (backgroundChanged[masterScreen]) {
+ backgroundChanged[masterScreen] = false;
+ gfxModuleData_addDirtyRect(Common::Rect(0, 0, 320, 200));
+ }
}
autoCellHead.next = NULL;