diff options
author | Eugene Sandulenko | 2007-01-20 21:27:57 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-01-20 21:27:57 +0000 |
commit | cd8a5f3a98287fe7366db100c2fb45ff986e2d1b (patch) | |
tree | c3acca9454ff39fc71da8444eb98494683a6261f /engines/sword2 | |
parent | 47b1321d1520eabcfa4d971bd945f4461eeada49 (diff) | |
download | scummvm-rg350-cd8a5f3a98287fe7366db100c2fb45ff986e2d1b.tar.gz scummvm-rg350-cd8a5f3a98287fe7366db100c2fb45ff986e2d1b.tar.bz2 scummvm-rg350-cd8a5f3a98287fe7366db100c2fb45ff986e2d1b.zip |
First phase of detection-related plugins interface improvements. Now plugins
return StringMap instead of fixed list of parameters. This adds great
flexibility.
Current patch should not alter any functionality, i.e. if there are regressions,
submit a report. Phase 2 will benefit from these changes and will come later.
svn-id: r25134
Diffstat (limited to 'engines/sword2')
-rw-r--r-- | engines/sword2/sword2.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index adaeef1ba5..f0f87cc370 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -65,7 +65,7 @@ GameList Engine_SWORD2_gameIDList() { const Sword2::GameSettings *g = Sword2::sword2_settings; GameList games; while (g->gameid) { - games.push_back(*g); + games.push_back(GameDescriptor(g->gameid, g->description)); g++; } return games; @@ -78,11 +78,11 @@ GameDescriptor Engine_SWORD2_findGameID(const char *gameid) { break; g++; } - return *g; + return GameDescriptor(g->gameid, g->description); } -DetectedGameList Engine_SWORD2_detectGames(const FSList &fslist) { - DetectedGameList detectedGames; +GameList Engine_SWORD2_detectGames(const FSList &fslist) { + GameList detectedGames; const Sword2::GameSettings *g; // TODO: It would be nice if we had code here which distinguishes @@ -97,7 +97,7 @@ DetectedGameList Engine_SWORD2_detectGames(const FSList &fslist) { if (0 == scumm_stricmp(g->detectname, fileName)) { // Match found, add to list of candidates, then abort inner loop. - detectedGames.push_back(*g); + detectedGames.push_back(GameDescriptor(g->gameid, g->description)); break; } } @@ -118,10 +118,10 @@ PluginError Engine_SWORD2_create(OSystem *syst, Engine **engine) { // Invoke the detector Common::String gameid = ConfMan.get("gameid"); - DetectedGameList detectedGames = Engine_SWORD2_detectGames(fslist); + GameList detectedGames = Engine_SWORD2_detectGames(fslist); for (uint i = 0; i < detectedGames.size(); i++) { - if (detectedGames[i].gameid == gameid) { + if (detectedGames[i].gameid() == gameid) { *engine = new Sword2::Sword2Engine(syst); return kNoError; } |