aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gui/gui_screen.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp
index 5fe037dd42..b993684080 100644
--- a/engines/sci/gui/gui_screen.cpp
+++ b/engines/sci/gui/gui_screen.cpp
@@ -495,15 +495,16 @@ void SciGuiScreen::debugShowMap(int mapNo) {
void SciGuiScreen::scale2x(byte *src, byte *dst, int16 srcWidth, int16 srcHeight) {
int newWidth = srcWidth * 2;
+ byte *srcPtr = src;
for (int y = 0; y < srcHeight; y++) {
for (int x = 0; x < srcWidth; x++) {
int destOffset = y * 2 * newWidth + x * 2;
- int color = src[y * srcWidth + x];
- dst[destOffset] = color;
- dst[destOffset + 1] = color;
- dst[destOffset + newWidth] = color;
- dst[destOffset + newWidth + 1] = color;
+ dst[destOffset] = *srcPtr;
+ dst[destOffset + 1] = *srcPtr;
+ dst[destOffset + newWidth] = *srcPtr;
+ dst[destOffset + newWidth + 1] = *srcPtr;
+ srcPtr++;
}
}
}