From d2f78184af00cd91f3f1f251199a436b53f4ae64 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 9 Mar 2006 01:42:56 +0000 Subject: - added new toDetectedGame() template function (analog to toGameSettings) - made use of the new DetectedGame constructor from my last commit - some related cleanup svn-id: r21149 --- engines/simon/game.cpp | 10 ++++++---- engines/simon/simon.h | 5 ----- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'engines/simon') diff --git a/engines/simon/game.cpp b/engines/simon/game.cpp index 8539c9559a..748a502455 100644 --- a/engines/simon/game.cpp +++ b/engines/simon/game.cpp @@ -1069,10 +1069,12 @@ DetectedGameList GAME_ProbeGame(const FSList &fslist, int **retmatches) { // and now push them into list of detected games for (i = 0; i < index; i++) - if (matches[i] != -1) - detectedGames.push_back(DetectedGame(gameDescriptions[matches[i]].toGameSettings(), - gameDescriptions[matches[i]].language, - gameDescriptions[matches[i]].platform)); + if (matches[i] != -1) { + GameDescription &g = gameDescriptions[matches[i]]; + detectedGames.push_back(DetectedGame(g.name, g.title, + g.language, + g.platform)); + } if (retmatches) { *retmatches = (int *)calloc(ARRAYSIZE(gameDescriptions), sizeof(int)); diff --git a/engines/simon/simon.h b/engines/simon/simon.h index 1c0e2a1c84..02199e037f 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -126,11 +126,6 @@ struct GameDescription { uint32 features; Common::Language language; Common::Platform platform; - - GameSettings toGameSettings() const { - GameSettings dummy = { name, title }; - return dummy; - } }; DetectedGameList GAME_ProbeGame(const FSList &fslist, int **matches = NULL); -- cgit v1.2.3