aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/advancedDetector.cpp5
-rw-r--r--common/advancedDetector.h17
-rw-r--r--engines/agi/detection.cpp7
-rw-r--r--engines/agos/game.cpp6
-rw-r--r--engines/cine/detection.cpp8
-rw-r--r--engines/gob/detection.cpp7
-rw-r--r--engines/parallaction/detection.cpp8
-rw-r--r--engines/saga/game.cpp7
-rw-r--r--engines/touche/plugin.cpp10
9 files changed, 17 insertions, 58 deletions
diff --git a/common/advancedDetector.cpp b/common/advancedDetector.cpp
index 856d10fc3c..70529bc430 100644
--- a/common/advancedDetector.cpp
+++ b/common/advancedDetector.cpp
@@ -50,7 +50,7 @@ namespace AdvancedDetector {
static ADList detectGame(const FSList *fslist, const Common::ADParams &params, Language language, Platform platform);
-GameList genGameList(const Common::ADParams &params) {
+GameList gameIDList(const Common::ADParams &params) {
if (params.singleid != NULL) {
GameList gl;
@@ -221,7 +221,6 @@ int detectBestMatchingGame(
}
PluginError detectGameForEngineCreation(
- GameList (*detectFunc)(const FSList &fslist),
const Common::ADParams &params
) {
Common::String gameid = ConfMan.get("gameid");
@@ -232,7 +231,7 @@ PluginError detectGameForEngineCreation(
return kInvalidPathError;
}
- GameList detectedGames = detectFunc(fslist);
+ GameList detectedGames = detectAllGames(fslist, params);
// We have single ID set, so we have a game if there are hits
if (params.singleid != NULL && detectedGames.size())
diff --git a/common/advancedDetector.h b/common/advancedDetector.h
index 68d59c99f7..431b7466b3 100644
--- a/common/advancedDetector.h
+++ b/common/advancedDetector.h
@@ -107,7 +107,7 @@ namespace AdvancedDetector {
* Returns list of targets supported by the engine.
* Distinguishes engines with single ID
*/
-GameList genGameList(const Common::ADParams &params);
+GameList gameIDList(const Common::ADParams &params);
/**
* Scan through the game descriptors specified in params and search for
@@ -137,7 +137,6 @@ void upgradeTargetIfNecessary(const Common::ADParams &params);
// FIXME/TODO: Rename this function to something more sensible.
PluginError detectGameForEngineCreation(
- GameList (*detectFunc)(const FSList &fslist),
const Common::ADParams &params
);
@@ -153,32 +152,32 @@ PluginError detectGameForEngineCreation(
} // End of namespace AdvancedDetector
-#define ADVANCED_DETECTOR_DEFINE_PLUGIN_WITH_FUNC(engine,factoryFunc,detectFunc,params) \
+#define ADVANCED_DETECTOR_DEFINE_PLUGIN_WITH_FUNC(engine,factoryFunc,params) \
GameList Engine_##engine##_gameIDList() { \
- return Common::AdvancedDetector::genGameList(params); \
+ return Common::AdvancedDetector::gameIDList(params); \
} \
GameDescriptor Engine_##engine##_findGameID(const char *gameid) { \
return Common::AdvancedDetector::findGameID(gameid, params); \
} \
GameList Engine_##engine##_detectGames(const FSList &fslist) { \
- return detectFunc(fslist); \
+ return Common::AdvancedDetector::detectAllGames(fslist, params); \
} \
PluginError Engine_##engine##_create(OSystem *syst, Engine **engine) { \
assert(syst); \
assert(engine); \
Common::AdvancedDetector::upgradeTargetIfNecessary(params); \
- PluginError err = Common::AdvancedDetector::detectGameForEngineCreation(detectFunc, params); \
+ PluginError err = Common::AdvancedDetector::detectGameForEngineCreation(params); \
if (err == kNoError) \
*engine = factoryFunc(syst); \
return err; \
} \
void dummyFuncToAllowTrailingSemicolon()
-#define ADVANCED_DETECTOR_DEFINE_PLUGIN(engine,className,detectFunc,params) \
- static className *engine##_createInstance(OSystem *syst) { \
+#define ADVANCED_DETECTOR_DEFINE_PLUGIN(engine,className,params) \
+ static Engine *engine##_createInstance(OSystem *syst) { \
return new className(syst); \
} \
- ADVANCED_DETECTOR_DEFINE_PLUGIN_WITH_FUNC(engine,engine##_createInstance,detectFunc,params); \
+ ADVANCED_DETECTOR_DEFINE_PLUGIN_WITH_FUNC(engine,engine##_createInstance,params); \
void dummyFuncToAllowTrailingSemicolon()
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index fa5f9d3ba3..15a283db50 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -52,7 +52,6 @@ uint16 AgiEngine::getVersion() const {
return _gameDescription->version;
}
-static GameList GAME_detectGames(const FSList &fslist);
}
static const PlainGameDescriptor agiGames[] = {
@@ -1743,7 +1742,7 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget
};
-ADVANCED_DETECTOR_DEFINE_PLUGIN(AGI, Agi::AgiEngine, Agi::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(AGI, Agi::AgiEngine, detectionParams);
REGISTER_PLUGIN(AGI, "AGI v2 + v3 Engine", "Sierra AGI Engine (C) Sierra On-Line Software");
@@ -1758,9 +1757,5 @@ bool AgiEngine::initGame() {
return true;
}
-GameList GAME_detectGames(const FSList &fslist) {
- return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
} // End of namespace Agi
diff --git a/engines/agos/game.cpp b/engines/agos/game.cpp
index 071aae9fd3..6df5a1a7a5 100644
--- a/engines/agos/game.cpp
+++ b/engines/agos/game.cpp
@@ -39,7 +39,6 @@ struct AGOSGameDescription {
uint32 features;
};
-static GameList GAME_detectGames(const FSList &fslist);
}
/**
@@ -101,7 +100,7 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget
};
-ADVANCED_DETECTOR_DEFINE_PLUGIN(AGOS, AGOS::AGOSEngine, AGOS::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(AGOS, AGOS::AGOSEngine, detectionParams);
REGISTER_PLUGIN(AGOS, "AGOS", "AGOS (C) Adventure Soft");
@@ -116,9 +115,6 @@ bool AGOSEngine::initGame() {
return true;
}
-GameList GAME_detectGames(const FSList &fslist) {
- return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
int AGOSEngine::getGameId() const {
return _gameDescription->gameId;
diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index 519d410f36..ad5f917e91 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -43,8 +43,6 @@ uint32 CineEngine::getFeatures() const { return _gameDescription->features; }
Common::Language CineEngine::getLanguage() const { return _gameDescription->desc.language; }
Common::Platform CineEngine::getPlatform() const { return _gameDescription->desc.platform; }
-
-static GameList GAME_detectGames(const FSList &fslist);
}
static const PlainGameDescriptor cineGames[] = {
@@ -486,7 +484,7 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget
};
-ADVANCED_DETECTOR_DEFINE_PLUGIN(CINE, Cine::CineEngine, Cine::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(CINE, Cine::CineEngine, detectionParams);
REGISTER_PLUGIN(CINE, "Cinematique evo 1 engine", "Future Wars & Operation Stealth (C) Delphine Software");
@@ -501,8 +499,4 @@ bool CineEngine::initGame() {
return true;
}
-GameList GAME_detectGames(const FSList &fslist) {
- return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
} // End of namespace Cine
diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp
index 317edea8f2..464fbea909 100644
--- a/engines/gob/detection.cpp
+++ b/engines/gob/detection.cpp
@@ -37,7 +37,6 @@ struct GOBGameDescription {
const char *startTotBase;
};
-static GameList GAME_detectGames(const FSList &fslist);
}
using namespace Common;
@@ -918,7 +917,7 @@ static const ADParams detectionParams = {
kADFlagAugmentPreferredTarget | kADFlagFilebasedFallback
};
-ADVANCED_DETECTOR_DEFINE_PLUGIN(GOB, Gob::GobEngine, Gob::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(GOB, Gob::GobEngine, detectionParams);
REGISTER_PLUGIN(GOB, "Gob Engine", "Goblins Games (C) Coktel Vision");
@@ -949,8 +948,4 @@ bool GobEngine::detectGame() {
return true;
}
-GameList GAME_detectGames(const FSList &fslist) {
- return AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
} // End of namespace Parallaction
diff --git a/engines/parallaction/detection.cpp b/engines/parallaction/detection.cpp
index a1850d04e8..23db8c0597 100644
--- a/engines/parallaction/detection.cpp
+++ b/engines/parallaction/detection.cpp
@@ -41,8 +41,6 @@ int Parallaction::getGameType() const { return _gameDescription->gameType; }
uint32 Parallaction::getFeatures() const { return _gameDescription->features; }
Common::Language Parallaction::getLanguage() const { return _gameDescription->desc.language; }
Common::Platform Parallaction::getPlatform() const { return _gameDescription->desc.platform; }
-
-static GameList GAME_detectGames(const FSList &fslist);
}
static const PlainGameDescriptor parallactionGames[] = {
@@ -100,7 +98,7 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget
};
-ADVANCED_DETECTOR_DEFINE_PLUGIN(PARALLACTION, Parallaction::Parallaction, Parallaction::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(PARALLACTION, Parallaction::Parallaction, detectionParams);
REGISTER_PLUGIN(PARALLACTION, "Parallaction engine", "Nippon Safes Inc. (C) Dynabyte");
@@ -114,8 +112,4 @@ bool Parallaction::detectGame() {
return true;
}
-GameList GAME_detectGames(const FSList &fslist) {
- return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
} // End of namespace Parallaction
diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp
index aaec2dad2f..ca3e4ddfca 100644
--- a/engines/saga/game.cpp
+++ b/engines/saga/game.cpp
@@ -79,7 +79,6 @@ int SagaEngine::getPatchesCount() const { return _gameDescription->patchesCount;
const GamePatchDescription *SagaEngine::getPatchDescriptions() const { return _gameDescription->patchDescriptions; }
const Common::ADGameFileDescription *SagaEngine::getFilesDescriptions() const { return _gameDescription->desc.filesDescriptions; }
-static GameList GAME_detectGames(const FSList &fslist);
}
static const PlainGameDescriptor sagaGames[] = {
@@ -120,7 +119,7 @@ static const Common::ADParams detectionParams = {
Common::kADFlagAugmentPreferredTarget
};
-ADVANCED_DETECTOR_DEFINE_PLUGIN(SAGA, Saga::SagaEngine, Saga::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(SAGA, Saga::SagaEngine, detectionParams);
REGISTER_PLUGIN(SAGA, "SAGA Engine", "Inherit the Earth (C) Wyrmkeep Entertainment");
@@ -140,8 +139,4 @@ bool SagaEngine::initGame() {
return _resource->createContexts();
}
-GameList GAME_detectGames(const FSList &fslist) {
- return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
} // End of namespace Saga
diff --git a/engines/touche/plugin.cpp b/engines/touche/plugin.cpp
index 19cdc6803b..3749a73027 100644
--- a/engines/touche/plugin.cpp
+++ b/engines/touche/plugin.cpp
@@ -28,10 +28,6 @@
#include "touche/touche.h"
-namespace Touche {
-static GameList GAME_detectGames(const FSList &fslist);
-}
-
static const PlainGameDescriptor toucheGames[] = {
{"touche", "Touche: The Adventures of the Fifth Musketeer"},
@@ -116,7 +112,7 @@ static const Common::ADParams detectionParams = {
0
};
-ADVANCED_DETECTOR_DEFINE_PLUGIN(TOUCHE, Touche::ToucheEngine, Touche::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(TOUCHE, Touche::ToucheEngine, detectionParams);
REGISTER_PLUGIN(TOUCHE, "Touche Engine", "Touche: The Adventures of the 5th Musketeer (C) Clipper Software");
@@ -131,8 +127,4 @@ bool ToucheEngine::detectGame() {
return true;
}
-GameList GAME_detectGames(const FSList &fslist) {
- return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
} // End of namespace Touche