[Scummvm-cvs-logs] SF.net SVN: scummvm: [31120] scummvm/trunk/common/advancedDetector.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Mar 14 15:05:49 CET 2008
Revision: 31120
http://scummvm.svn.sourceforge.net/scummvm/?rev=31120&view=rev
Author: fingolfin
Date: 2008-03-14 07:05:49 -0700 (Fri, 14 Mar 2008)
Log Message:
-----------
cleanup
Modified Paths:
--------------
scummvm/trunk/common/advancedDetector.cpp
Modified: scummvm/trunk/common/advancedDetector.cpp
===================================================================
--- scummvm/trunk/common/advancedDetector.cpp 2008-03-14 13:59:31 UTC (rev 31119)
+++ scummvm/trunk/common/advancedDetector.cpp 2008-03-14 14:05:49 UTC (rev 31120)
@@ -36,14 +36,6 @@
using namespace AdvancedDetector;
-namespace AdvancedDetector {
-
-// FIXME/TODO: Rename this function to something more sensible.
-// Helper function to announce an unknown version of the game (useful for
-// fallback detection functions).
-void reportUnknown(StringList &files, int md5Bytes);
-
-
/**
* Detect games in specified directory.
* Parameters language and platform are used to pass on values
@@ -63,7 +55,7 @@
* Returns list of targets supported by the engine.
* Distinguishes engines with single ID
*/
-GameList gameIDList(const Common::ADParams ¶ms) {
+static GameList gameIDList(const Common::ADParams ¶ms) {
if (params.singleid != NULL) {
GameList gl;
@@ -82,7 +74,7 @@
return GameList(params.list);
}
-void upgradeTargetIfNecessary(const Common::ADParams ¶ms) {
+static void upgradeTargetIfNecessary(const Common::ADParams ¶ms) {
if (params.obsoleteList == 0)
return;
@@ -108,6 +100,8 @@
}
}
+namespace AdvancedDetector {
+
GameDescriptor findGameID(
const char *gameid,
const PlainGameDescriptor *list,
@@ -138,6 +132,8 @@
return GameDescriptor();
}
+} // End of namespace AdvancedDetector
+
static GameDescriptor toGameDescriptor(const ADGameDescription &g, const PlainGameDescriptor *sg) {
const char *title = 0;
@@ -211,8 +207,6 @@
desc["extra"] = realDesc->extra;
}
-} // End of namespace AdvancedDetector
-
GameList AdvancedMetaEngine::detectGames(const FSList &fslist) const {
ADGameDescList matches = detectGame(&fslist, params, Common::UNK_LANG, Common::kPlatformUnknown, "");
GameList detectedGames;
@@ -236,7 +230,7 @@
PluginError AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine) const {
assert(engine);
- Common::AdvancedDetector::upgradeTargetIfNecessary(params);
+ upgradeTargetIfNecessary(params);
const ADGameDescription *agdDesc = 0;
EncapsulatedADGameDesc result;
@@ -290,9 +284,7 @@
return kNoError;
}
-namespace AdvancedDetector {
-
-void reportUnknown(StringMap &filesMD5, HashMap<String, int32, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualTo> &filesSize) {
+static void reportUnknown(StringMap &filesMD5, HashMap<String, int32, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualTo> &filesSize) {
// TODO: This message should be cleaned up / made more specific.
// For example, we should specify at least which engine triggered this.
//
@@ -308,7 +300,8 @@
printf("\n");
}
-void reportUnknown(StringList &files, int md5Bytes) {
+/*
+static void reportUnknown(StringList &files, int md5Bytes) {
StringMap filesMD5;
HashMap<String, int32, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualTo> filesSize;
@@ -330,6 +323,7 @@
reportUnknown(filesMD5, filesSize);
}
+*/
static ADGameDescList detectGame(const FSList *fslist, const Common::ADParams ¶ms, Language language, Platform platform, const Common::String extra) {
typedef HashMap<String, bool, CaseSensitiveString_Hash, CaseSensitiveString_EqualTo> StringSet;
@@ -574,13 +568,11 @@
return matched;
}
-} // End of namespace AdvancedDetector
-
GameList AdvancedMetaEngine::getSupportedGames() const {
- return Common::AdvancedDetector::gameIDList(params);
+ return gameIDList(params);
}
GameDescriptor AdvancedMetaEngine::findGame(const char *gameid) const {
- return Common::AdvancedDetector::findGameID(gameid, params.list, params.obsoleteList);
+ return AdvancedDetector::findGameID(gameid, params.list, params.obsoleteList);
}
} // End of namespace Common
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