aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-04-14 05:15:11 +0000
committerTorbjörn Andersson2006-04-14 05:15:11 +0000
commit3058efc168bddf62eab2fdc1a9bae16546d218ae (patch)
tree47629e16705a27852f7daf997da39a07c9f2afbb
parent1a6849de91ce2b36a37482c027268889893515bb (diff)
downloadscummvm-rg350-3058efc168bddf62eab2fdc1a9bae16546d218ae.tar.gz
scummvm-rg350-3058efc168bddf62eab2fdc1a9bae16546d218ae.tar.bz2
scummvm-rg350-3058efc168bddf62eab2fdc1a9bae16546d218ae.zip
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
-rw-r--r--engines/simon/vga.cpp4
1 files 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])