From 7815c0522094b058409974618867d683b86564d1 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Thu, 23 Aug 2012 23:21:08 +0200 Subject: 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?) --- engines/tony/gfxcore.cpp | 13 ++++++++++--- 1 file 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)); } -- cgit v1.2.3