diff options
Diffstat (limited to 'engines/agos/detection.cpp')
-rw-r--r-- | engines/agos/detection.cpp | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp index 12f281d0dc..26d8916ab7 100644 --- a/engines/agos/detection.cpp +++ b/engines/agos/detection.cpp @@ -27,7 +27,6 @@ #include "common/advancedDetector.h" #include "common/config-manager.h" -#include "common/savefile.h" #include "agos/agos.h" @@ -101,7 +100,7 @@ static const Common::ADParams detectionParams = { class AgosMetaEngine : public Common::AdvancedMetaEngine { public: AgosMetaEngine() : Common::AdvancedMetaEngine(detectionParams) {} - + virtual const char *getName() const { return "AGOS"; } @@ -109,18 +108,10 @@ public: virtual const char *getCopyright() const { return "AGOS (C) Adventure Soft"; } - - 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; }; -bool AgosMetaEngine::hasFeature(MetaEngineFeature f) const { - return - (f == kSupportsRTL) || - (f == kSupportsListSaves); -} - bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const { const AGOS::AGOSGameDescription *gd = (const AGOS::AGOSGameDescription *)desc; bool res = true; @@ -158,34 +149,6 @@ bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common return res; } -SaveStateList AgosMetaEngine::listSaves(const char *target) const { - Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); - Common::StringList filenames; - Common::String saveDesc; - Common::String pattern = target; - pattern += ".???"; - - filenames = saveFileMan->listSavefiles(pattern.c_str()); - sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) - - SaveStateList saveList; - for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++) { - // Obtain the last 3 digits of the filename, since they correspond to the save slot - int slotNum = atoi(file->c_str() + file->size() - 3); - - if (slotNum >= 0 && slotNum <= 999) { - Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); - if (in) { - saveDesc = file->c_str(); - saveList.push_back(SaveStateDescriptor(slotNum, saveDesc, *file)); - delete in; - } - } - } - - return saveList; -} - #if PLUGIN_ENABLED_DYNAMIC(AGOS) REGISTER_PLUGIN_DYNAMIC(AGOS, PLUGIN_TYPE_ENGINE, AgosMetaEngine); #else |