diff options
author | uruk | 2014-06-28 23:44:48 +0200 |
---|---|---|
committer | uruk | 2014-06-28 23:44:48 +0200 |
commit | 160212c8e3219b28968ad653a0d730223b338a38 (patch) | |
tree | 98a5839ddd95971f94b1a263e1ad2b3bb7f78419 /engines | |
parent | 2f80cf6faf10e6e10728a19a72c414587b14cd26 (diff) | |
download | scummvm-rg350-160212c8e3219b28968ad653a0d730223b338a38.tar.gz scummvm-rg350-160212c8e3219b28968ad653a0d730223b338a38.tar.bz2 scummvm-rg350-160212c8e3219b28968ad653a0d730223b338a38.zip |
CGE2: Add fallback detection for the currently WIP English translation.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge2/detection.cpp | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/engines/cge2/detection.cpp b/engines/cge2/detection.cpp index e417a13853..cbe78dae4f 100644 --- a/engines/cge2/detection.cpp +++ b/engines/cge2/detection.cpp @@ -45,15 +45,6 @@ static const ADGameDescription gameDescriptions[] = { }, Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0() }, - { - "sfinx", "Sfinx English Alfa v0.1", - { - {"vol.cat", 0, "41a61030468e33828f3531fd53ef0319", 129024}, - {"vol.dat", 0, "978ebe56442c111d193fdb4d960cc58d", 34382498}, - AD_LISTEND - }, - Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0() - }, AD_TABLE_END_MARKER }; @@ -73,6 +64,8 @@ public: virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; virtual bool hasFeature(MetaEngineFeature f) const; + + const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const; }; bool CGE2MetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { @@ -86,6 +79,32 @@ bool CGE2MetaEngine::hasFeature(MetaEngineFeature f) const { return false; } +const ADGameDescription *CGE2MetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { + static ADGameDescription desc; + + for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { + if (file->isDirectory()) { + continue; + } + if (file->getName().equalsIgnoreCase("lang.eng")) { + Common::File dataFile; + if (!dataFile.open(*file)) { + continue; + } + + desc.gameid = "sfinx"; + desc.extra = "Sfinx English Alfa v0.1"; + desc.language = Common::EN_ANY; + desc.platform = Common::kPlatformDOS; + desc.flags = ADGF_NO_FLAGS; + desc.guioptions = GUIO0(); + + return (const ADGameDescription *)&desc; + } + } + return 0; +} + } // End of namespace CGE2 #if PLUGIN_ENABLED_DYNAMIC(CGE2) |