aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorStrangerke2013-05-08 00:24:33 +0200
committerStrangerke2013-05-08 00:24:33 +0200
commit823844f396e676277873899cf6840a48b811b5f3 (patch)
treebbfe1dd9409e0cdc93c1326463d3a1fbae3f9f1a /engines/hopkins
parentba68b7b2756599223c41e1b18fe5bac4cee41851 (diff)
downloadscummvm-rg350-823844f396e676277873899cf6840a48b811b5f3.tar.gz
scummvm-rg350-823844f396e676277873899cf6840a48b811b5f3.tar.bz2
scummvm-rg350-823844f396e676277873899cf6840a48b811b5f3.zip
HOPKINS: Fix bug #3612115 - Courtesy of SylvainTV: Fix palette in thumbnails
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/saveload.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp
index af0b043641..45b4885c90 100644
--- a/engines/hopkins/saveload.cpp
+++ b/engines/hopkins/saveload.cpp
@@ -307,6 +307,10 @@ void SaveLoadManager::convertThumb16To8(Graphics::Surface *thumb16, Graphics::Su
byte r, g, b;
pixelFormat16.colorToRGB(*lineSrcP++, r, g, b);
+ // Do like in the original and show thumbnail as a grayscale picture
+ int lum = (r * 21 + g * 72 + b * 7) / 100;
+ r = g = b = lum;
+
// Scan the palette for the closest match
int difference = 99999, foundIndex = 0;
for (int palIndex = 0; palIndex < PALETTE_SIZE; ++palIndex) {