aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
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/saga
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/saga')
-rw-r--r--engines/saga/detection.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index 74acdf0743..9d88eb9d29 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -141,7 +141,22 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget
};
-static bool Engine_SAGA_createInstance(OSystem *syst, Engine **engine, Common::EncapsulatedADGameDesc encapsulatedDesc) {
+class SagaMetaEngine : public AdvancedMetaEngine {
+public:
+ SagaMetaEngine() : AdvancedMetaEngine(detectionParams) {}
+
+ virtual const char *getName() const {
+ return "Saga engine";
+ }
+
+ virtual const char *getCopyright() const {
+ return "Inherit the Earth (C) Wyrmkeep Entertainment";
+ }
+
+ virtual bool createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const;
+};
+
+bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::EncapsulatedADGameDesc &encapsulatedDesc) const {
const Saga::SAGAGameDescription *gd = (const Saga::SAGAGameDescription *)(encapsulatedDesc.realDesc);
if (gd) {
*engine = new Saga::SagaEngine(syst, gd);
@@ -149,7 +164,7 @@ static bool Engine_SAGA_createInstance(OSystem *syst, Engine **engine, Common::E
return gd != 0;
}
-ADVANCED_DETECTOR_DEFINE_PLUGIN(SAGA, Engine_SAGA_createInstance, detectionParams);
+META_COMPATIBLITY_WRAPPER(SAGA, SagaMetaEngine);
REGISTER_PLUGIN(SAGA, "SAGA Engine", "Inherit the Earth (C) Wyrmkeep Entertainment");