From 3058efc168bddf62eab2fdc1a9bae16546d218ae Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 14 Apr 2006 05:15:11 +0000 Subject: Fixed stupid mistake (it's my mistake, I can call it whatever I want!) in the scaling code. Hopefully it's right now. The scaling glitches seem to be gone, at any rate. svn-id: r21872 --- engines/simon/vga.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/simon/vga.cpp b/engines/simon/vga.cpp index 93ab4ebee9..896d77e4e2 100644 --- a/engines/simon/vga.cpp +++ b/engines/simon/vga.cpp @@ -1389,12 +1389,12 @@ void SimonEngine::scaleClip(int16 h, int16 w, int16 y, int16 x, int16 scrollY) { dst += _dxSurfacePitch * dstRect.top + dstRect.left; - for (int dstY = 0; dstY < h; dstY++) { + for (int dstY = 0; dstY < scaledH; dstY++) { if (dstRect.top + dstY >= 0 && dstRect.top + dstY < _screenHeight) { int srcY = (dstY * h) / scaledH; byte *srcPtr = src + _dxSurfacePitch * srcY; byte *dstPtr = dst + _dxSurfacePitch * dstY; - for (int dstX = 0; dstX < w; dstX++) { + for (int dstX = 0; dstX < scaledW; dstX++) { if (dstRect.left + dstX >= 0 && dstRect.left + dstX < _screenWidth) { int srcX = (dstX * w) / scaledW; if (srcPtr[srcX]) -- cgit v1.2.3