[Scummvm-cvs-logs] SF.net SVN: scummvm: [25542] scummvm/trunk/common/advancedDetector.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Feb 13 14:04:52 CET 2007
Revision: 25542
http://scummvm.svn.sourceforge.net/scummvm/?rev=25542&view=rev
Author: fingolfin
Date: 2007-02-13 05:04:51 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
Moved detectGameForEngineCreation next to detectBestMatchingGame (somebody should explain the difference between the two...)
Modified Paths:
--------------
scummvm/trunk/common/advancedDetector.cpp
Modified: scummvm/trunk/common/advancedDetector.cpp
===================================================================
--- scummvm/trunk/common/advancedDetector.cpp 2007-02-13 13:00:18 UTC (rev 25541)
+++ scummvm/trunk/common/advancedDetector.cpp 2007-02-13 13:04:51 UTC (rev 25542)
@@ -90,33 +90,6 @@
}
}
-PluginError detectGameForEngineCreation(
- GameList (*detectFunc)(const FSList &fslist),
- const Common::ADParams ¶ms
- ) {
- Common::String gameid = ConfMan.get("gameid");
-
- FSList fslist;
- FilesystemNode dir(ConfMan.get("path"));
- if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
- return kInvalidPathError;
- }
-
- GameList detectedGames = detectFunc(fslist);
-
- // We have single ID set, so we have a game if there are hits
- if (params.singleid != NULL && detectedGames.size())
- return kNoError;
-
- for (uint i = 0; i < detectedGames.size(); i++) {
- if (detectedGames[i].gameid() == gameid) {
- return kNoError;
- }
- }
-
- return kNoGameDataFoundError;
-}
-
GameDescriptor findGameID(
const char *gameid,
const Common::ADParams ¶ms
@@ -245,7 +218,33 @@
return gameNumber;
}
+PluginError detectGameForEngineCreation(
+ GameList (*detectFunc)(const FSList &fslist),
+ const Common::ADParams ¶ms
+ ) {
+ Common::String gameid = ConfMan.get("gameid");
+ FSList fslist;
+ FilesystemNode dir(ConfMan.get("path"));
+ if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
+ return kInvalidPathError;
+ }
+
+ GameList detectedGames = detectFunc(fslist);
+
+ // We have single ID set, so we have a game if there are hits
+ if (params.singleid != NULL && detectedGames.size())
+ return kNoError;
+
+ for (uint i = 0; i < detectedGames.size(); i++) {
+ if (detectedGames[i].gameid() == gameid) {
+ return kNoError;
+ }
+ }
+
+ return kNoGameDataFoundError;
+}
+
static ADList detectGame(const FSList *fslist, const Common::ADParams ¶ms, Language language, Platform platform) {
typedef HashMap<String, bool, CaseSensitiveString_Hash, CaseSensitiveString_EqualTo> StringSet;
StringSet filesList;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list