From 7e93b6407a14c3c3fe75f03667362fcf8555e69d Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 11 Aug 2013 16:44:13 -0500 Subject: [PATCH] ZVISION: Fix frame scaling for 2bpp --- engines/zvision/video.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/engines/zvision/video.cpp b/engines/zvision/video.cpp index 0836eef496b..f9637d36a4c 100644 --- a/engines/zvision/video.cpp +++ b/engines/zvision/video.cpp @@ -61,11 +61,13 @@ void scaleBuffer(const byte *src, byte *dst, uint32 srcWidth, uint32 srcHeight, const byte color = *srcPtr++; const byte color2 = *srcPtr++; - dst[i] = color; - dst[i + 1] = color2; - dst[pitch + i] = color; - dst[pitch + i + 1] = color2; for (uint i = 0; i < scaleAmount; i++) { + uint index = i *2; + + dst[index] = color; + dst[index + 1] = color2; + dst[pitch + index] = color; + dst[pitch + index + 1] = color2; } dst += 2 * scaleAmount; }