aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2
diff options
context:
space:
mode:
authorMax Horn2006-02-17 00:22:53 +0000
committerMax Horn2006-02-17 00:22:53 +0000
commit7967e30c731bdc21342ef10271578e2ac5b4e9bc (patch)
treeecb8fe39598810b33781aeddc0ba78e45dba961e /engines/sword2
parenta96760a2fdf32a1dc3c6cb44cfd247e4b1b3ab79 (diff)
downloadscummvm-rg350-7967e30c731bdc21342ef10271578e2ac5b4e9bc.tar.gz
scummvm-rg350-7967e30c731bdc21342ef10271578e2ac5b4e9bc.tar.bz2
scummvm-rg350-7967e30c731bdc21342ef10271578e2ac5b4e9bc.zip
Added global toGameSettings() template function for convenience; simplified GameSettings usage in some engines
svn-id: r20739
Diffstat (limited to 'engines/sword2')
-rw-r--r--engines/sword2/sword2.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 5f4c11917e..a864ee9b79 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -51,10 +51,6 @@ struct Sword2GameSettings {
const char *description;
uint32 features;
const char *detectname;
- GameSettings toGameSettings() const {
- GameSettings dummy = { gameid, description, features };
- return dummy;
- }
};
static const Sword2GameSettings sword2_settings[] = {
@@ -69,7 +65,7 @@ GameList Engine_SWORD2_gameList() {
const Sword2GameSettings *g = sword2_settings;
GameList games;
while (g->gameid) {
- games.push_back(g->toGameSettings());
+ games.push_back(toGameSettings(*g));
g++;
}
return games;
@@ -91,7 +87,7 @@ DetectedGameList Engine_SWORD2_detectGames(const FSList &fslist) {
if (0 == scumm_stricmp(g->detectname, gameName)) {
// Match found, add to list of candidates, then abort inner loop.
- detectedGames.push_back(g->toGameSettings());
+ detectedGames.push_back(toGameSettings(*g));
break;
}
}