Skip to content

Commit

Permalink
TONY: Use the right dirty rects for drawAA.
Browse files Browse the repository at this point in the history
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?)
  • Loading branch information
fuzzie committed Aug 25, 2012
1 parent 68c6109 commit 7815c05
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions engines/tony/gfxcore.cpp
Expand Up @@ -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;

Expand Down Expand Up @@ -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));
}


Expand Down

0 comments on commit 7815c05

Please sign in to comment.