aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-11 19:47:45 +0000
committerJohannes Schickel2008-09-11 19:47:45 +0000
commit0a35842954b9f1e79a84316deb496a4f4ecacf55 (patch)
tree43c3ef778cf7b0c0cde00714308afd85a65478df /engines/kyra
parent6fd2cb99db561bf90e785eadf45bf41ace7bf5d8 (diff)
downloadscummvm-rg350-0a35842954b9f1e79a84316deb496a4f4ecacf55.tar.gz
scummvm-rg350-0a35842954b9f1e79a84316deb496a4f4ecacf55.tar.bz2
scummvm-rg350-0a35842954b9f1e79a84316deb496a4f4ecacf55.zip
Committed my patch #2105593 "Launcher/MetaEngine: Finnished removeSaveState".
svn-id: r34495
Diffstat (limited to 'engines/kyra')
-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