From 01fc7034b535e2dcc0526d5ac4d1ae4eae60459f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 18 Feb 2006 12:50:48 +0000 Subject: - Merged GameDetector::detectGame() into GameDetector::detectMain() - Replaced GameSettings GameDetector::_game by a simple gameid string svn-id: r20753 --- engines/scumm/scumm.cpp | 6 +++--- engines/simon/simon.cpp | 4 ++-- engines/sword1/sword1.cpp | 2 +- engines/sword2/sword2.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 695a1c9bc8..7d8a5239cc 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -3361,9 +3361,9 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { // the correct new game ID (and platform, if specified). const ObsoleteGameID *o = obsoleteGameIDsTable; while (o->from) { - if (!scumm_stricmp(detector->_game.gameid, o->from)) { + if (!scumm_stricmp(detector->_gameid.c_str(), o->from)) { // Match found, perform upgrade - detector->_game.gameid = o->to; + detector->_gameid = o->to; ConfMan.set("gameid", o->to); if (o->platform != Common::kPlatformUnknown) @@ -3380,7 +3380,7 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { // the game ID is unknown, and we have to abort. const ScummGameSettings *g = scumm_settings; while (g->gameid) { - if (!scumm_stricmp(detector->_game.gameid, g->gameid)) + if (!scumm_stricmp(detector->_gameid.c_str(), g->gameid)) break; g++; } diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index cd9c36d564..2e17a725c1 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -127,8 +127,8 @@ DetectedGameList Engine_SIMON_detectGames(const FSList &fslist) { Engine *Engine_SIMON_create(GameDetector *detector, OSystem *syst) { const ObsoleteGameID *o = obsoleteGameIDsTable; while (o->from) { - if (!scumm_stricmp(detector->_game.gameid, o->from)) { - detector->_game.gameid = o->to; + if (!scumm_stricmp(detector->_gameid.c_str(), o->from)) { + detector->_gameid = o->to; ConfMan.set("gameid", o->to); diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 47b4a9e780..fb2c352523 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -135,7 +135,7 @@ void SwordEngine::errorString(const char *buf1, char *buf2) { SwordEngine::SwordEngine(GameDetector *detector, OSystem *syst) : Engine(syst) { - if (0 == strcmp(detector->_game.gameid, "sword1demo")) + if (0 == scumm_stricmp(detector->_gameid.c_str(), "sword1demo")) _features = GF_DEMO; else _features = 0; diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index 56ae60b7ff..4abd8b1a70 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -125,7 +125,7 @@ Sword2Engine::Sword2Engine(GameDetector *detector, OSystem *syst) : Engine(syst) Common::File::addDefaultDirectory(_gameDataPath + "sword2/"); Common::File::addDefaultDirectory(_gameDataPath + "video/"); - if (0 == strcmp(detector->_game.gameid, "sword2demo")) + if (0 == scumm_stricmp(detector->_gameid.c_str(), "sword2demo")) _features = GF_DEMO; else _features = 0; -- cgit v1.2.3