aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorMax Horn2006-04-16 13:12:23 +0000
committerMax Horn2006-04-16 13:12:23 +0000
commit6c076f80d7a214fb20f24e4054c7c32a39049168 (patch)
treec6137100efd8ae3af48a80389cacd0f281237d25 /engines/saga
parent206fdf0528bc72debd6ab7f872df0da1effdd8bd (diff)
downloadscummvm-rg350-6c076f80d7a214fb20f24e4054c7c32a39049168.tar.gz
scummvm-rg350-6c076f80d7a214fb20f24e4054c7c32a39049168.tar.bz2
scummvm-rg350-6c076f80d7a214fb20f24e4054c7c32a39049168.zip
Reduced dependencies on base/plugins.h
svn-id: r21940
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/game.cpp18
-rw-r--r--engines/saga/saga.h3
2 files changed, 9 insertions, 12 deletions
diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp
index 041db02494..e9b215e99d 100644
--- a/engines/saga/game.cpp
+++ b/engines/saga/game.cpp
@@ -1495,11 +1495,11 @@ static GameDescription gameDescriptions[] = {
},
};
-DetectedGame GameDescription::toDetectedGame() {
+DetectedGame toDetectedGame(const GameDescription &g) {
const char *title;
- title = saga_games[gameType].description;
- DetectedGame dg(name, title, language, platform);
- dg.updateDesc(extra);
+ title = saga_games[g.gameType].description;
+ DetectedGame dg(g.name, title, g.language, g.platform);
+ dg.updateDesc(g.extra);
return dg;
}
@@ -1593,7 +1593,7 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P
}
}
if (!fileMissing) {
- debug(2, "Found game: %s", gameDescriptions[i].toDetectedGame().description.c_str());
+ debug(2, "Found game: %s", toDetectedGame(gameDescriptions[i]).description.c_str());
matched[matchedCount++] = i;
}
}
@@ -1621,13 +1621,13 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P
for (i = 0; i < matchedCount; i++) {
if ((gameDescriptions[matched[i]].language != language && language != Common::UNK_LANG) ||
(gameDescriptions[matched[i]].platform != platform && platform != Common::kPlatformUnknown)) {
- debug(2, "Purged %s", gameDescriptions[matched[i]].toDetectedGame().description.c_str());
+ debug(2, "Purged %s", toDetectedGame(gameDescriptions[matched[i]]).description.c_str());
matched[i] = -1;
continue;
}
if (gameDescriptions[matched[i]].filesCount < maxcount) {
- debug(2, "Purged: %s", gameDescriptions[matched[i]].toDetectedGame().description.c_str());
+ debug(2, "Purged: %s", toDetectedGame(gameDescriptions[matched[i]]).description.c_str());
matched[i] = -1;
}
}
@@ -1676,7 +1676,7 @@ bool SagaEngine::initGame() {
error("SagaEngine::loadGame wrong gameNumber");
}
- _gameTitle = gameDescriptions[gameNumber].toDetectedGame().description;
+ _gameTitle = toDetectedGame(gameDescriptions[gameNumber]).description;
debug(2, "Running %s", _gameTitle.c_str());
_gameNumber = gameNumber;
@@ -1698,7 +1698,7 @@ DetectedGameList GAME_detectGames(const FSList &fslist) {
count = detectGame(&fslist, Common::UNK_LANG, Common::kPlatformUnknown, matches);
for (int i = 0; i < count; i++)
- detectedGames.push_back(gameDescriptions[matches[i]].toDetectedGame());
+ detectedGames.push_back(toDetectedGame(gameDescriptions[matches[i]]));
free(matches);
return detectedGames;
}
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 450b21ec71..f4d542ce0f 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -28,7 +28,6 @@
#include "base/engine.h"
#include "common/stream.h"
-#include "base/plugins.h"
#include "saga/gfx.h"
#include "saga/list.h"
@@ -517,8 +516,6 @@ struct GameDescription {
uint32 features;
Common::Language language;
Common::Platform platform;
-
- DetectedGame toDetectedGame();
};
struct SaveFileData {