diff options
Diffstat (limited to 'engines/toon/detection.cpp')
-rw-r--r-- | engines/toon/detection.cpp | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp index 1056f6ec0d..810a37720a 100644 --- a/engines/toon/detection.cpp +++ b/engines/toon/detection.cpp @@ -28,7 +28,7 @@ #include "graphics/thumbnail.h" #include "toon/toon.h" -static const PlainGameDescriptor ToonGames[] = { +static const PlainGameDescriptor toonGames[] = { { "toon", "Toonstruck" }, { 0, 0 } }; @@ -117,34 +117,17 @@ static const char * const directoryGlobs[] = { 0 }; -static const ADParams detectionParams = { - // Pointer to ADGameDescription or its superset structure - (const byte *)Toon::gameDescriptions, - // Size of that superset structure - sizeof(ADGameDescription), - // Number of bytes to compute MD5 sum for - 5000, - // List of all engine targets - ToonGames, - // Structure for autoupgrading obsolete targets - 0, - // Name of single gameid (optional) - "toon", - // List of files for file-based fallback detection (optional) - Toon::fileBasedFallback, - // Flags - 0, - // Additional GUI options (for every game} - Common::GUIO_NONE, - // Maximum directory depth - 3, - // List of directory globs - directoryGlobs -}; - class ToonMetaEngine : public AdvancedMetaEngine { public: - ToonMetaEngine() : AdvancedMetaEngine(detectionParams) {} + ToonMetaEngine() : AdvancedMetaEngine(Toon::gameDescriptions, sizeof(ADGameDescription), toonGames) { + _singleid = "toon"; + _maxScanDepth = 3; + _directoryGlobs = directoryGlobs; + } + + virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { + return detectGameFilebased(allFiles, Toon::fileBasedFallback); + } virtual const char *getName() const { return "Toon"; |