aboutsummaryrefslogtreecommitdiff
path: root/engines/touche
diff options
context:
space:
mode:
authorMax Horn2008-02-02 00:54:52 +0000
committerMax Horn2008-02-02 00:54:52 +0000
commitdc979b03cf915ab10a6cf76bdb22f1f95b12612e (patch)
tree15a50ca3f6991733dcbe1dcaed63ee1f17f8e6ed /engines/touche
parent249877fa82e6af59e6084bb3fa92cda49fb281aa (diff)
downloadscummvm-rg350-dc979b03cf915ab10a6cf76bdb22f1f95b12612e.tar.gz
scummvm-rg350-dc979b03cf915ab10a6cf76bdb22f1f95b12612e.tar.bz2
scummvm-rg350-dc979b03cf915ab10a6cf76bdb22f1f95b12612e.zip
New MetaEngine class (work in progress to replace the current Engine plugin API with a more object oriented approach)
svn-id: r30726
Diffstat (limited to 'engines/touche')
-rw-r--r--engines/touche/detection.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp
index 41b2062ffc..d6ba2d0667 100644
--- a/engines/touche/detection.cpp
+++ b/engines/touche/detection.cpp
@@ -124,7 +124,22 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget | Common::kADFlagPrintWarningOnFileBasedFallback
};
-static bool Engine_TOUCHE_createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) {
+class ToucheMetaEngine : public AdvancedMetaEngine {
+public:
+ ToucheMetaEngine() : AdvancedMetaEngine(detectionParams) {}
+
+ virtual const char *getName() const {
+ return "Touche Engine";
+ }
+ virtual const char *getCopyright() const {
+ return "Touche: The Adventures of the 5th Musketeer (C) Clipper Software";
+ }
+
+ virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+};
+
+
+bool ToucheMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
const Common::ADGameDescription *gd = encapsulatedDesc.realDesc;
if (gd) {
*engine = new Touche::ToucheEngine(syst, gd->language);
@@ -132,6 +147,6 @@ static bool Engine_TOUCHE_createInstance(OSystem *syst, Engine **engine, const C
return gd != 0;
}
-ADVANCED_DETECTOR_DEFINE_PLUGIN(TOUCHE, Engine_TOUCHE_createInstance, detectionParams);
+META_COMPATIBLITY_WRAPPER(TOUCHE, ToucheMetaEngine);
REGISTER_PLUGIN(TOUCHE, "Touche Engine", "Touche: The Adventures of the 5th Musketeer (C) Clipper Software");