diff options
author | Martin Kiewitz | 2010-07-23 08:08:27 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-07-23 08:08:27 +0000 |
commit | 15eebdb0618c82f80e7cdf83141552ff8da228b4 (patch) | |
tree | 02918ad649cb7478447cdcc8cc3abdf7e760f84a /engines/sci | |
parent | 3aa4f76ee422b42b6588296862e01eb3e8a50357 (diff) | |
download | scummvm-rg350-15eebdb0618c82f80e7cdf83141552ff8da228b4.tar.gz scummvm-rg350-15eebdb0618c82f80e7cdf83141552ff8da228b4.tar.bz2 scummvm-rg350-15eebdb0618c82f80e7cdf83141552ff8da228b4.zip |
SCI: some changes to kPalVary saving
still needs to get tested
svn-id: r51196
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 72f6ae28a7..8074ebd9a9 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -637,17 +637,20 @@ void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) { palVaryRemoveTimer(); s.syncAsSint32LE(_palVaryResourceId); - _palVaryOriginPalette.saveLoadWithSerializer(s); - _palVaryTargetPalette.saveLoadWithSerializer(s); - s.syncAsSint16LE(_palVaryStep); - s.syncAsSint16LE(_palVaryStepStop); - s.syncAsSint16LE(_palVaryDirection); - s.syncAsUint16LE(_palVaryTicks); - s.syncAsSint32LE(_palVaryPaused); - s.syncAsSint32LE(_palVarySignal); + if (_palVaryResourceId != -1) { + _palVaryOriginPalette.saveLoadWithSerializer(s); + _palVaryTargetPalette.saveLoadWithSerializer(s); + s.syncAsSint16LE(_palVaryStep); + s.syncAsSint16LE(_palVaryStepStop); + s.syncAsSint16LE(_palVaryDirection); + s.syncAsUint16LE(_palVaryTicks); + s.syncAsSint32LE(_palVaryPaused); + } - if (s.isLoading() && _palVaryResourceId != -1) + if (s.isLoading() && _palVaryResourceId != -1) { + _palVarySignal = 0; palVaryInstallTimer(); + } } void SegManager::reconstructStack(EngineState *s) { |