mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-11 04:06:12 +00:00
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
This commit is contained in:
parent
1bbb9d7bd2
commit
00ac852dc8
@ -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++) {
|
||||
|
@ -77,6 +77,7 @@ private:
|
||||
uint32 _palVaryEnd;
|
||||
|
||||
bool _sysPaletteChanged;
|
||||
bool _alwaysForceRealMerge;
|
||||
|
||||
Common::Array<PalSchedule> _schedules;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user