[Scummvm-cvs-logs] CVS: scummvm/base engine.h,1.6,1.7 gameDetector.cpp,1.44,1.45 gameDetector.h,1.17,1.18 plugins.cpp,1.18,1.19

Max Horn fingolfin at users.sourceforge.net
Tue Oct 28 09:08:18 CET 2003


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

Modified Files:
	engine.h gameDetector.cpp gameDetector.h plugins.cpp 
Log Message:
cleanup: removed version/id from GameSettings

Index: engine.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/engine.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- engine.h	12 Oct 2003 18:40:08 -0000	1.6
+++ engine.h	28 Oct 2003 17:07:22 -0000	1.7
@@ -29,33 +29,6 @@
 extern const char *gScummVMBuildDate;	// e.g. "2003-06-24"
 extern const char *gScummVMFullVersion;	// e.g. "ScummVM 0.4.1 (2003-06-24)"
 
-// TODO: Get rid of these enums. Ideally, GIDs should be
-// 100% local to the module they are defined in. Right now
-// we can't make this change since some of the backends
-// and also gui/launcher.cpp contain tests on the GID.
-// Ideally, all those should be converted to something else.
-enum GameId {
-	GID_SCUMM_FIRST = 1,
-	GID_SCUMM_LAST = GID_SCUMM_FIRST + 99,
-
-	// Simon the Sorcerer
-	GID_SIMON_FIRST,
-	GID_SIMON_LAST = GID_SIMON_FIRST + 49,
-
-	// Beneath a Steel Sky
-	GID_SKY_FIRST,
-	GID_SKY_LAST = GID_SKY_FIRST + 9,
-
-	// Broken Sword 2
-	GID_SWORD2_FIRST,
-	GID_SWORD2_LAST = GID_SWORD2_FIRST + 9,
-
-	// Flight of the Amazon Queen
-	GID_QUEEN_FIRST,
-	GID_QUEEN_LAST = GID_QUEEN_FIRST + 9
-};
-
-
 class SoundMixer;
 class GameDetector;
 class Timer;

Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- gameDetector.cpp	26 Oct 2003 21:08:53 -0000	1.44
+++ gameDetector.cpp	28 Oct 2003 17:07:22 -0000	1.45
@@ -179,7 +179,7 @@
 
 	_dumpScripts = false;
 
-	_game.features = 0;
+	memset(&_game, 0, sizeof(_game));
 	_plugin = 0;
 }
 
@@ -225,7 +225,7 @@
 GameSettings GameDetector::findGame(const String &gameName, const Plugin **plugin) {
 	// Find the GameSettings for this target
 	const PluginList &plugins = PluginManager::instance().getPlugins();
-	GameSettings result = {NULL, NULL, 0, 0, MDT_NONE, 0, NULL};
+	GameSettings result = {NULL, NULL, MDT_NONE, 0, NULL};
 	
 	PluginList::ConstIterator iter = plugins.begin();
 	for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
@@ -290,7 +290,7 @@
 	char shortCmdLower;
 	bool isLongCmd, cmdValue;
 
-	// Iterate over all comman line arguments, backwards.
+	// Iterate over all command line arguments, backwards.
 	for (i = argc - 1; i >= 1; i--) {
 		s = argv[i];
 		

Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- gameDetector.h	18 Oct 2003 00:22:46 -0000	1.17
+++ gameDetector.h	28 Oct 2003 17:07:22 -0000	1.18
@@ -23,7 +23,6 @@
 #ifndef GAMEDETECTOR_H
 #define GAMEDETECTOR_H
 
-#include "base/plugins.h"
 #include "common/str.h"
 
 class Engine;
@@ -50,7 +49,6 @@
 struct GameSettings {
 	const char *gameName;
 	const char *description;
-	byte id, version;
 	int midi; // MidiDriverType values
 	uint32 features;
 	const char *detectname;

Index: plugins.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/plugins.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- plugins.cpp	26 Oct 2003 15:58:49 -0000	1.18
+++ plugins.cpp	28 Oct 2003 17:07:22 -0000	1.19
@@ -52,7 +52,7 @@
 	// Find the GameSettings for this game
 	assert(gameName);
 	GameList games = getSupportedGames();
-	GameSettings result = {NULL, NULL, 0, 0, MDT_NONE, 0, NULL};
+	GameSettings result = {NULL, NULL, MDT_NONE, 0, NULL};
 	for (GameList::Iterator g = games.begin(); g != games.end(); ++g) {
 		if (!scumm_stricmp(g->gameName, gameName)) {
 			result = *g;





More information about the Scummvm-git-logs mailing list