diff options
author | Max Horn | 2006-02-17 00:22:53 +0000 |
---|---|---|
committer | Max Horn | 2006-02-17 00:22:53 +0000 |
commit | 7967e30c731bdc21342ef10271578e2ac5b4e9bc (patch) | |
tree | ecb8fe39598810b33781aeddc0ba78e45dba961e /engines/gob | |
parent | a96760a2fdf32a1dc3c6cb44cfd247e4b1b3ab79 (diff) | |
download | scummvm-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/gob')
-rw-r--r-- | engines/gob/gob.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 7a8bbee3bb..ae48c4a2d4 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -107,15 +107,7 @@ static const Gob::GobGameSettings gob_games[] = { }; // Keep list of different supported games -static const struct GobGameList { - const char *gameid; - const char *description; - uint32 features; - GameSettings toGameSettings() const { - GameSettings dummy = { gameid, description, features }; - return dummy; - } -} gob_list[] = { +static const GameSettings gob_list[] = { {"gob1", "Gobliiins", Gob::GF_GOB1}, {"gob2", "Gobliins 2", Gob::GF_GOB2}, {0, 0, 0} @@ -124,10 +116,10 @@ static const struct GobGameList { GameList Engine_GOB_gameList() { GameList games; - const GobGameList *g = gob_list; + const GameSettings *g = gob_list; while (g->gameid) { - games.push_back(g->toGameSettings()); + games.push_back(*g); g++; } @@ -167,9 +159,9 @@ DetectedGameList Engine_GOB_detectGames(const FSList &fslist) { if (detectedGames.isEmpty()) { printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str); - const GobGameList *g1 = gob_list; + const GameSettings *g1 = gob_list; while (g1->gameid) { - detectedGames.push_back(g1->toGameSettings()); + detectedGames.push_back(*g1); g1++; } } |