[Scummvm-cvs-logs] CVS: scummvm/base gameDetector.cpp,1.30,1.31 plugins.h,1.8,1.9 plugins.cpp,1.12,1.13

Max Horn fingolfin at users.sourceforge.net
Thu Oct 16 16:27:18 CEST 2003


Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1:/tmp/cvs-serv3554/base

Modified Files:
	gameDetector.cpp plugins.h plugins.cpp 
Log Message:
cleanup

Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- gameDetector.cpp	15 Oct 2003 23:26:07 -0000	1.30
+++ gameDetector.cpp	16 Oct 2003 23:16:15 -0000	1.31
@@ -247,7 +247,7 @@
 
 	PluginList::ConstIterator iter = plugins.begin();
 	for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
-		v = (*iter)->getTargets();
+		v = (*iter)->getSupportedGames();
 		while (v->gameName && v->description) {
 #if 1
 			printf("%-17s%-56s\n", v->gameName, v->description);

Index: plugins.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/plugins.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- plugins.h	12 Oct 2003 18:40:08 -0000	1.8
+++ plugins.h	16 Oct 2003 23:16:15 -0000	1.9
@@ -36,6 +36,7 @@
  * Subclasses for this can be used to wrap both static and dynamic
  * plugins.
  */
+//typedef Common::List<GameSettings> GameList;
 class Plugin {
 public:
 	virtual ~Plugin()				{}
@@ -46,9 +47,10 @@
 	virtual const char *getName() const = 0;
 	virtual int getVersion() const	{ return 0; }	// TODO!
 	
-	virtual int countTargets() const;
-	virtual const GameSettings *getTargets() const = 0;
+	virtual int countSupportedGames() const;
+	virtual const GameSettings *getSupportedGames() const = 0;
 	virtual const GameSettings *findGame(const char *gameName) const;
+	//virtual GameList detectGames(const FSList &fslist) const;
 
 	virtual Engine *createInstance(GameDetector *detector, OSystem *syst) const = 0;
 };

Index: plugins.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/plugins.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- plugins.cpp	12 Oct 2003 18:40:08 -0000	1.12
+++ plugins.cpp	16 Oct 2003 23:16:15 -0000	1.13
@@ -74,8 +74,8 @@
 #pragma mark -
 
 
-int Plugin::countTargets() const {
-	const GameSettings *target = getTargets();
+int Plugin::countSupportedGames() const {
+	const GameSettings *target = getSupportedGames();
 	int count;
 	for (count = 0; target->gameName; target++, count++)
 		;
@@ -84,7 +84,7 @@
 
 const GameSettings *Plugin::findGame(const char *gameName) const {
 	// Find the GameSettings for this target
-	const GameSettings *target = getTargets();
+	const GameSettings *target = getSupportedGames();
 	assert(gameName);
 	while (target->gameName) {
 		if (!scumm_stricmp(target->gameName, gameName)) {
@@ -107,13 +107,13 @@
 public:
 	StaticPlugin(const char *name, const GameSettings *targets, EngineFactory ef)
 		: _name(name), _targets(targets), _ef(ef) {
-		_targetCount = Plugin::countTargets();
+		_targetCount = Plugin::countSupportedGames();
 	}
 
 	const char *getName() const					{ return _name; }
 
-	int countTargets() const					{ return _targetCount; }
-	const GameSettings *getTargets() const	{ return _targets; }
+	int countSupportedGames() const					{ return _targetCount; }
+	const GameSettings *getSupportedGames() const	{ return _targets; }
 
 	Engine *createInstance(GameDetector *detector, OSystem *syst) const {
 		return (*_ef)(detector, syst);
@@ -143,8 +143,8 @@
 	
 	const char *getName() const					{ return _name.c_str(); }
 
-	int countTargets() const					{ return _targetCount; }
-	const GameSettings *getTargets() const	{ return _targets; }
+	int countSupportedGames() const					{ return _targetCount; }
+	const GameSettings *getSupportedGames() const	{ return _targets; }
 
 	Engine *createInstance(GameDetector *detector, OSystem *syst) const {
 		assert(_ef);





More information about the Scummvm-git-logs mailing list