From c640d1c604f219a5be5412d6c5ea8a85f44ec4b4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 3 Nov 2007 21:06:58 +0000 Subject: Patch #1825276: "DETECTION: advanced detector engine simplification" svn-id: r29386 --- engines/parallaction/detection.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'engines/parallaction/detection.cpp') diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp index 33da65fba4..ba87b6cee0 100644 --- a/engines/parallaction/detection.cpp +++ b/engines/parallaction/detection.cpp @@ -184,16 +184,16 @@ static const Common::ADParams detectionParams = { Common::kADFlagAugmentPreferredTarget }; -bool engineCreateParallaction(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) { +static bool Engine_PARALLACTION_createInstance(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) { const Parallaction::PARALLACTIONGameDescription *gd = (const Parallaction::PARALLACTIONGameDescription *)(encapsulatedDesc.realDesc); bool res = true; switch (gd->gameType) { case Parallaction::GType_Nippon: - *engine = new Parallaction::Parallaction_ns(syst); + *engine = new Parallaction::Parallaction_ns(syst, gd); break; case Parallaction::GType_BRA: - *engine = new Parallaction::Parallaction_br(syst); + *engine = new Parallaction::Parallaction_br(syst, gd); break; default: res = false; @@ -203,18 +203,6 @@ bool engineCreateParallaction(OSystem *syst, Engine **engine, Common::Encapsulat return res; } -ADVANCED_DETECTOR_DEFINE_PLUGIN_WITH_COMPLEX_CREATION(PARALLACTION, engineCreateParallaction, detectionParams); +ADVANCED_DETECTOR_DEFINE_PLUGIN(PARALLACTION, Engine_PARALLACTION_createInstance, detectionParams); REGISTER_PLUGIN(PARALLACTION, "Parallaction engine", "Nippon Safes Inc. (C) Dynabyte"); - - -namespace Parallaction { - -bool Parallaction::detectGame() { - Common::EncapsulatedADGameDesc encapsulatedDesc = Common::AdvancedDetector::detectBestMatchingGame(detectionParams); - _gameDescription = (const PARALLACTIONGameDescription *)(encapsulatedDesc.realDesc); - - return (_gameDescription != 0); -} - -} // End of namespace Parallaction -- cgit v1.2.3