Added a getMaximumSaveSlot() implementation for sword1 and sword2

svn-id: r34969
This commit is contained in:
Filippos Karapetis 2008-11-09 19:30:09 +00:00
parent 765e37dc2e
commit 7d8e4ca59b
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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);