Skip to content

Commit

Permalink
TOUCHE: Switch to alternate AdvancedMetaEngine, avoid ADParams
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jun 10, 2011
1 parent 5e90393 commit 3b66109
Showing 1 changed file with 8 additions and 27 deletions.
35 changes: 8 additions & 27 deletions engines/touche/detection.cpp
Expand Up @@ -126,35 +126,16 @@ static const char *directoryGlobs[] = {
0
};

static const ADParams detectionParams = {
// Pointer to ADGameDescription or its superset structure
(const byte *)Touche::gameDescriptions,
// Size of that superset structure
sizeof(ADGameDescription),
// Number of bytes to compute MD5 sum for
4096,
// List of all engine gameid
toucheGames,
// Structure for autoupgrading obsolete gameids
0,
// Name of single gameid (optional)
"touche",
// List of files for file-based fallback detection (optional)
Touche::fileBasedFallback,
// Flags
kADFlagPrintWarningOnFileBasedFallback,
// Additional GUI options (for every game}
Common::GUIO_NONE,
// Maximum directory depth
2,
// List of directory globs
directoryGlobs
};

class ToucheMetaEngine : public AdvancedMetaEngine {
public:
ToucheMetaEngine() : AdvancedMetaEngine(detectionParams) {}

ToucheMetaEngine() : AdvancedMetaEngine(Touche::gameDescriptions, sizeof(ADGameDescription), toucheGames) {
params.md5Bytes = 4096;
params.singleid = "touche";
params.fileBasedFallback = Touche::fileBasedFallback;
params.flags = kADFlagPrintWarningOnFileBasedFallback;
params.depth = 2;
params.directoryGlobs = directoryGlobs;
}
virtual const char *getName() const {
return "Touche";
}
Expand Down

0 comments on commit 3b66109

Please sign in to comment.