aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/detection.cpp')
-rw-r--r--engines/kyra/detection.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index c19db16d36..ccddbeb64c 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -1067,6 +1067,7 @@ public:
bool hasFeature(MetaEngineFeature f) const;
bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const;
SaveStateList listSaves(const char *target) const;
+ void removeSaveState(const char *target, int slot) const;
};
bool KyraMetaEngine::hasFeature(MetaEngineFeature f) const {
@@ -1147,6 +1148,16 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const {
return saveList;
}
+void KyraMetaEngine::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());
+}
+
#if PLUGIN_ENABLED_DYNAMIC(KYRA)
REGISTER_PLUGIN_DYNAMIC(KYRA, PLUGIN_TYPE_ENGINE, KyraMetaEngine);
#else