aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/detection.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2007-11-03 21:06:58 +0000
committerEugene Sandulenko2007-11-03 21:06:58 +0000
commitc640d1c604f219a5be5412d6c5ea8a85f44ec4b4 (patch)
tree5d6efb4954efb93e4d6e2f71a37486a666ee20ce /engines/parallaction/detection.cpp
parentc06905149286c3fbd803d3ca7522bbe66a6ad129 (diff)
downloadscummvm-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/parallaction/detection.cpp')
-rw-r--r--engines/parallaction/detection.cpp20
1 files changed, 4 insertions, 16 deletions
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