diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/video.cpp | 10 |
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; } |