aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorJordi Vilalta Prat2008-02-02 02:35:13 +0000
committerJordi Vilalta Prat2008-02-02 02:35:13 +0000
commit5165ff448d2329e3a27948fd73821f314eeb520d (patch)
tree620819d618796744f3917d70c6d484b07debd266 /engines/cruise
parentec715ea1ecc7ee0d85ed298f75ce0404d10d622b (diff)
downloadscummvm-rg350-5165ff448d2329e3a27948fd73821f314eeb520d.tar.gz
scummvm-rg350-5165ff448d2329e3a27948fd73821f314eeb520d.tar.bz2
scummvm-rg350-5165ff448d2329e3a27948fd73821f314eeb520d.zip
Converted the remaining engines to use MetaEngine
svn-id: r30728
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/detection.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp
index c1f6d1e377..641a570f91 100644
--- a/engines/cruise/detection.cpp
+++ b/engines/cruise/detection.cpp
@@ -123,7 +123,22 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget
};
-static bool Engine_CRUISE_createInstance(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) {
+class CruiseMetaEngine : public AdvancedMetaEngine {
+public:
+ CruiseMetaEngine() : AdvancedMetaEngine(detectionParams) {}
+
+ virtual const char *getName() const {
+ return "Cinematique evo 2 engine";
+ }
+
+ virtual const char *getCopyright() const {
+ return "Cruise for a Corpse (C) Delphine Software";
+ }
+
+ virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+};
+
+bool CruiseMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
const Cruise::CRUISEGameDescription *gd = (const Cruise::CRUISEGameDescription *)(encapsulatedDesc.realDesc);
if (gd) {
*engine = new Cruise::CruiseEngine(syst, gd);
@@ -131,6 +146,6 @@ static bool Engine_CRUISE_createInstance(OSystem *syst, Engine **engine, Common:
return gd != 0;
}
-ADVANCED_DETECTOR_DEFINE_PLUGIN(CRUISE, Engine_CRUISE_createInstance, detectionParams);
+META_COMPATIBLITY_WRAPPER(CRUISE, CruiseMetaEngine);
REGISTER_PLUGIN(CRUISE, "Cinematique evo 2 engine", "Cruise for a Corpse (C) Delphine Software");