ALL: Add MetaEngine::simpleSaveNames()

Engines with "simple" savenames would support "Run in background" in
save/load dialog and gradual save slots unlocking. Other engines
save/load feature would be locked until save sync is over.
This commit is contained in:
Alexander Tkachev 2016-06-07 19:33:00 +06:00
parent bf71ba9a1c
commit ab1d160ec8
52 changed files with 171 additions and 26 deletions

View file

@ -175,6 +175,7 @@ public:
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
int getMaximumSaveSlot() const { return 'O' - 'A'; }
SaveStateList listSaves(const char *target) const;
virtual bool simpleSaveNames() const;
void removeSaveState(const char *target, int slot) const;
bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const;
@ -289,6 +290,8 @@ SaveStateList AdlMetaEngine::listSaves(const char *target) const {
return saveList;
}
bool AdlMetaEngine::simpleSaveNames() const { return true; }
void AdlMetaEngine::removeSaveState(const char *target, int slot) const {
Common::String fileName = Common::String::format("%s.s%02d", target, slot);
g_system->getSavefileManager()->removeSavefile(fileName);