aboutsummaryrefslogtreecommitdiff
path: root/engines/game.h
diff options
context:
space:
mode:
authorBastien Bouclet2018-05-06 13:09:52 +0200
committerBastien Bouclet2018-05-10 09:04:23 +0200
commit643c24db75797728087999abd8acf1ecc83757fa (patch)
tree7f35b6b3b637139aaa2a8bef8c1836583e2291a5 /engines/game.h
parent8fb149e3c7603f023dfccf2b2056a9a2fda431c2 (diff)
downloadscummvm-rg350-643c24db75797728087999abd8acf1ecc83757fa.tar.gz
scummvm-rg350-643c24db75797728087999abd8acf1ecc83757fa.tar.bz2
scummvm-rg350-643c24db75797728087999abd8acf1ecc83757fa.zip
ENGINES: Change MetaEngine::listSupportedGames to return plain game descriptors
Diffstat (limited to 'engines/game.h')
-rw-r--r--engines/game.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/engines/game.h b/engines/game.h
index 88033dcf09..a5cc4de4ec 100644
--- a/engines/game.h
+++ b/engines/game.h
@@ -50,6 +50,18 @@ struct PlainGameDescriptor {
*/
const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list);
+class PlainGameList : public Common::Array<PlainGameDescriptor> {
+public:
+ PlainGameList() {}
+ PlainGameList(const PlainGameList &list) : Common::Array<PlainGameDescriptor>(list) {}
+ PlainGameList(const PlainGameDescriptor *g) {
+ while (g->gameId) {
+ push_back(*g);
+ g++;
+ }
+ }
+};
+
/**
* Ths is an enum to describe how done a game is. This also indicates what level of support is expected.
*/
@@ -106,17 +118,7 @@ public:
};
/** List of games. */
-class GameList : public Common::Array<GameDescriptor> {
-public:
- GameList() {}
- GameList(const GameList &list) : Common::Array<GameDescriptor>(list) {}
- GameList(const PlainGameDescriptor *g) {
- while (g->gameId) {
- push_back(GameDescriptor(*g));
- g++;
- }
- }
-};
+typedef Common::Array<GameDescriptor> GameList;
/**
* A record describing the properties of a file. Used on the existing