diff options
author | Max Horn | 2011-06-10 15:53:56 +0200 |
---|---|---|
committer | Max Horn | 2011-06-10 22:15:45 +0200 |
commit | ce1a8576694ede9434d4e44babc4dead9f6b44d7 (patch) | |
tree | 1a2c715417c60e639f40a12a754f06f3926e7188 /engines/tinsel | |
parent | 3c0c14b4b50d253d8f318335c8fa99cfbb3e013b (diff) | |
download | scummvm-rg350-ce1a8576694ede9434d4e44babc4dead9f6b44d7.tar.gz scummvm-rg350-ce1a8576694ede9434d4e44babc4dead9f6b44d7.tar.bz2 scummvm-rg350-ce1a8576694ede9434d4e44babc4dead9f6b44d7.zip |
TINSEL: Switch to alternate AdvancedMetaEngine, avoid ADParams
Diffstat (limited to 'engines/tinsel')
-rw-r--r-- | engines/tinsel/detection.cpp | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index 0d283f2ceb..59a567bc63 100644 --- a/engines/tinsel/detection.cpp +++ b/engines/tinsel/detection.cpp @@ -74,34 +74,11 @@ static const PlainGameDescriptor tinselGames[] = { #include "tinsel/detection_tables.h" -static const ADParams detectionParams = { - // Pointer to ADGameDescription or its superset structure - (const byte *)Tinsel::gameDescriptions, - // Size of that superset structure - sizeof(Tinsel::TinselGameDescription), - // Number of bytes to compute MD5 sum for - 5000, - // List of all engine gameid - tinselGames, - // Structure for autoupgrading obsolete gameids - 0, - // Name of single gameid (optional) - "tinsel", - // List of files for file-based fallback detection (optional) - 0, - // Flags - 0, - // Additional GUI options (for every game} - Common::GUIO_NONE, - // Maximum directory depth - 1, - // List of directory globs - 0 -}; - class TinselMetaEngine : public AdvancedMetaEngine { public: - TinselMetaEngine() : AdvancedMetaEngine(detectionParams) {} + TinselMetaEngine() : AdvancedMetaEngine(Tinsel::gameDescriptions, sizeof(Tinsel::TinselGameDescription), tinselGames) { + params.singleid = "tinsel"; + } virtual const char *getName() const { return "Tinsel"; @@ -265,7 +242,7 @@ const ADGameDescription *TinselMetaEngine::fallbackDetect(const Common::FSList & if (testFile.open(allFiles[fname])) { tmp.size = (int32)testFile.size(); - tmp.md5 = computeStreamMD5AsString(testFile, detectionParams.md5Bytes); + tmp.md5 = computeStreamMD5AsString(testFile, params.md5Bytes); } else { tmp.size = -1; } @@ -285,7 +262,7 @@ const ADGameDescription *TinselMetaEngine::fallbackDetect(const Common::FSList & bool fileMissing = false; - if ((detectionParams.flags & kADFlagUseExtraAsHint) && !extra.empty() && g->desc.extra != extra) + if ((params.flags & kADFlagUseExtraAsHint) && !extra.empty() && g->desc.extra != extra) continue; bool allFilesPresent = true; |