aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2012-06-08 11:57:43 +0300
committerFilippos Karapetis2012-06-08 11:57:43 +0300
commita643981a385b20ef71a4d1987965f5d1b73fdadc (patch)
tree5b236fc6ed8998b89d675829bdd2cdf7545fe454
parent18dd5e5128dcff623830ed43916828bc5cde1969 (diff)
downloadscummvm-rg350-a643981a385b20ef71a4d1987965f5d1b73fdadc.tar.gz
scummvm-rg350-a643981a385b20ef71a4d1987965f5d1b73fdadc.tar.bz2
scummvm-rg350-a643981a385b20ef71a4d1987965f5d1b73fdadc.zip
SCI: Handle resource ID -1 when setting the palVary resource
Fixes several wrong colors in SQ6
-rw-r--r--engines/sci/graphics/palette.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 47d1647c6c..ea154c5037 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -698,7 +698,7 @@ void GfxPalette::palVaryInit() {
}
bool GfxPalette::palVaryLoadTargetPalette(GuiResourceId resourceId) {
- _palVaryResourceId = resourceId;
+ _palVaryResourceId = (resourceId != 65535) ? resourceId : -1;
Resource *palResource = _resMan->findResource(ResourceId(kResourceTypePalette, resourceId), false);
if (palResource) {
// Load and initialize destination palette