[Scummvm-cvs-logs] SF.net SVN: scummvm: [25547] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Feb 13 15:55:11 CET 2007


Revision: 25547
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25547&view=rev
Author:   fingolfin
Date:     2007-02-13 06:55:11 -0800 (Tue, 13 Feb 2007)

Log Message:
-----------
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

Modified Paths:
--------------
    scummvm/trunk/common/advancedDetector.cpp
    scummvm/trunk/common/advancedDetector.h
    scummvm/trunk/engines/agi/detection.cpp
    scummvm/trunk/engines/agos/game.cpp
    scummvm/trunk/engines/cine/detection.cpp
    scummvm/trunk/engines/gob/detection.cpp
    scummvm/trunk/engines/parallaction/detection.cpp
    scummvm/trunk/engines/saga/game.cpp
    scummvm/trunk/engines/touche/plugin.cpp

Modified: scummvm/trunk/common/advancedDetector.cpp
===================================================================
--- scummvm/trunk/common/advancedDetector.cpp	2007-02-13 14:47:07 UTC (rev 25546)
+++ scummvm/trunk/common/advancedDetector.cpp	2007-02-13 14:55:11 UTC (rev 25547)
@@ -50,7 +50,7 @@
 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 @@
 }
 
 PluginError detectGameForEngineCreation(
-	GameList (*detectFunc)(const FSList &fslist),
 	const Common::ADParams &params
 	) {
 	Common::String gameid = ConfMan.get("gameid");
@@ -232,7 +231,7 @@
 		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())

Modified: scummvm/trunk/common/advancedDetector.h
===================================================================
--- scummvm/trunk/common/advancedDetector.h	2007-02-13 14:47:07 UTC (rev 25546)
+++ scummvm/trunk/common/advancedDetector.h	2007-02-13 14:55:11 UTC (rev 25547)
@@ -107,7 +107,7 @@
  * 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 @@
 
 // FIXME/TODO: Rename this function to something more sensible.
 PluginError detectGameForEngineCreation(
-	GameList (*detectFunc)(const FSList &fslist),
 	const Common::ADParams &params
 	);
 
@@ -153,32 +152,32 @@
 } // 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()
 
 

Modified: scummvm/trunk/engines/agi/detection.cpp
===================================================================
--- scummvm/trunk/engines/agi/detection.cpp	2007-02-13 14:47:07 UTC (rev 25546)
+++ scummvm/trunk/engines/agi/detection.cpp	2007-02-13 14:55:11 UTC (rev 25547)
@@ -52,7 +52,6 @@
 	return _gameDescription->version;
 }
 
-static GameList GAME_detectGames(const FSList &fslist);
 }
 
 static const PlainGameDescriptor agiGames[] = {
@@ -1743,7 +1742,7 @@
 	Common::kADFlagAugmentPreferredTarget
 };
 
-ADVANCED_DETECTOR_DEFINE_PLUGIN(AGI, Agi::AgiEngine, Agi::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(AGI, Agi::AgiEngine, detectionParams);
 
 REGISTER_PLUGIN(AGI, "AGI v2 + v3 Engine", "Sierra AGI Engine (C) Sierra On-Line Software");
 
@@ -1758,9 +1757,5 @@
 	return true;
 }
 
-GameList GAME_detectGames(const FSList &fslist) {
-	return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
 } // End of namespace Agi
 

Modified: scummvm/trunk/engines/agos/game.cpp
===================================================================
--- scummvm/trunk/engines/agos/game.cpp	2007-02-13 14:47:07 UTC (rev 25546)
+++ scummvm/trunk/engines/agos/game.cpp	2007-02-13 14:55:11 UTC (rev 25547)
@@ -39,7 +39,6 @@
 	uint32 features;
 };
 
-static GameList GAME_detectGames(const FSList &fslist);
 }
 
 /**
@@ -101,7 +100,7 @@
 	Common::kADFlagAugmentPreferredTarget
 };
 
-ADVANCED_DETECTOR_DEFINE_PLUGIN(AGOS, AGOS::AGOSEngine, AGOS::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(AGOS, AGOS::AGOSEngine, detectionParams);
 
 REGISTER_PLUGIN(AGOS, "AGOS", "AGOS (C) Adventure Soft");
 
@@ -116,9 +115,6 @@
 	return true;
 }
 
-GameList GAME_detectGames(const FSList &fslist) {
-	return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
 
 int AGOSEngine::getGameId() const {
 	return _gameDescription->gameId;

Modified: scummvm/trunk/engines/cine/detection.cpp
===================================================================
--- scummvm/trunk/engines/cine/detection.cpp	2007-02-13 14:47:07 UTC (rev 25546)
+++ scummvm/trunk/engines/cine/detection.cpp	2007-02-13 14:55:11 UTC (rev 25547)
@@ -43,8 +43,6 @@
 Common::Language CineEngine::getLanguage() const { return _gameDescription->desc.language; }
 Common::Platform CineEngine::getPlatform() const { return _gameDescription->desc.platform; }
 
-
-static GameList GAME_detectGames(const FSList &fslist);
 }
 
 static const PlainGameDescriptor cineGames[] = {
@@ -486,7 +484,7 @@
 	Common::kADFlagAugmentPreferredTarget
 };
 
-ADVANCED_DETECTOR_DEFINE_PLUGIN(CINE, Cine::CineEngine, Cine::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(CINE, Cine::CineEngine, detectionParams);
 
 REGISTER_PLUGIN(CINE, "Cinematique evo 1 engine", "Future Wars & Operation Stealth (C) Delphine Software");
 
@@ -501,8 +499,4 @@
 	return true;
 }
 
-GameList GAME_detectGames(const FSList &fslist) {
-	return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
 } // End of namespace Cine

Modified: scummvm/trunk/engines/gob/detection.cpp
===================================================================
--- scummvm/trunk/engines/gob/detection.cpp	2007-02-13 14:47:07 UTC (rev 25546)
+++ scummvm/trunk/engines/gob/detection.cpp	2007-02-13 14:55:11 UTC (rev 25547)
@@ -37,7 +37,6 @@
 	const char *startTotBase;
 };
 
-static GameList GAME_detectGames(const FSList &fslist);
 }
 
 using namespace Common;
@@ -918,7 +917,7 @@
 	kADFlagAugmentPreferredTarget | kADFlagFilebasedFallback
 };
 
-ADVANCED_DETECTOR_DEFINE_PLUGIN(GOB, Gob::GobEngine, Gob::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(GOB, Gob::GobEngine, detectionParams);
 
 REGISTER_PLUGIN(GOB, "Gob Engine", "Goblins Games (C) Coktel Vision");
 
@@ -949,8 +948,4 @@
 	return true;
 }
 
-GameList GAME_detectGames(const FSList &fslist) {
-	return AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
 } // End of namespace Parallaction

Modified: scummvm/trunk/engines/parallaction/detection.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/detection.cpp	2007-02-13 14:47:07 UTC (rev 25546)
+++ scummvm/trunk/engines/parallaction/detection.cpp	2007-02-13 14:55:11 UTC (rev 25547)
@@ -41,8 +41,6 @@
 uint32 Parallaction::getFeatures() const { return _gameDescription->features; }
 Common::Language Parallaction::getLanguage() const { return _gameDescription->desc.language; }
 Common::Platform Parallaction::getPlatform() const { return _gameDescription->desc.platform; }
-
-static GameList GAME_detectGames(const FSList &fslist);
 }
 
 static const PlainGameDescriptor parallactionGames[] = {
@@ -100,7 +98,7 @@
 	Common::kADFlagAugmentPreferredTarget
 };
 
-ADVANCED_DETECTOR_DEFINE_PLUGIN(PARALLACTION, Parallaction::Parallaction, Parallaction::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(PARALLACTION, Parallaction::Parallaction, detectionParams);
 
 REGISTER_PLUGIN(PARALLACTION, "Parallaction engine", "Nippon Safes Inc. (C) Dynabyte");
 
@@ -114,8 +112,4 @@
 	return true;
 }
 
-GameList GAME_detectGames(const FSList &fslist) {
-	return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
 } // End of namespace Parallaction

Modified: scummvm/trunk/engines/saga/game.cpp
===================================================================
--- scummvm/trunk/engines/saga/game.cpp	2007-02-13 14:47:07 UTC (rev 25546)
+++ scummvm/trunk/engines/saga/game.cpp	2007-02-13 14:55:11 UTC (rev 25547)
@@ -79,7 +79,6 @@
 const GamePatchDescription *SagaEngine::getPatchDescriptions() const { return _gameDescription->patchDescriptions; }
 const Common::ADGameFileDescription *SagaEngine::getFilesDescriptions() const { return _gameDescription->desc.filesDescriptions; }
 
-static GameList GAME_detectGames(const FSList &fslist);
 }
 
 static const PlainGameDescriptor sagaGames[] = {
@@ -120,7 +119,7 @@
 	Common::kADFlagAugmentPreferredTarget
 };
 
-ADVANCED_DETECTOR_DEFINE_PLUGIN(SAGA, Saga::SagaEngine, Saga::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(SAGA, Saga::SagaEngine, detectionParams);
 
 REGISTER_PLUGIN(SAGA, "SAGA Engine", "Inherit the Earth (C) Wyrmkeep Entertainment");
 
@@ -140,8 +139,4 @@
 	return _resource->createContexts();
 }
 
-GameList GAME_detectGames(const FSList &fslist) {
-	return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
 } // End of namespace Saga

Modified: scummvm/trunk/engines/touche/plugin.cpp
===================================================================
--- scummvm/trunk/engines/touche/plugin.cpp	2007-02-13 14:47:07 UTC (rev 25546)
+++ scummvm/trunk/engines/touche/plugin.cpp	2007-02-13 14:55:11 UTC (rev 25547)
@@ -28,11 +28,7 @@
 
 #include "touche/touche.h"
 
-namespace Touche {
-static GameList GAME_detectGames(const FSList &fslist);
-}
 
-
 static const PlainGameDescriptor toucheGames[] = {
 	{"touche", "Touche: The Adventures of the Fifth Musketeer"},
 	{"touche-fr", "Touche: Les Aventures du Cinquieme Mousquetaire"},
@@ -116,7 +112,7 @@
 	0
 };
 
-ADVANCED_DETECTOR_DEFINE_PLUGIN(TOUCHE, Touche::ToucheEngine, Touche::GAME_detectGames, detectionParams);
+ADVANCED_DETECTOR_DEFINE_PLUGIN(TOUCHE, Touche::ToucheEngine, detectionParams);
 
 REGISTER_PLUGIN(TOUCHE, "Touche Engine", "Touche: The Adventures of the 5th Musketeer (C) Clipper Software");
 
@@ -131,8 +127,4 @@
 	return true;
 }
 
-GameList GAME_detectGames(const FSList &fslist) {
-	return Common::AdvancedDetector::detectAllGames(fslist, detectionParams);
-}
-
 } // End of namespace Touche


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