aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2016-03-18 09:10:10 -0500
committerColin Snover2016-03-18 09:14:53 -0500
commit5917467c1b3faa97ec5a7b95eeface6d097cda77 (patch)
tree9f52158eed0c4ff540bbceb728d400c296af786c
parent657edcf84e97d9c6b044ae3f3687fa9aba9e9ce9 (diff)
downloadscummvm-rg350-5917467c1b3faa97ec5a7b95eeface6d097cda77.tar.gz
scummvm-rg350-5917467c1b3faa97ec5a7b95eeface6d097cda77.tar.bz2
scummvm-rg350-5917467c1b3faa97ec5a7b95eeface6d097cda77.zip
SCI32: Fix incorrect double-read from CLUT
-rw-r--r--engines/sci/graphics/frameout.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 82a33e4bd8..b654cbf2b9 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -1017,7 +1017,10 @@ void GfxFrameout::alterVmap(const Palette &palette1, const Palette &palette2, co
int8 styleRangeValue = styleRanges[currentValue];
if (styleRangeValue == -1 && styleRangeValue == style) {
currentValue = pixels[pixelIndex] = clut[currentValue];
- styleRangeValue = styleRanges[clut[currentValue]];
+ // NOTE: In original engine this assignment happens outside of the
+ // condition, but if the branch is not followed the value is just
+ // going to be the same as it was before
+ styleRangeValue = styleRanges[currentValue];
}
if (