diff options
author | Martin Kiewitz | 2010-06-17 16:06:01 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-17 16:06:01 +0000 |
commit | 00ac852dc861877857bbb4065a6cd1f78f04b023 (patch) | |
tree | 501411b218976af5bcfa11f54b3015a94b34a195 /engines/sci/graphics | |
parent | 1bbb9d7bd29020566c36d7812c6de236a25c025e (diff) | |
download | scummvm-rg350-00ac852dc861877857bbb4065a6cd1f78f04b023.tar.gz scummvm-rg350-00ac852dc861877857bbb4065a6cd1f78f04b023.tar.bz2 scummvm-rg350-00ac852dc861877857bbb4065a6cd1f78f04b023.zip |
SCI: implement workaround for laura bow 2 demo, because that interpreter uses the old real palette merging from sci1 - some views contain a palette that has all colors marked as being used, which would overwrite sysPalette with blacks
svn-id: r49936
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/palette.cpp | 12 | ||||
-rw-r--r-- | engines/sci/graphics/palette.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index d28fb2ada1..f10446098f 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -57,6 +57,15 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen) _sysPalette.colors[255].b = 255; _sysPaletteChanged = false; + _alwaysForceRealMerge = false; + + // Pseudo-WORKAROUND + // Laura Bow 2 is an inbetween interpreter, some parts are SCI1.1, some parts are SCI1 + // It's not using the SCI1.1 palette merging (copying over all the colors) but the real merging + // If we use the copying over, we will get issues because some views have marked all colors as being used + // and those will overwrite the current palette in that case + if (!strcmp(g_sci->getGameID(), "laurabow2") && (g_sci->isDemo())) + _alwaysForceRealMerge = true; } GfxPalette::~GfxPalette() { @@ -211,6 +220,9 @@ bool GfxPalette::merge(Palette *pFrom, Palette *pTo, bool force, bool forceRealM int i,j; bool paletteChanged = false; + // for Laura Bow 2 demo + forceRealMerge |= _alwaysForceRealMerge; + if ((!forceRealMerge) && (getSciVersion() >= SCI_VERSION_1_1)) { // SCI1.1+ doesnt do real merging anymore, but simply copying over the used colors from other palettes for (i = 1; i < 255; i++) { diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index d84436d708..fead340090 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -77,6 +77,7 @@ private: uint32 _palVaryEnd; bool _sysPaletteChanged; + bool _alwaysForceRealMerge; Common::Array<PalSchedule> _schedules; }; |