diff options
Diffstat (limited to 'engines/agi/detection.cpp')
-rw-r--r-- | engines/agi/detection.cpp | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 6b65526226..cd6942f9c0 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -2122,22 +2122,11 @@ public: return "Sierra AGI Engine (C) Sierra On-Line Software"; } - 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; - + const Common::ADGameDescription *fallbackDetect(const FSList *fslist) const; }; -bool AgiMetaEngine::hasFeature(MetaEngineFeature f) const { - return - (f == kSupportsRTL) || - (f == kSupportsListSaves) || - (f == kSupportsDirectLoad) || - (f == kSupportsDeleteSave); -} - - bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const { const Agi::AGIGameDescription *gd = (const Agi::AGIGameDescription *)desc; bool res = true; @@ -2158,37 +2147,6 @@ bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common: return res; } -SaveStateList AgiMetaEngine::listSaves(const char *target) const { - const uint32 AGIflag = MKID_BE('AGI:'); - Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); - Common::StringList filenames; - char saveDesc[31]; - 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) { - uint32 type = in->readUint32BE(); - if (type == AGIflag) - in->read(saveDesc, 31); - saveList.push_back(SaveStateDescriptor(slotNum, Common::String(saveDesc), *file)); - delete in; - } - } - } - - return saveList; -} - const Common::ADGameDescription *AgiMetaEngine::fallbackDetect(const FSList *fslist) const { typedef Common::HashMap<Common::String, int32> IntMap; IntMap allFiles; |