diff options
Diffstat (limited to 'engines/tinsel/detection.cpp')
-rw-r--r-- | engines/tinsel/detection.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index f4fe876290..bf59aae19b 100644 --- a/engines/tinsel/detection.cpp +++ b/engines/tinsel/detection.cpp @@ -29,6 +29,7 @@ #include "common/file.h" #include "tinsel/tinsel.h" +#include "tinsel/savescn.h" // needed by TinselMetaEngine::listSaves namespace Tinsel { @@ -309,13 +310,42 @@ public: } virtual const char *getCopyright() const { + // FIXME: Bad copyright string. + // Should be something like "Tinsel (C) Psygnosis" or so... ??? return "Tinsel Engine"; } virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const; + virtual bool hasFeature(MetaEngineFeature f) const; + virtual SaveStateList listSaves(const char *target) const; }; +bool TinselMetaEngine::hasFeature(MetaEngineFeature f) const { + return + (f == kSupportsListSaves); +} + +namespace Tinsel { +extern int getList(Common::SaveFileManager *saveFileMan, const Common::String &target); +} + +SaveStateList TinselMetaEngine::listSaves(const char *target) const { + int numStates = Tinsel::getList(g_system->getSavefileManager(), target); + + SaveStateList saveList; + for (int i = 0; i < numStates; i++) { + SaveStateDescriptor sd(i, + Tinsel::ListEntry(i, Tinsel::LE_DESC), + Tinsel::ListEntry(i, Tinsel::LE_NAME)); + // TODO: Also add savedFiles[i].dateTime to the SaveStateDescriptor + saveList.push_back(sd); + } + + return saveList; +} + + bool TinselMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const { const Tinsel::TinselGameDescription *gd = (const Tinsel::TinselGameDescription *)desc; if (gd) { |