diff options
author | Max Horn | 2003-12-13 00:20:01 +0000 |
---|---|---|
committer | Max Horn | 2003-12-13 00:20:01 +0000 |
commit | 35b62c294de5f4114b1b413c46e7ec3136e5b2fd (patch) | |
tree | 0183a1afe636edb0907f37e42615467d9ded3714 /base | |
parent | dd33ae0f0ffebdd8dde2e15c50a89b02e5e36506 (diff) | |
download | scummvm-rg350-35b62c294de5f4114b1b413c46e7ec3136e5b2fd.tar.gz scummvm-rg350-35b62c294de5f4114b1b413c46e7ec3136e5b2fd.tar.bz2 scummvm-rg350-35b62c294de5f4114b1b413c46e7ec3136e5b2fd.zip |
removed GameSettings::detectname and GameSettings::midi; renamed GameSettings::gameName to name; added temporary experimental MD5 hack
svn-id: r11603
Diffstat (limited to 'base')
-rw-r--r-- | base/gameDetector.cpp | 14 | ||||
-rw-r--r-- | base/gameDetector.h | 7 | ||||
-rw-r--r-- | base/plugins.cpp | 4 |
3 files changed, 10 insertions, 15 deletions
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp index d597ee8e33..d1cc9ddc6f 100644 --- a/base/gameDetector.cpp +++ b/base/gameDetector.cpp @@ -198,7 +198,7 @@ void listGames() { 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 @@ void listTargets() { 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 @@ void GameDetector::parseCommandLine(int argc, char **argv) { 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 @@ bool GameDetector::detectGame() { _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; } diff --git a/base/gameDetector.h b/base/gameDetector.h index d57cdb5b06..e6cf2b3ace 100644 --- a/base/gameDetector.h +++ b/base/gameDetector.h @@ -47,11 +47,9 @@ enum MidiDriverType { }; 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 @@ public: 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; diff --git a/base/plugins.cpp b/base/plugins.cpp index 9c8b61a8cf..e96813bb88 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -52,9 +52,9 @@ GameSettings Plugin::findGame(const char *gameName) const { // 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; } |