aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorrichiesams2013-08-11 16:44:13 -0500
committerrichiesams2013-08-11 16:44:13 -0500
commit7e93b6407a14c3c3fe75f03667362fcf8555e69d (patch)
tree6e8eb2bdf0fe8e14479fbb3e10e62ef6eac33234 /engines/zvision
parent372c55fd8be80182721566f09ab2d69c9f24abc5 (diff)
downloadscummvm-rg350-7e93b6407a14c3c3fe75f03667362fcf8555e69d.tar.gz
scummvm-rg350-7e93b6407a14c3c3fe75f03667362fcf8555e69d.tar.bz2
scummvm-rg350-7e93b6407a14c3c3fe75f03667362fcf8555e69d.zip
ZVISION: Fix frame scaling for 2bpp
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/video.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/zvision/video.cpp b/engines/zvision/video.cpp
index 0836eef496..f9637d36a4 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;
}