aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova
diff options
context:
space:
mode:
Diffstat (limited to 'engines/supernova')
-rw-r--r--engines/supernova/supernova.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp
index 60d3c1c1cc..fe52f20205 100644
--- a/engines/supernova/supernova.cpp
+++ b/engines/supernova/supernova.cpp
@@ -426,13 +426,15 @@ void SupernovaEngine::renderImage(MSNImageDecoder &image, int section) {
}
uint offset = 0;
+ int pitch = sectionRect.width();
if (invert) {
- offset = image._section[section].y1 * image._pitch + image._section[section].x1;
+ pitch = image._pitch;
+ offset = image._section[section].y1 * pitch + image._section[section].x1;
section = 0;
}
_system->copyRectToScreen(static_cast<const byte *>(image._sectionSurfaces[section]->getPixels()) + offset,
- sectionRect.width(),
+ pitch,
sectionRect.left, sectionRect.top,
sectionRect.width(), sectionRect.height());
}