aboutsummaryrefslogtreecommitdiff
path: root/engines/tony
diff options
context:
space:
mode:
authorAlyssa Milburn2012-08-23 23:21:08 +0200
committerAlyssa Milburn2012-08-25 08:41:21 +0200
commit7815c0522094b058409974618867d683b86564d1 (patch)
tree4fd61a27cd00490e47e9b03a242226bfb6aca9c5 /engines/tony
parent68c6109e7645c46be7c4bbd20fc0f3d68897ccc5 (diff)
downloadscummvm-rg350-7815c0522094b058409974618867d683b86564d1.tar.gz
scummvm-rg350-7815c0522094b058409974618867d683b86564d1.tar.bz2
scummvm-rg350-7815c0522094b058409974618867d683b86564d1.zip
TONY: Use the right dirty rects for drawAA.
This makes it match the relevant non-AA code, and fixes problems due to the invalid rects. (Perhaps we don't need dirty rects here at all though, since all the callers seem to call the non-AA code first with the same parameters?)
Diffstat (limited to 'engines/tony')
-rw-r--r--engines/tony/gfxcore.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp
index 0241d96af1..06c74dd231 100644
--- a/engines/tony/gfxcore.cpp
+++ b/engines/tony/gfxcore.cpp
@@ -1720,7 +1720,17 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
if (prim->isFlipped()) {
u = _dimx - (width + u);
x1 = (prim->getDst()._x1 + _dimx - 1) - u;
+
+ if (width > x1)
+ width = x1;
+
+ // Specify the drawn area
+ bigBuf.addDirtyRect(Common::Rect(x1 - width, y1, x1, y1 + height));
+ } else {
+ // Specify the drawn area
+ bigBuf.addDirtyRect(Common::Rect(x1, y1, x1 + width, y1 + height));
}
+
// width = _dimx;
// x1 = prim->Dst().x1;
@@ -1807,9 +1817,6 @@ void RMGfxSourceBuffer8AA::drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
// Skip to the next line
buf += bigBuf.getDimx();
}
-
- // Specify the drawn area
- bigBuf.addDirtyRect(Common::Rect(x1, y1, x1 + width, y1 + height));
}