diff options
author | Eugene Sandulenko | 2007-11-03 21:06:58 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-11-03 21:06:58 +0000 |
commit | c640d1c604f219a5be5412d6c5ea8a85f44ec4b4 (patch) | |
tree | 5d6efb4954efb93e4d6e2f71a37486a666ee20ce /engines/cruise/detection.cpp | |
parent | c06905149286c3fbd803d3ca7522bbe66a6ad129 (diff) | |
download | scummvm-rg350-c640d1c604f219a5be5412d6c5ea8a85f44ec4b4.tar.gz scummvm-rg350-c640d1c604f219a5be5412d6c5ea8a85f44ec4b4.tar.bz2 scummvm-rg350-c640d1c604f219a5be5412d6c5ea8a85f44ec4b4.zip |
Patch #1825276: "DETECTION: advanced detector engine simplification"
svn-id: r29386
Diffstat (limited to 'engines/cruise/detection.cpp')
-rw-r--r-- | engines/cruise/detection.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp index 8307a483ad..1c311dc39d 100644 --- a/engines/cruise/detection.cpp +++ b/engines/cruise/detection.cpp @@ -111,17 +111,14 @@ static const Common::ADParams detectionParams = { Common::kADFlagAugmentPreferredTarget }; -ADVANCED_DETECTOR_DEFINE_PLUGIN(CRUISE, Cruise::CruiseEngine, detectionParams); - -REGISTER_PLUGIN(CRUISE, "Cinematique evo 2 engine", "Cruise for a Corpse (C) Delphine Software"); - -namespace Cruise { - -bool CruiseEngine::initGame() { - Common::EncapsulatedADGameDesc encapsulatedDesc = Common::AdvancedDetector::detectBestMatchingGame(detectionParams); - _gameDescription = (const CRUISEGameDescription *)(encapsulatedDesc.realDesc); - - return (_gameDescription != 0); +static bool Engine_CRUISE_createInstance(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) { + const Cruise::CRUISEGameDescription *gd = (const Cruise::CRUISEGameDescription *)(encapsulatedDesc.realDesc); + if (gd) { + *engine = new Cruise::CruiseEngine(syst, gd); + } + return gd != 0; } -} // End of namespace Cruise +ADVANCED_DETECTOR_DEFINE_PLUGIN(CRUISE, Engine_CRUISE_createInstance, detectionParams); + +REGISTER_PLUGIN(CRUISE, "Cinematique evo 2 engine", "Cruise for a Corpse (C) Delphine Software"); |