diff options
author | Jordi Vilalta Prat | 2008-02-03 09:39:26 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2008-02-03 09:39:26 +0000 |
commit | c070f0d04f72fd0274b8d2048ea2f3a656c4a0f4 (patch) | |
tree | 6d199a465abbed985441c8d24d8cc6eff8a4cded /engines/queen | |
parent | 53ef575dbacdedc021579a9d200396fd68326824 (diff) | |
download | scummvm-rg350-c070f0d04f72fd0274b8d2048ea2f3a656c4a0f4.tar.gz scummvm-rg350-c070f0d04f72fd0274b8d2048ea2f3a656c4a0f4.tar.bz2 scummvm-rg350-c070f0d04f72fd0274b8d2048ea2f3a656c4a0f4.zip |
Converted queen and sky to use MetaEngine (forgot them because they don't use the AdvancedDetector).
svn-id: r30752
Diffstat (limited to 'engines/queen')
-rw-r--r-- | engines/queen/queen.cpp | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index 499a17bd12..7522ac238b 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -49,24 +49,47 @@ #include "queen/talk.h" #include "queen/walk.h" +#include "engines/metaengine.h" + static const PlainGameDescriptor queenGameDescriptor = { "queen", "Flight of the Amazon Queen" }; -GameList Engine_QUEEN_gameIDList() { +class QueenMetaEngine : public MetaEngine { +public: + virtual const char *getName() const; + virtual const char *getCopyright() const; +// virtual int getVersion() const { return 0; } // TODO! + + virtual GameList getSupportedGames() const; + virtual GameDescriptor findGame(const char *gameid) const; + virtual GameList detectGames(const FSList &fslist) const; + + virtual PluginError createInstance(OSystem *syst, Engine **engine) const; +}; + +const char *QueenMetaEngine::getName() const { + return "Flight of the Amazon Queen"; +} + +const char *QueenMetaEngine::getCopyright() const { + return "Flight of the Amazon Queen (C) John Passfield and Steve Stamatiadis"; +} + +GameList QueenMetaEngine::getSupportedGames() const { GameList games; games.push_back(queenGameDescriptor); return games; } -GameDescriptor Engine_QUEEN_findGameID(const char *gameid) { +GameDescriptor QueenMetaEngine::findGame(const char *gameid) const { if (0 == scumm_stricmp(gameid, queenGameDescriptor.gameid)) { return queenGameDescriptor; } return GameDescriptor(); } -GameList Engine_QUEEN_detectGames(const FSList &fslist) { +GameList QueenMetaEngine::detectGames(const FSList &fslist) const { GameList detectedGames; // Iterate over all files in the given directory @@ -99,12 +122,14 @@ GameList Engine_QUEEN_detectGames(const FSList &fslist) { return detectedGames; } -PluginError Engine_QUEEN_create(OSystem *syst, Engine **engine) { +PluginError QueenMetaEngine::createInstance(OSystem *syst, Engine **engine) const { assert(engine); *engine = new Queen::QueenEngine(syst); return kNoError; } +META_COMPATIBLITY_WRAPPER(QUEEN, QueenMetaEngine); + REGISTER_PLUGIN(QUEEN, "Flight of the Amazon Queen", "Flight of the Amazon Queen (C) John Passfield and Steve Stamatiadis"); namespace Queen { |