Skip to content

Commit

Permalink
HOPKINS: Fix bug #3612115 - Courtesy of SylvainTV: Fix palette in thu…
Browse files Browse the repository at this point in the history
…mbnails
  • Loading branch information
Strangerke committed May 7, 2013
1 parent ba68b7b commit 823844f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/hopkins/saveload.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 823844f

Please sign in to comment.