aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/plugin.cpp
diff options
context:
space:
mode:
authorMax Horn2006-11-12 03:23:29 +0000
committerMax Horn2006-11-12 03:23:29 +0000
commit1f26cb89652a5804ccace15587426ca2b9e1387d (patch)
tree105cfba6c96569f58e79a1cf9b1fedc72c76bf8a /engines/kyra/plugin.cpp
parentc7b2f4d3325942330188f04d23d4a60797c7d2c2 (diff)
downloadscummvm-rg350-1f26cb89652a5804ccace15587426ca2b9e1387d.tar.gz
scummvm-rg350-1f26cb89652a5804ccace15587426ca2b9e1387d.tar.bz2
scummvm-rg350-1f26cb89652a5804ccace15587426ca2b9e1387d.zip
Reworked code in the advanced game detector (getting rid of much of the evil #define hell it consisted of previously)
svn-id: r24685
Diffstat (limited to 'engines/kyra/plugin.cpp')
-rw-r--r--engines/kyra/plugin.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/kyra/plugin.cpp b/engines/kyra/plugin.cpp
index e63db7ee05..786c07dbfd 100644
--- a/engines/kyra/plugin.cpp
+++ b/engines/kyra/plugin.cpp
@@ -203,9 +203,13 @@ const PlainGameDescriptor gameList[] = {
} // End of anonymous namespace
-ADVANCED_DETECTOR_GAMEID_LIST(KYRA, gameList);
+GameList Engine_KYRA_gameIDList() {
+ return Common::real_ADVANCED_DETECTOR_GAMEID_LIST(gameList);
+}
-ADVANCED_DETECTOR_FIND_GAMEID(KYRA, gameList, NULL);
+GameDescriptor Engine_KYRA_findGameID(const char *gameid) {
+ return Common::real_ADVANCED_DETECTOR_FIND_GAMEID(gameid, gameList, 0);
+}
DetectedGameList Engine_KYRA_detectGames(const FSList &fslist) {
DetectedGameList detectedGames;
@@ -227,14 +231,12 @@ PluginError Engine_KYRA_create(OSystem *syst, Engine **engine) {
FSList fslist;
FilesystemNode dir(ConfMan.get("path"));
if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
- warning("KyraEngine: invalid game path '%s'", dir.path().c_str());
return kInvalidPathError;
}
GameFlags flags;
ADList games = detectKyraGames(fslist);
if (!setupGameFlags(games, flags)) {
- warning("KyraEngine: unable to locate game data at path '%s'", dir.path().c_str());
return kNoGameDataFoundError;
}