diff options
author | Thierry Crozat | 2018-12-28 19:02:45 +0100 |
---|---|---|
committer | Thierry Crozat | 2018-12-28 20:40:27 +0100 |
commit | 287f40358e0cf43335b2727d4e2c5573d4c89246 (patch) | |
tree | a543ac27a0d73fcde78b5f05196d9c749fc9b240 /engines/supernova/supernova.h | |
parent | 2d75c6b271e71168bb42024606f4b7fc510d1751 (diff) | |
download | scummvm-rg350-287f40358e0cf43335b2727d4e2c5573d4c89246.tar.gz scummvm-rg350-287f40358e0cf43335b2727d4e2c5573d4c89246.tar.bz2 scummvm-rg350-287f40358e0cf43335b2727d4e2c5573d4c89246.zip |
SUPERNOVA: Save sleep savegame at end of normal saves
This replaces using slot 999 to save this savegame and allows
to properly handle having several playthroughs with a different
state when going to sleep. This is also similar to what the
original engine was doing.
Diffstat (limited to 'engines/supernova/supernova.h')
-rw-r--r-- | engines/supernova/supernova.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/supernova/supernova.h b/engines/supernova/supernova.h index 132e25deeb..b4af8b4394 100644 --- a/engines/supernova/supernova.h +++ b/engines/supernova/supernova.h @@ -29,7 +29,6 @@ #include "common/scummsys.h" #include "engines/engine.h" #include "common/file.h" -#include "common/memstream.h" #include "supernova/console.h" #include "supernova/graphics.h" @@ -37,11 +36,14 @@ #include "supernova/rooms.h" #include "supernova/sound.h" +namespace Common { + class MemoryReadWriteStream; +} namespace Supernova { #define SAVEGAME_HEADER MKTAG('M','S','N','1') -#define SAVEGAME_VERSION 8 +#define SAVEGAME_VERSION 9 #define SUPERNOVA_DAT "supernova.dat" #define SUPERNOVA_DAT_VERSION 1 @@ -75,6 +77,8 @@ public: bool _allowSaveGame; Common::StringArray _gameStrings; Common::String _nullString; + int _sleepAuoSaveVersion; + Common::MemoryReadWriteStream* _sleepAutoSave; uint _delay; int _textSpeed; @@ -83,6 +87,8 @@ public: void init(); bool loadGame(int slot); bool saveGame(int slot, const Common::String &description); + bool serialize(Common::WriteStream *out); + bool deserialize(Common::ReadStream *in, int version); bool quitGameDialog(); void errorTempSave(bool saving); void setTextSpeed(); |