diff options
Diffstat (limited to 'engines/toon/picture.cpp')
-rw-r--r-- | engines/toon/picture.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp index f59cdca064..65cc3a70e1 100644 --- a/engines/toon/picture.cpp +++ b/engines/toon/picture.cpp @@ -170,7 +170,7 @@ void Picture::drawMask(Graphics::Surface &surface, int16 x, int16 y, int16 dx, i int32 destPitch = surface.pitch; int32 srcPitch = _width; uint8 *c = _data + _width * dy + dx; - uint8 *curRow = (uint8 *)surface.pixels + y * destPitch + x; + uint8 *curRow = (uint8 *)surface.getBasePtr(x, y); for (int16 yy = 0; yy < ry; yy++) { uint8 *curSrc = c; @@ -205,7 +205,7 @@ void Picture::drawWithRectList(Graphics::Surface& surface, int16 x, int16 y, int int16 fillRy = MIN<int32>(ry, rect.bottom - rect.top); uint8 *c = _data + _width * (dy + rect.top) + (dx + rect.left); - uint8 *curRow = (uint8 *)surface.pixels + (y + rect.top) * destPitch + (x + rect.left); + uint8 *curRow = (uint8 *)surface.getBasePtr(x + rect.left, y + rect.top); for (int16 yy = 0; yy < fillRy; yy++) { uint8 *curSrc = c; @@ -233,7 +233,7 @@ void Picture::draw(Graphics::Surface &surface, int16 x, int16 y, int16 dx, int16 int32 destPitch = surface.pitch; int32 srcPitch = _width; uint8 *c = _data + _width * dy + dx; - uint8 *curRow = (uint8 *)surface.pixels + y * destPitch + x; + uint8 *curRow = (uint8 *)surface.getBasePtr(x, y); for (int16 yy = 0; yy < ry; yy++) { uint8 *curSrc = c; |