diff options
author | Max Horn | 2008-02-03 18:56:47 +0000 |
---|---|---|
committer | Max Horn | 2008-02-03 18:56:47 +0000 |
commit | 8a73356a2d6e2d6b7ecefb53e0d5e82484f0e697 (patch) | |
tree | 7a5fbed1f61904961fad43411f65d8e174955f2c /engines | |
parent | 15975bdf7324a8b892562768fe73b6e17816d56f (diff) | |
download | scummvm-rg350-8a73356a2d6e2d6b7ecefb53e0d5e82484f0e697.tar.gz scummvm-rg350-8a73356a2d6e2d6b7ecefb53e0d5e82484f0e697.tar.bz2 scummvm-rg350-8a73356a2d6e2d6b7ecefb53e0d5e82484f0e697.zip |
Revised Engine plugin API to only provide a single func which returns a MetaEngine instance. Used this to simplify the rest of the plugin system
svn-id: r30780
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/detection.cpp | 4 | ||||
-rw-r--r-- | engines/agos/detection.cpp | 4 | ||||
-rw-r--r-- | engines/cine/detection.cpp | 4 | ||||
-rw-r--r-- | engines/cruise/detection.cpp | 4 | ||||
-rw-r--r-- | engines/drascula/detection.cpp | 4 | ||||
-rw-r--r-- | engines/gob/detection.cpp | 4 | ||||
-rw-r--r-- | engines/igor/detection.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/detection.cpp | 4 | ||||
-rw-r--r-- | engines/lure/detection.cpp | 4 | ||||
-rw-r--r-- | engines/metaengine.h | 21 | ||||
-rw-r--r-- | engines/parallaction/detection.cpp | 4 | ||||
-rw-r--r-- | engines/queen/queen.cpp | 4 | ||||
-rw-r--r-- | engines/saga/detection.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/detection.cpp | 6 | ||||
-rw-r--r-- | engines/sky/sky.cpp | 5 | ||||
-rw-r--r-- | engines/sword1/sword1.cpp | 4 | ||||
-rw-r--r-- | engines/sword2/sword2.cpp | 4 | ||||
-rw-r--r-- | engines/touche/detection.cpp | 4 |
18 files changed, 17 insertions, 75 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index f9d42633af..6a9479c7c5 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -2284,7 +2284,5 @@ bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common: return res; } -META_COMPATIBILITY_WRAPPER(AGI, AgiMetaEngine); - -REGISTER_PLUGIN(AGI, "AGI preAGI + v2 + v3 Engine", "Sierra AGI Engine (C) Sierra On-Line Software"); +REGISTER_PLUGIN(AGI, AgiMetaEngine); diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp index 74ce517f59..73106b65d5 100644 --- a/engines/agos/detection.cpp +++ b/engines/agos/detection.cpp @@ -151,9 +151,7 @@ bool AgosMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common return res; } -META_COMPATIBILITY_WRAPPER(AGOS, AgosMetaEngine); - -REGISTER_PLUGIN(AGOS, "AGOS", "AGOS (C) Adventure Soft"); +REGISTER_PLUGIN(AGOS, AgosMetaEngine); namespace AGOS { diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp index fd1769e6b8..af59a106f5 100644 --- a/engines/cine/detection.cpp +++ b/engines/cine/detection.cpp @@ -511,6 +511,4 @@ bool CineMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common return gd != 0; } -META_COMPATIBILITY_WRAPPER(CINE, CineMetaEngine); - -REGISTER_PLUGIN(CINE, "Cinematique evo 1 engine", "Future Wars & Operation Stealth (C) Delphine Software"); +REGISTER_PLUGIN(CINE, CineMetaEngine); diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp index 2758867c35..a6e3e909c2 100644 --- a/engines/cruise/detection.cpp +++ b/engines/cruise/detection.cpp @@ -146,6 +146,4 @@ bool CruiseMetaEngine::createInstance(OSystem *syst, Engine **engine, const Comm return gd != 0; } -META_COMPATIBILITY_WRAPPER(CRUISE, CruiseMetaEngine); - -REGISTER_PLUGIN(CRUISE, "Cinematique evo 2 engine", "Cruise for a Corpse (C) Delphine Software"); +REGISTER_PLUGIN(CRUISE, CruiseMetaEngine); diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 484869ecaa..63fb6c92ad 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -186,6 +186,4 @@ bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Co return gd != 0; } -META_COMPATIBILITY_WRAPPER(DRASCULA, DrasculaMetaEngine); - -REGISTER_PLUGIN(DRASCULA, "Drascula Engine", "Drascula Engine (C) 2000 Alcachofa Soft, 1996 (C) Digital Dreams Multimedia, 1994 (C) Emilio de Paz"); +REGISTER_PLUGIN(DRASCULA, DrasculaMetaEngine); diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index a752523bde..b9ba12d224 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -1779,9 +1779,7 @@ bool GobMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common: return gd != 0; } -META_COMPATIBILITY_WRAPPER(GOB, GobMetaEngine); - -REGISTER_PLUGIN(GOB, "Gob Engine", "Goblins Games (C) Coktel Vision"); +REGISTER_PLUGIN(GOB, GobMetaEngine); namespace Gob { diff --git a/engines/igor/detection.cpp b/engines/igor/detection.cpp index 6f16e2f30a..dcfc40bcd5 100644 --- a/engines/igor/detection.cpp +++ b/engines/igor/detection.cpp @@ -134,6 +134,4 @@ bool IgorMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common return gd != 0; } -META_COMPATIBILITY_WRAPPER(IGOR, IgorMetaEngine); - -REGISTER_PLUGIN(IGOR, "Igor: Objective Uikokahonia", "Igor: Objective Uikokahonia (C) Pendulo Studios"); +REGISTER_PLUGIN(IGOR, IgorMetaEngine); diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index a1bb7c5656..a1556d6e26 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -484,6 +484,4 @@ bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common return res; } -META_COMPATIBILITY_WRAPPER(KYRA, KyraMetaEngine); - -REGISTER_PLUGIN(KYRA, "Legend of Kyrandia Engine", "The Legend of Kyrandia (C) Westwood Studios"); +REGISTER_PLUGIN(KYRA, KyraMetaEngine); diff --git a/engines/lure/detection.cpp b/engines/lure/detection.cpp index 0933054161..66d0c329e8 100644 --- a/engines/lure/detection.cpp +++ b/engines/lure/detection.cpp @@ -197,6 +197,4 @@ bool LureMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common return gd != 0; } -META_COMPATIBILITY_WRAPPER(LURE, LureMetaEngine); - -REGISTER_PLUGIN(LURE, "Lure of the Temptress Engine", "Lure of the Temptress (C) Revolution"); +REGISTER_PLUGIN(LURE, LureMetaEngine); diff --git a/engines/metaengine.h b/engines/metaengine.h index 600968331d..b0b71de126 100644 --- a/engines/metaengine.h +++ b/engines/metaengine.h @@ -57,25 +57,4 @@ public: virtual PluginError createInstance(OSystem *syst, Engine **engine) const = 0; }; - -/** - * The META_COMPATIBILITY_WRAPPER macro is there to ease the transition from the - * old plugin API to the new MetaEngine class. Ultimately, this macro will go - * and REGISTER_PLUGIN will be changed to simply take an ID and a METACLASS. - * Until then, use META_COMPATIBILITY_WRAPPER + REGISTER_PLUGIN. - */ -#define META_COMPATIBILITY_WRAPPER(ID,METACLASS) \ - static MetaEngine &getMetaEngine() { \ - static MetaEngine *meta = 0; \ - if (!meta) meta = new METACLASS(); \ - return *meta; \ - } \ - GameList Engine_##ID##_gameIDList() { return getMetaEngine().getSupportedGames(); } \ - GameDescriptor Engine_##ID##_findGameID(const char *gameid) { return getMetaEngine().findGame(gameid); } \ - PluginError Engine_##ID##_create(OSystem *syst, Engine **engine) { return getMetaEngine().createInstance(syst, engine); } \ - GameList Engine_##ID##_detectGames(const FSList &fslist) { return getMetaEngine().detectGames(fslist); } \ - void dummyFuncToAllowTrailingSemicolon() - - - #endif diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp index b435f8f187..90a46fdc0a 100644 --- a/engines/parallaction/detection.cpp +++ b/engines/parallaction/detection.cpp @@ -218,6 +218,4 @@ bool ParallactionMetaEngine::createInstance(OSystem *syst, Engine **engine, cons return res; } -META_COMPATIBILITY_WRAPPER(PARALLACTION, ParallactionMetaEngine); - -REGISTER_PLUGIN(PARALLACTION, "Parallaction engine", "Nippon Safes Inc. (C) Dynabyte"); +REGISTER_PLUGIN(PARALLACTION, ParallactionMetaEngine); diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index fd1c50abe9..db8e9a94ce 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -127,9 +127,7 @@ PluginError QueenMetaEngine::createInstance(OSystem *syst, Engine **engine) cons return kNoError; } -META_COMPATIBILITY_WRAPPER(QUEEN, QueenMetaEngine); - -REGISTER_PLUGIN(QUEEN, "Flight of the Amazon Queen", "Flight of the Amazon Queen (C) John Passfield and Steve Stamatiadis"); +REGISTER_PLUGIN(QUEEN, QueenMetaEngine); namespace Queen { diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index be5c018fbb..3838fd1d9e 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -164,9 +164,7 @@ bool SagaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common return gd != 0; } -META_COMPATIBILITY_WRAPPER(SAGA, SagaMetaEngine); - -REGISTER_PLUGIN(SAGA, "SAGA Engine", "Inherit the Earth (C) Wyrmkeep Entertainment"); +REGISTER_PLUGIN(SAGA, SagaMetaEngine); namespace Saga { diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index d2c889b968..b1f14acc61 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -928,8 +928,4 @@ const char *ScummMetaEngine::getCopyright() const { "Humongous SCUMM Games (C) Humongous"; } -META_COMPATIBILITY_WRAPPER(SCUMM, ScummMetaEngine); - -REGISTER_PLUGIN(SCUMM, "Scumm Engine", - "LucasArts SCUMM Games (C) LucasArts\n" - "Humongous SCUMM Games (C) Humongous" ); +REGISTER_PLUGIN(SCUMM, ScummMetaEngine); diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 266faa2c80..6d8c4d36f7 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -194,10 +194,7 @@ PluginError SkyMetaEngine::createInstance(OSystem *syst, Engine **engine) const return kNoError; } -META_COMPATIBILITY_WRAPPER(SKY, SkyMetaEngine); - -REGISTER_PLUGIN(SKY, "Beneath a Steel Sky", "Beneath a Steel Sky (C) Revolution"); - +REGISTER_PLUGIN(SKY, SkyMetaEngine); namespace Sky { diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 4d99868d98..60559424c5 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -187,9 +187,7 @@ PluginError SwordMetaEngine::createInstance(OSystem *syst, Engine **engine) cons return kNoError; } -META_COMPATIBILITY_WRAPPER(SWORD1, SwordMetaEngine); - -REGISTER_PLUGIN(SWORD1, "Broken Sword", "Broken Sword Games (C) Revolution"); +REGISTER_PLUGIN(SWORD1, SwordMetaEngine); namespace Sword1 { diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index 8e9b69db5c..29530529e8 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -180,9 +180,7 @@ PluginError Sword2MetaEngine::createInstance(OSystem *syst, Engine **engine) con return kNoGameDataFoundError; } -META_COMPATIBILITY_WRAPPER(SWORD2, Sword2MetaEngine); - -REGISTER_PLUGIN(SWORD2, "Broken Sword 2", "Broken Sword Games (C) Revolution"); +REGISTER_PLUGIN(SWORD2, Sword2MetaEngine); namespace Sword2 { diff --git a/engines/touche/detection.cpp b/engines/touche/detection.cpp index 8d3d88fb7c..828fb43c6d 100644 --- a/engines/touche/detection.cpp +++ b/engines/touche/detection.cpp @@ -147,6 +147,4 @@ bool ToucheMetaEngine::createInstance(OSystem *syst, Engine **engine, const Comm return gd != 0; } -META_COMPATIBILITY_WRAPPER(TOUCHE, ToucheMetaEngine); - -REGISTER_PLUGIN(TOUCHE, "Touche Engine", "Touche: The Adventures of the 5th Musketeer (C) Clipper Software"); +REGISTER_PLUGIN(TOUCHE, ToucheMetaEngine); |