aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova
diff options
context:
space:
mode:
authorThierry Crozat2017-11-05 18:49:10 +0000
committerThierry Crozat2018-01-23 02:15:38 +0000
commit54201327f762dd75e184ab260aa20ff4840875a4 (patch)
treef13b5ab7565a65113c44bc1dcd4d73bb08aafcb2 /engines/supernova
parentc8c6eeb974ce48ee6cf3d0c5a79871743fc0c68d (diff)
downloadscummvm-rg350-54201327f762dd75e184ab260aa20ff4840875a4.tar.gz
scummvm-rg350-54201327f762dd75e184ab260aa20ff4840875a4.tar.bz2
scummvm-rg350-54201327f762dd75e184ab260aa20ff4840875a4.zip
SUPERNOVA: Fix image rendering when removing image
This is mostly used in talk animations and result in bad artefacts. The issue was a regression introduced in commit e0f6da0.
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());
}