[Scummvm-git-logs] scummvm master -> 5ebcd0fa748392d5cc42142111ad76efeedec389
neuromancer
noreply at scummvm.org
Mon Jan 3 08:17:48 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5ebcd0fa74 PRIVATE: correct initialization of paletteduring intro
Commit: 5ebcd0fa748392d5cc42142111ad76efeedec389
https://github.com/scummvm/scummvm/commit/5ebcd0fa748392d5cc42142111ad76efeedec389
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-03T09:15:10+01:00
Commit Message:
PRIVATE: correct initialization of paletteduring intro
Changed paths:
engines/private/private.cpp
diff --git a/engines/private/private.cpp b/engines/private/private.cpp
index 325c941a4eb..c02100acbbb 100644
--- a/engines/private/private.cpp
+++ b/engines/private/private.cpp
@@ -220,6 +220,11 @@ Common::Error PrivateEngine::run() {
_frameImage = decodeImage(_framePath, nullptr);
_mframeImage = decodeImage(_framePath, &palette);
+ byte *initialPalette;
+ decodeImage("inface/general/inface1.bmp", &initialPalette);
+ _compositeSurface->setPalette(initialPalette, 0, 256);
+ free(initialPalette);
+
_framePalette = (byte *) malloc(3*256);
memcpy(_framePalette, palette, 3*256);
@@ -1246,7 +1251,7 @@ Graphics::Surface *PrivateEngine::decodeImage(const Common::String &name, byte *
byte *currentPalette;
uint16 ncolors = _image->getPaletteColorCount();
- if (ncolors < 256) { // For some reason, requires color remapping
+ if (ncolors < 256 || path.hasPrefix("intro")) { // For some reason, requires color remapping
currentPalette = (byte *) malloc(3*256);
drawScreen();
g_system->getPaletteManager()->grabPalette(currentPalette, 0, 256);
More information about the Scummvm-git-logs
mailing list