[Scummvm-cvs-logs] CVS: scummvm/base gameDetector.cpp,1.55,1.56 gameDetector.h,1.21,1.22 plugins.cpp,1.22,1.23
Max Horn
fingolfin at users.sourceforge.net
Fri Dec 12 16:21:01 CET 2003
Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1:/tmp/cvs-serv15141/base
Modified Files:
gameDetector.cpp gameDetector.h plugins.cpp
Log Message:
removed GameSettings::detectname and GameSettings::midi; renamed GameSettings::gameName to name; added temporary experimental MD5 hack
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- gameDetector.cpp 11 Dec 2003 14:36:43 -0000 1.55
+++ gameDetector.cpp 13 Dec 2003 00:20:00 -0000 1.56
@@ -198,7 +198,7 @@
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
GameList list = (*iter)->getSupportedGames();
for (GameList::Iterator v = list.begin(); v != list.end(); ++v) {
- printf("%-20s %s\n", v->gameName, v->description);
+ printf("%-20s %s\n", v->name, v->description);
}
}
}
@@ -229,12 +229,12 @@
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, MDT_NONE, 0, NULL};
+ GameSettings result = {NULL, NULL, 0};
PluginList::ConstIterator iter = plugins.begin();
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
result = (*iter)->findGame(gameName.c_str());
- if (result.gameName) {
+ if (result.name) {
if (plugin)
*plugin = *iter;
break;
@@ -301,10 +301,10 @@
if (s[0] != '-' || s[1] == '\0') {
// Last argument: this could be a target name.
- // To verify this, check if there is either a game domain (i.e
+ // To verify this, check if there is either a game domain (i.e.
// a configured target) matching this argument, or if we can
// find any target with that name.
- if (i == (argc - 1) && (ConfMan.hasGameDomain(s) || findGame(s).gameName)) {
+ if (i == (argc - 1) && (ConfMan.hasGameDomain(s) || findGame(s).name)) {
setTarget(s);
} else {
if (current_option == NULL)
@@ -512,12 +512,10 @@
_game = findGame(realGame, &_plugin);
- if (_game.gameName) {
- _gameName = _game.gameName;
+ if (_game.name) {
printf("Trying to start game '%s'\n", _game.description);
return true;
} else {
- _gameName.clear();
printf("Failed game detection\n");
return false;
}
Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- gameDetector.h 10 Nov 2003 01:04:10 -0000 1.21
+++ gameDetector.h 13 Dec 2003 00:20:00 -0000 1.22
@@ -47,11 +47,9 @@
};
struct GameSettings {
- const char *gameName;
+ const char *name;
const char *description;
- int midi; // MidiDriverType values
uint32 features;
- const char *detectname;
};
class GameDetector {
@@ -64,8 +62,7 @@
bool detectMain();
String _targetName;
- String _gameName;
- GameSettings _game; // TODO: Eventually get rid of _game or at least make it protected
+ GameSettings _game; // TODO: Eventually get rid of this?!
const Plugin *_plugin;
bool _dumpScripts;
Index: plugins.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/plugins.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- plugins.cpp 8 Nov 2003 22:05:58 -0000 1.22
+++ plugins.cpp 13 Dec 2003 00:20:00 -0000 1.23
@@ -52,9 +52,9 @@
// Find the GameSettings for this game
assert(gameName);
GameList games = getSupportedGames();
- GameSettings result = {NULL, NULL, MDT_NONE, 0, NULL};
+ GameSettings result = {NULL, NULL, 0};
for (GameList::Iterator g = games.begin(); g != games.end(); ++g) {
- if (!scumm_stricmp(g->gameName, gameName)) {
+ if (!scumm_stricmp(g->name, gameName)) {
result = *g;
break;
}
More information about the Scummvm-git-logs
mailing list