From 54201327f762dd75e184ab260aa20ff4840875a4 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 5 Nov 2017 18:49:10 +0000 Subject: 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. --- engines/supernova/supernova.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/supernova') 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(image._sectionSurfaces[section]->getPixels()) + offset, - sectionRect.width(), + pitch, sectionRect.left, sectionRect.top, sectionRect.width(), sectionRect.height()); } -- cgit v1.2.3