aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos/detection.cpp')
-rw-r--r--engines/agos/detection.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index c309ccfecd..83d948322e 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -99,7 +99,22 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget
};
-bool engineCreateAgos(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) {
+class AgosMetaEngine : public AdvancedMetaEngine {
+public:
+ AgosMetaEngine() : AdvancedMetaEngine(detectionParams) {}
+
+ virtual const char *getName() const {
+ return "AGOS";
+ }
+
+ virtual const char *getCopyright() const {
+ return "AGOS (C) Adventure Soft";
+ }
+
+ virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+};
+
+bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
const AGOS::AGOSGameDescription *gd = (const AGOS::AGOSGameDescription *)(encapsulatedDesc.realDesc);
bool res = true;
@@ -136,7 +151,7 @@ bool engineCreateAgos(OSystem *syst, Engine **engine, Common::EncapsulatedADGame
return res;
}
-ADVANCED_DETECTOR_DEFINE_PLUGIN(AGOS, engineCreateAgos, detectionParams);
+META_COMPATIBLITY_WRAPPER(AGOS, AgosMetaEngine);
REGISTER_PLUGIN(AGOS, "AGOS", "AGOS (C) Adventure Soft");