aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2006-04-15 17:39:14 +0000
committerMax Horn2006-04-15 17:39:14 +0000
commitad45318328e23b76e346414c62ef4c22d8ebe059 (patch)
tree9956847a38797471f73fd26ec3203dbbae6efd78 /engines/scumm
parentdc5f513bcf7b6177a4d8f7e10fb4ed4dd55d7588 (diff)
downloadscummvm-rg350-ad45318328e23b76e346414c62ef4c22d8ebe059.tar.gz
scummvm-rg350-ad45318328e23b76e346414c62ef4c22d8ebe059.tar.bz2
scummvm-rg350-ad45318328e23b76e346414c62ef4c22d8ebe059.zip
Removed GameDetector::_gameid in favor of using a config manager entry
svn-id: r21915
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/plugin.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp
index a7657b99bf..ac9bcfc0bd 100644
--- a/engines/scumm/plugin.cpp
+++ b/engines/scumm/plugin.cpp
@@ -1620,15 +1620,15 @@ DetectedGameList Engine_SCUMM_detectGames(const FSList &fslist) {
*/
Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
Engine *engine;
+ const char *gameid = ConfMan.get("gameid").c_str();
// We start by checking whether the specified game ID is obsolete.
// If that is the case, we automatically upgrade the target to use
// the correct new game ID (and platform, if specified).
- const ObsoleteGameID *o = obsoleteGameIDsTable;
- while (o->from) {
- if (!scumm_stricmp(detector->_gameid.c_str(), o->from)) {
+ for (const ObsoleteGameID *o = obsoleteGameIDsTable; o->from; ++o) {
+ if (!scumm_stricmp(gameid, o->from)) {
// Match found, perform upgrade
- detector->_gameid = o->to;
+ gameid = o->to;
ConfMan.set("gameid", o->to);
if (o->platform != Common::kPlatformUnknown)
@@ -1638,14 +1638,13 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
ConfMan.flushToDisk();
break;
}
- o++;
}
// Lookup the game ID in our database. If this lookup fails, then
// the game ID is unknown, and we have to abort.
const GameSettings *g = gameVariantsTable;
while (g->gameid) {
- if (!scumm_stricmp(detector->_gameid.c_str(), g->gameid))
+ if (!scumm_stricmp(gameid, g->gameid))
break;
g++;
}
@@ -1655,7 +1654,7 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
// We now want to calculate the MD5 of the games detection file, so that we
// can store it in savegames etc..
- const char *gameid = g->gameid;
+ gameid = g->gameid;
char detectName[256], tempName[256];
uint8 md5sum[16];
SubstResFileNames subst = { 0, 0, kGenAsIs };