diff options
Diffstat (limited to 'engines/agi/detection.cpp')
-rw-r--r-- | engines/agi/detection.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 9caf09fd28..2b2d7e080b 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -2125,6 +2125,7 @@ public: virtual bool hasFeature(MetaEngineFeature f) const; virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const; virtual SaveStateList listSaves(const char *target) const; + virtual void removeSaveState(const char *target, int slot) const; const Common::ADGameDescription *fallbackDetect(const Common::FSList *fslist) const; }; @@ -2189,6 +2190,16 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const { return saveList; } +void AgiMetaEngine::removeSaveState(const char *target, int slot) const { + char extension[6]; + snprintf(extension, sizeof(extension), ".%03d", slot); + + Common::String filename = target; + filename += extension; + + g_system->getSavefileManager()->removeSavefile(filename.c_str()); +} + const Common::ADGameDescription *AgiMetaEngine::fallbackDetect(const Common::FSList *fslist) const { typedef Common::HashMap<Common::String, int32> IntMap; IntMap allFiles; |