aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2012-11-15 14:57:55 +0200
committerFilippos Karapetis2012-11-15 14:57:55 +0200
commitfb0788d12ffd4fedaa5019d47c547f538d25ff7c (patch)
treecd1b02230d407b12a5b16d5f9710d6557f453316
parent2c8cd2d653830a3b10578254c32f2361f1e05a7b (diff)
downloadscummvm-rg350-fb0788d12ffd4fedaa5019d47c547f538d25ff7c.tar.gz
scummvm-rg350-fb0788d12ffd4fedaa5019d47c547f538d25ff7c.tar.bz2
scummvm-rg350-fb0788d12ffd4fedaa5019d47c547f538d25ff7c.zip
SCI: Properly reset the palVary signal when loading (bug #3575569)
-rw-r--r--engines/sci/engine/savegame.cpp7
-rw-r--r--engines/sci/graphics/palette.h3
2 files changed, 3 insertions, 7 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 2a39f24ecd..b2d95c599e 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -696,8 +696,9 @@ void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) {
s.syncAsSint32LE(_palVaryPaused);
}
+ _palVarySignal = 0;
+
if (s.isLoading() && _palVaryResourceId != -1) {
- _palVarySignal = 0;
palVaryInstallTimer();
}
}
@@ -878,10 +879,6 @@ void gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
}
}
- // Remove the palVary effect timer, if there is one running currently.
- // Fixes bug #3575569.
- g_sci->_gfxPalette->palVaryRemoveTimer();
-
// We don't need the thumbnail here, so just read it and discard it
Graphics::skipThumbnail(*fh);
diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h
index 1ca1f2dbb7..e974781d49 100644
--- a/engines/sci/graphics/palette.h
+++ b/engines/sci/graphics/palette.h
@@ -105,8 +105,6 @@ public:
byte findMacIconBarColor(byte r, byte g, byte b);
bool colorIsFromMacClut(byte index);
- void palVaryRemoveTimer();
-
#ifdef ENABLE_SCI32
bool loadClut(uint16 clutId);
byte matchClutColor(uint16 color);
@@ -116,6 +114,7 @@ public:
private:
void palVaryInit();
void palVaryInstallTimer();
+ void palVaryRemoveTimer();
bool palVaryLoadTargetPalette(GuiResourceId resourceId);
static void palVaryCallback(void *refCon);
void palVaryIncreaseSignal();