aboutsummaryrefslogtreecommitdiff
path: root/base/game.h
diff options
context:
space:
mode:
authorMax Horn2007-06-15 17:13:13 +0000
committerMax Horn2007-06-15 17:13:13 +0000
commite627cddd19968dcff709518e7d159475249576be (patch)
treeea0d5eb0bd71e157df22c3a1a54353082268a2be /base/game.h
parenta5c2c06a974032daa240756b567552c668fe9b90 (diff)
downloadscummvm-rg350-e627cddd19968dcff709518e7d159475249576be.tar.gz
scummvm-rg350-e627cddd19968dcff709518e7d159475249576be.tar.bz2
scummvm-rg350-e627cddd19968dcff709518e7d159475249576be.zip
Added some doxygen comments to (Plain)GameDescriptor, and added a findPlainGameDescriptor convenience function
svn-id: r27422
Diffstat (limited to 'base/game.h')
-rw-r--r--base/game.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/base/game.h b/base/game.h
index 9fd997c241..ab52601752 100644
--- a/base/game.h
+++ b/base/game.h
@@ -31,11 +31,31 @@
#include "common/array.h"
#include "common/hash-str.h"
+/**
+ * A simple structure used to map gameids (like "monkey", "sword1", ...) to
+ * nice human readable and descriptive game titles (like "The Secret of Monkey Island").
+ * This is a plain struct to make it possible to declare NULL-terminated C arrays
+ * consisting of PlainGameDescriptors.
+ */
struct PlainGameDescriptor {
const char *gameid;
- const char *description; // TODO: Rename this to "title" or so
+ const char *description;
};
+/**
+ * Given a list of PlainGameDescriptors, returns the first PlainGameDescriptor
+ * matching the given gameid. If not match is found return 0.
+ * The end of the list marked by a PlainGameDescriptor with gameid equal to 0.
+ */
+const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list);
+
+/**
+ * A hashmap describing details about a given game. In a sense this is a refined
+ * version of PlainGameDescriptor, as it also contains a gameid and a description string.
+ * But in addition, platform and language settings, as well as arbitrary other settings,
+ * can be contained in a GameDescriptor.
+ * This is an essential part of the glue between the game engines and the launcher code.
+ */
class GameDescriptor : public Common::StringMap {
public:
GameDescriptor() {
@@ -90,7 +110,7 @@ class Plugin;
namespace Base {
-// TODO: Find a better place for this function.
+// TODO: Find a better name & place for this function.
GameDescriptor findGame(const Common::String &gameName, const Plugin **plugin = NULL);
} // End of namespace Base