Skip to content

Commit

Permalink
M4: 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 3491bf5 commit dec7df0
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions engines/m4/detection.cpp
Expand Up @@ -384,34 +384,14 @@ static const char *directoryGlobs[] = {
0
};

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

class M4MetaEngine : public AdvancedMetaEngine {
public:
M4MetaEngine() : AdvancedMetaEngine(detectionParams) {}
M4MetaEngine() : AdvancedMetaEngine(M4::gameDescriptions, sizeof(M4::M4GameDescription), m4Games) {
params.singleid = "m4";
params.guioptions = Common::GUIO_NOMIDI;
params.depth = 2;
params.directoryGlobs = directoryGlobs;
}

virtual const char *getName() const {
return "MADS/M4";
Expand Down

0 comments on commit dec7df0

Please sign in to comment.