diff options
author | Bastien Bouclet | 2016-04-03 07:48:50 +0200 |
---|---|---|
committer | Bastien Bouclet | 2016-04-03 08:11:56 +0200 |
commit | 9db3f69f5e34b4c0e2f52a4f9d8e3db058deaf49 (patch) | |
tree | c2eaa5cae93a6ed077818ee79a1d4e1f8d394173 /engines/mohawk/myst_state.h | |
parent | 7a290757a8ef9ae16d27a2eecf000a9ca8005a21 (diff) | |
download | scummvm-rg350-9db3f69f5e34b4c0e2f52a4f9d8e3db058deaf49.tar.gz scummvm-rg350-9db3f69f5e34b4c0e2f52a4f9d8e3db058deaf49.tar.bz2 scummvm-rg350-9db3f69f5e34b4c0e2f52a4f9d8e3db058deaf49.zip |
MOHAWK: Switch to slot based save file naming for Myst
Myst previously used the user provided description as the save filename.
This was not working when the user entered chacacters forbidden by the
filesystem.
The actual save format has not changed. Old saves are still compatible,
but must be renamed to 'myst-###.mys' and 'myst-###.mym'.
Fixes 7106.
Diffstat (limited to 'engines/mohawk/myst_state.h')
-rw-r--r-- | engines/mohawk/myst_state.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/mohawk/myst_state.h b/engines/mohawk/myst_state.h index 50359a5b52..7d5f3f7102 100644 --- a/engines/mohawk/myst_state.h +++ b/engines/mohawk/myst_state.h @@ -58,12 +58,12 @@ public: MystGameState(MohawkEngine_Myst*, Common::SaveFileManager*); ~MystGameState(); - static Common::StringArray generateSaveGameList(); - static SaveStateDescriptor querySaveMetaInfos(const Common::String filename); + static SaveStateDescriptor querySaveMetaInfos(int slot); + static Common::String querySaveDescription(int slot); - bool load(const Common::String &filename); - bool save(const Common::String &filename); - static void deleteSave(const Common::String &saveName); + bool load(int slot); + bool save(int slot, const Common::String &desc); + static void deleteSave(int slot); void addZipDest(uint16 stack, uint16 view); bool isReachableZipDest(uint16 stack, uint16 view); @@ -292,13 +292,13 @@ public: private: void syncGameState(Common::Serializer &s, bool isME); - static Common::InSaveFile *openMetadataFile(const Common::String &filename); - bool loadState(const Common::String &filename); - void loadMetadata(const Common::String &filename); - bool saveState(const Common::String &desc); + static Common::String buildSaveFilename(int slot); + static Common::String buildMetadataFilename(int slot); + bool loadState(int slot); + void loadMetadata(int slot); + bool saveState(int slot); void updateMetadateForSaving(const Common::String &desc); - bool saveMetadata(const Common::String &desc); - static Common::String removeExtension(const Common::String &filename); + bool saveMetadata(int slot); // The values in these regions are lists of VIEW resources // which correspond to visited zip destinations |