aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/magnetic/detection.h
diff options
context:
space:
mode:
authorPaul Gilbert2019-11-21 06:47:49 -0800
committerPaul Gilbert2019-11-22 18:49:07 -0800
commit9df3c85184b10a71be27209313efbc23974d1225 (patch)
tree251ff9a34997839b2567e76125350da9803be3f9 /engines/glk/magnetic/detection.h
parent9af0d1519444f6c82df24fb63be5d3def769f797 (diff)
downloadscummvm-rg350-9df3c85184b10a71be27209313efbc23974d1225.tar.gz
scummvm-rg350-9df3c85184b10a71be27209313efbc23974d1225.tar.bz2
scummvm-rg350-9df3c85184b10a71be27209313efbc23974d1225.zip
GLK: MAGNETIC: Making functions all class methods, statics into class fields
Diffstat (limited to 'engines/glk/magnetic/detection.h')
-rw-r--r--engines/glk/magnetic/detection.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/glk/magnetic/detection.h b/engines/glk/magnetic/detection.h
index 28ea70ffc2..80a8b7f557 100644
--- a/engines/glk/magnetic/detection.h
+++ b/engines/glk/magnetic/detection.h
@@ -32,6 +32,18 @@ namespace Glk {
namespace Magnetic {
/**
+ * The following game database is built from Generic/games.txt, and is used
+ * to identify the game being run. Magnetic Scrolls games don't generally
+ * supply a status line, so this data can be used instead.
+ */
+struct gms_game_table_t {
+ const uint32 undo_size; ///< Header word at offset 0x22
+ const uint32 undo_pc; ///< Header word at offset 0x26
+ const char *const name; ///< Game title and platform
+};
+typedef const gms_game_table_t *gms_game_tableref_t;
+
+/**
* Meta engine for Magnetic interpreter
*/
class MagneticMetaEngine {
@@ -57,6 +69,12 @@ public:
static void detectClashes(Common::StringMap &map);
};
+/**
+ * Look up and return the game table entry given a game's undo size and
+ * undo pc values. Returns the entry, or NULL if not found.
+ */
+extern const gms_game_table_t *gms_gameid_lookup_game(uint32 undo_size, uint32 undo_pc);
+
} // End of namespace Magnetic
} // End of namespace Glk