aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/queen/queen.cpp33
-rw-r--r--engines/sky/sky.cpp53
2 files changed, 68 insertions, 18 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 {
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index aa94661bd5..f3393ade6f 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -55,6 +55,8 @@
#include "sound/mididrv.h"
#include "sound/mixer.h"
+#include "engines/metaengine.h"
+
#ifdef _WIN32_WCE
extern bool toolbar_drawn;
@@ -81,18 +83,6 @@ extern bool draw_keyboard;
static const PlainGameDescriptor skySetting =
{"sky", "Beneath a Steel Sky" };
-GameList Engine_SKY_gameIDList() {
- GameList games;
- games.push_back(skySetting);
- return games;
-}
-
-GameDescriptor Engine_SKY_findGameID(const char *gameid) {
- if (0 == scumm_stricmp(gameid, skySetting.gameid))
- return skySetting;
- return GameDescriptor();
-}
-
struct SkyVersion {
int dinnerTableEntries;
int dataDiskSize;
@@ -114,7 +104,40 @@ static const SkyVersion skyVersions[] = {
{ 0, 0, 0, 0 }
};
-GameList Engine_SKY_detectGames(const FSList &fslist) {
+class SkyMetaEngine : 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 *SkyMetaEngine::getName() const {
+ return "Beneath a Steel Sky";
+}
+
+const char *SkyMetaEngine::getCopyright() const {
+ return "Beneath a Steel Sky (C) Revolution";
+}
+
+GameList SkyMetaEngine::getSupportedGames() const {
+ GameList games;
+ games.push_back(skySetting);
+ return games;
+}
+
+GameDescriptor SkyMetaEngine::findGame(const char *gameid) const {
+ if (0 == scumm_stricmp(gameid, skySetting.gameid))
+ return skySetting;
+ return GameDescriptor();
+}
+
+GameList SkyMetaEngine::detectGames(const FSList &fslist) const {
GameList detectedGames;
bool hasSkyDsk = false;
bool hasSkyDnr = false;
@@ -166,12 +189,14 @@ GameList Engine_SKY_detectGames(const FSList &fslist) {
return detectedGames;
}
-PluginError Engine_SKY_create(OSystem *syst, Engine **engine) {
+PluginError SkyMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
assert(engine);
*engine = new Sky::SkyEngine(syst);
return kNoError;
}
+META_COMPATIBLITY_WRAPPER(SKY, SkyMetaEngine);
+
REGISTER_PLUGIN(SKY, "Beneath a Steel Sky", "Beneath a Steel Sky (C) Revolution");