From 5165ff448d2329e3a27948fd73821f314eeb520d Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Sat, 2 Feb 2008 02:35:13 +0000 Subject: Converted the remaining engines to use MetaEngine svn-id: r30728 --- engines/kyra/detection.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'engines/kyra/detection.cpp') diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 84bac1a182..a566e41816 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -430,7 +430,22 @@ const Common::ADParams detectionParams = { } // End of anonymous namespace -bool engineCreateKyra(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) { +class KyraMetaEngine : public AdvancedMetaEngine { +public: + KyraMetaEngine() : AdvancedMetaEngine(detectionParams) {} + + virtual const char *getName() const { + return "Legend of Kyrandia Engine"; + } + + virtual const char *getCopyright() const { + return "The Legend of Kyrandia (C) Westwood Studios"; + } + + virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const; +}; + +bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const { const KYRAGameDescription *gd = (const KYRAGameDescription *)(encapsulatedDesc.realDesc); bool res = true; @@ -469,8 +484,6 @@ bool engineCreateKyra(OSystem *syst, Engine **engine, Common::EncapsulatedADGame return res; } -ADVANCED_DETECTOR_DEFINE_PLUGIN(KYRA, engineCreateKyra, detectionParams); +META_COMPATIBLITY_WRAPPER(KYRA, KyraMetaEngine); REGISTER_PLUGIN(KYRA, "Legend of Kyrandia Engine", "The Legend of Kyrandia (C) Westwood Studios"); - - -- cgit v1.2.3