From 823844f396e676277873899cf6840a48b811b5f3 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 8 May 2013 00:24:33 +0200 Subject: HOPKINS: Fix bug #3612115 - Courtesy of SylvainTV: Fix palette in thumbnails --- engines/hopkins/saveload.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- cgit v1.2.3