aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx/operations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/gfx/operations.cpp')
-rw-r--r--engines/sci/gfx/operations.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp
index ae385cd483..585e380e0d 100644
--- a/engines/sci/gfx/operations.cpp
+++ b/engines/sci/gfx/operations.cpp
@@ -335,10 +335,13 @@ gfx_dirty_rect_t *gfxdr_add_dirty(gfx_dirty_rect_t *base, rect_t box, int strate
switch (strategy) {
case GFXOP_DIRTY_FRAMES_ONE:
- if (base)
- base->rect = gfx_rects_merge(box, base->rect);
- else
+ if (base) {
+ Common::Rect tmp = toCommonRect(box);
+ tmp.extend(toCommonRect(base->rect));
+ base->rect = toSCIRect(tmp);
+ } else {
base = _rect_create(box);
+ }
break;
case GFXOP_DIRTY_FRAMES_CLUSTERS: {
@@ -347,7 +350,10 @@ gfx_dirty_rect_t *gfxdr_add_dirty(gfx_dirty_rect_t *base, rect_t box, int strate
while (*rectp) {
if (gfx_rects_overlap((*rectp)->rect, box)) {
gfx_dirty_rect_t *next = (*rectp)->next;
- box = gfx_rects_merge((*rectp)->rect, box);
+ Common::Rect tmp = toCommonRect((*rectp)->rect);
+ tmp.extend(toCommonRect(box));
+ box = toSCIRect(tmp);
+
free(*rectp);
*rectp = next;
} else