aboutsummaryrefslogtreecommitdiff
path: root/base/plugins.h
diff options
context:
space:
mode:
authorMax Horn2006-03-09 01:42:56 +0000
committerMax Horn2006-03-09 01:42:56 +0000
commitd2f78184af00cd91f3f1f251199a436b53f4ae64 (patch)
tree140adfdc6fd1ae851a1093d4e2cf8056ae361b52 /base/plugins.h
parent0d4b1a2c8579b88f7ddcf252ab4a317fd6d2576b (diff)
downloadscummvm-rg350-d2f78184af00cd91f3f1f251199a436b53f4ae64.tar.gz
scummvm-rg350-d2f78184af00cd91f3f1f251199a436b53f4ae64.tar.bz2
scummvm-rg350-d2f78184af00cd91f3f1f251199a436b53f4ae64.zip
- 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
Diffstat (limited to 'base/plugins.h')
-rw-r--r--base/plugins.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/base/plugins.h b/base/plugins.h
index 179f2cf991..4ac93baaf3 100644
--- a/base/plugins.h
+++ b/base/plugins.h
@@ -46,8 +46,7 @@ struct DetectedGame {
const char *description;
Common::Language language;
Common::Platform platform;
- DetectedGame() : language(Common::UNK_LANG), platform(Common::kPlatformUnknown) {}
- DetectedGame(const char *g, const char *d,
+ DetectedGame(const char *g = 0, const char *d = 0,
Common::Language l = Common::UNK_LANG,
Common::Platform p = Common::kPlatformUnknown)
: gameid(g), description(d), language(l), platform(p) {}
@@ -57,6 +56,13 @@ struct DetectedGame {
: gameid(game.gameid), description(game.description), language(l), platform(p) {}
};
+template <class T>
+DetectedGame toDetectedGame(const T &g) {
+ DetectedGame dummy(g.gameid, g.description);
+ return dummy;
+}
+
+
/** List of detected games. */
typedef Common::Array<DetectedGame> DetectedGameList;