aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2007-02-13 14:55:11 +0000
committerMax Horn2007-02-13 14:55:11 +0000
commit4968e912ce005f582a34cd0fba7395ebdfc7dc40 (patch)
treee1d2b83152b98238b69989cba3006439c122decb /common
parent08079c9dec6f59b1e8d100d90ef83581a38aecbe (diff)
downloadscummvm-rg350-4968e912ce005f582a34cd0fba7395ebdfc7dc40.tar.gz
scummvm-rg350-4968e912ce005f582a34cd0fba7395ebdfc7dc40.tar.bz2
scummvm-rg350-4968e912ce005f582a34cd0fba7395ebdfc7dc40.zip
AdvancedDetector changes:
* Renamed genGameList to gameIDList to make it match the corresponding plugin API function name * removed the detectFunc param from detectGameForEngineCreation, as it *always* pointed to a straight wrapper around AdvancedDetector::detectAllGames * as a consequence, removed the various GAME_detectGames functions from the engines, and removed the detectFunc param from ADVANCED_DETECTOR_DEFINE_PLUGIN svn-id: r25547
Diffstat (limited to 'common')
-rw-r--r--common/advancedDetector.cpp5
-rw-r--r--common/advancedDetector.h17
2 files changed, 10 insertions, 12 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()