aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2008-11-09 19:30:09 +0000
committerFilippos Karapetis2008-11-09 19:30:09 +0000
commit7d8e4ca59bc1877ccb86bcbffacb1847bdf7f3e9 (patch)
treea7e32af65b386657853b930715d476893c399eb4
parent765e37dc2ed7e18b3543fa9d3b52fbd51f41e7cb (diff)
downloadscummvm-rg350-7d8e4ca59bc1877ccb86bcbffacb1847bdf7f3e9.tar.gz
scummvm-rg350-7d8e4ca59bc1877ccb86bcbffacb1847bdf7f3e9.tar.bz2
scummvm-rg350-7d8e4ca59bc1877ccb86bcbffacb1847bdf7f3e9.zip
Added a getMaximumSaveSlot() implementation for sword1 and sword2
svn-id: r34969
-rw-r--r--engines/sword1/sword1.cpp3
-rw-r--r--engines/sword2/sword2.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 7f942f3b2d..2ba59c0f18 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -99,6 +99,7 @@ public:
virtual GameDescriptor findGame(const char *gameid) const;
virtual GameList detectGames(const Common::FSList &fslist) const;
virtual SaveStateList listSaves(const char *target) const;
+ virtual int getMaximumSaveSlot() const;
virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
};
@@ -268,6 +269,8 @@ SaveStateList SwordMetaEngine::listSaves(const char *target) const {
return saveList;
}
+int SwordMetaEngine::getMaximumSaveSlot() const { return 999; }
+
#if PLUGIN_ENABLED_DYNAMIC(SWORD1)
REGISTER_PLUGIN_DYNAMIC(SWORD1, PLUGIN_TYPE_ENGINE, SwordMetaEngine);
#else
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index d8ebbf99d3..e90a95edcf 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -85,6 +85,7 @@ public:
virtual GameDescriptor findGame(const char *gameid) const;
virtual GameList detectGames(const Common::FSList &fslist) const;
virtual SaveStateList listSaves(const char *target) const;
+ virtual int getMaximumSaveSlot() const;
virtual void removeSaveState(const char *target, int slot) const;
virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
@@ -201,6 +202,8 @@ SaveStateList Sword2MetaEngine::listSaves(const char *target) const {
return saveList;
}
+int Sword2MetaEngine::getMaximumSaveSlot() const { return 999; }
+
void Sword2MetaEngine::removeSaveState(const char *target, int slot) const {
char extension[6];
snprintf(extension, sizeof(extension), ".%03d", slot);