diff options
author | David Fioramonti | 2018-05-19 12:46:36 -0700 |
---|---|---|
committer | Bastien Bouclet | 2018-05-20 15:17:14 +0200 |
commit | 37791c4bd3b33aa042fc966d4ed2b1f5369b0939 (patch) | |
tree | 7e367e3ef0f063865ecda19073d08c584e20782b /engines/mohawk/riven_saveload.h | |
parent | 1606d6688d665eccf7b2535cb42b84d684e98076 (diff) | |
download | scummvm-rg350-37791c4bd3b33aa042fc966d4ed2b1f5369b0939.tar.gz scummvm-rg350-37791c4bd3b33aa042fc966d4ed2b1f5369b0939.tar.bz2 scummvm-rg350-37791c4bd3b33aa042fc966d4ed2b1f5369b0939.zip |
MOHAWK: RIVEN: Add Autosave Support
The game will autosave to slot 0 using the save
period given in the scummvm config file.
Or when the user quits.
Autosaves are only allowed when an autosave is
in slot 0, there is no save in slot 0, or there
is a save, but it is corrupt.
This will not override any saves the player
has previously put in save slot 0. If there
is a save in slot 0 that is not an autosave
then there will be no autosaving.
Diffstat (limited to 'engines/mohawk/riven_saveload.h')
-rw-r--r-- | engines/mohawk/riven_saveload.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/mohawk/riven_saveload.h b/engines/mohawk/riven_saveload.h index 34bfbdc434..1432505b02 100644 --- a/engines/mohawk/riven_saveload.h +++ b/engines/mohawk/riven_saveload.h @@ -49,6 +49,8 @@ struct RivenSaveMetadata { uint32 totalPlayTime; + bool autoSave; + Common::String saveDescription; RivenSaveMetadata(); @@ -57,11 +59,14 @@ struct RivenSaveMetadata { class RivenSaveLoad { public: + static const int kAutoSaveSlot; + RivenSaveLoad(MohawkEngine_Riven*, Common::SaveFileManager*); ~RivenSaveLoad(); Common::Error loadGame(const int slot); - Common::Error saveGame(const int slot, const Common::String &description); + Common::Error saveGame(const int slot, const Common::String &description, bool autoSave); + bool isAutoSaveAllowed(); static void deleteSave(const int slot); static SaveStateDescriptor querySaveMetaInfos(const int slot); @@ -74,7 +79,7 @@ private: static Common::String buildSaveFilename(const int slot); Common::MemoryWriteStreamDynamic *genNAMESection(); - Common::MemoryWriteStreamDynamic *genMETASection(const Common::String &desc) const; + Common::MemoryWriteStreamDynamic *genMETASection(const Common::String &desc, bool autoSave) const; Common::MemoryWriteStreamDynamic *genTHMBSection() const; Common::MemoryWriteStreamDynamic *genVARSSection(); Common::MemoryWriteStreamDynamic *genVERSSection(); |