[Scummvm-cvs-logs] SF.net SVN: scummvm: [30727] scummvm/trunk/engines/parallaction/detection. cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Feb 2 01:56:03 CET 2008


Revision: 30727
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30727&view=rev
Author:   fingolfin
Date:     2008-02-01 16:56:02 -0800 (Fri, 01 Feb 2008)

Log Message:
-----------
Converted parallaction engine to use MetaEngine

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/detection.cpp

Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp	2008-02-02 00:54:52 UTC (rev 30726)
+++ scummvm/trunk/engines/parallaction/detection.cpp	2008-02-02 00:56:02 UTC (rev 30727)
@@ -184,7 +184,21 @@
 	Common::kADFlagAugmentPreferredTarget
 };
 
-static bool Engine_PARALLACTION_createInstance(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) {
+class ParallactionMetaEngine : public AdvancedMetaEngine {
+public:
+	ParallactionMetaEngine() : AdvancedMetaEngine(detectionParams) {}
+
+	virtual const char *getName() const {
+		return "Parallaction engine";
+	}
+	virtual const char *getCopyright() const {
+		return "Nippon Safes Inc. (C) Dynabyte";
+	}
+
+	virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+};
+
+bool ParallactionMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
 	const Parallaction::PARALLACTIONGameDescription *gd = (const Parallaction::PARALLACTIONGameDescription *)(encapsulatedDesc.realDesc);
 	bool res = true;
 
@@ -203,6 +217,6 @@
 	return res;
 }
 
-ADVANCED_DETECTOR_DEFINE_PLUGIN(PARALLACTION, Engine_PARALLACTION_createInstance, detectionParams);
+META_COMPATIBLITY_WRAPPER(PARALLACTION, ParallactionMetaEngine);
 
 REGISTER_PLUGIN(PARALLACTION, "Parallaction engine", "Nippon Safes Inc. (C) Dynabyte");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list