aboutsummaryrefslogtreecommitdiff
path: root/common/advancedDetector.h
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/advancedDetector.h
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/advancedDetector.h')
-rw-r--r--common/advancedDetector.h17
1 files changed, 8 insertions, 9 deletions
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()