diff options
author | Filippos Karapetis | 2010-07-23 07:36:55 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-07-23 07:36:55 +0000 |
commit | 3aa4f76ee422b42b6588296862e01eb3e8a50357 (patch) | |
tree | 06a8f43b83e9ae79cfc505f65b3d89eb0474f9b1 /engines/sci/engine | |
parent | 6da04bc13bdd76ae0230d9eeb3e00eb11b55b20a (diff) | |
download | scummvm-rg350-3aa4f76ee422b42b6588296862e01eb3e8a50357.tar.gz scummvm-rg350-3aa4f76ee422b42b6588296862e01eb3e8a50357.tar.bz2 scummvm-rg350-3aa4f76ee422b42b6588296862e01eb3e8a50357.zip |
SCI: Now saving the kPalVary state inside savegames
svn-id: r51194
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 22 | ||||
-rw-r--r-- | engines/sci/engine/savegame.h | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index c080120d7b..72f6ae28a7 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -40,6 +40,7 @@ #include "sci/engine/selector.h" #include "sci/engine/vm_types.h" #include "sci/engine/script.h" // for SCI_OBJ_EXPORTS and SCI_OBJ_SYNONYMS +#include "sci/graphics/palette.h" #include "sci/graphics/ports.h" #include "sci/sound/audio.h" #include "sci/sound/music.h" @@ -628,6 +629,27 @@ void StringTable::saveLoadWithSerializer(Common::Serializer &ser) { } #endif +void GfxPalette::saveLoadWithSerializer(Common::Serializer &s) { + if (s.getVersion() < 24) + return; + + if (s.isLoading() && _palVaryResourceId != -1) + 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 (s.isLoading() && _palVaryResourceId != -1) + palVaryInstallTimer(); +} + void SegManager::reconstructStack(EngineState *s) { DataStack *stack = (DataStack *)(_heap[findSegmentByType(SEG_TYPE_STACK)]); s->stack_base = stack->_entries; diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h index 9a882f2bf7..799a68cbbe 100644 --- a/engines/sci/engine/savegame.h +++ b/engines/sci/engine/savegame.h @@ -36,7 +36,7 @@ namespace Sci { struct EngineState; enum { - CURRENT_SAVEGAME_VERSION = 23, + CURRENT_SAVEGAME_VERSION = 24, MINIMUM_SAVEGAME_VERSION = 12 }; |