diff options
author | Paul Gilbert | 2019-07-14 10:26:03 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-07-14 10:47:52 -0700 |
commit | bb9b52f9c6d0d32e4dd9e9d7a0bf78c3492e7e59 (patch) | |
tree | 2604df6f160ea47440a409aa8ad13bd4af4816bd /engines/glk | |
parent | d524d36a6a2370decf2fcf8f4a48e8db99eec338 (diff) | |
download | scummvm-rg350-bb9b52f9c6d0d32e4dd9e9d7a0bf78c3492e7e59.tar.gz scummvm-rg350-bb9b52f9c6d0d32e4dd9e9d7a0bf78c3492e7e59.tar.bz2 scummvm-rg350-bb9b52f9c6d0d32e4dd9e9d7a0bf78c3492e7e59.zip |
GLK: ADVSYS: Change detections list to use common GlkDetectionEntry
Diffstat (limited to 'engines/glk')
-rw-r--r-- | engines/glk/advsys/detection.cpp | 4 | ||||
-rw-r--r-- | engines/glk/advsys/detection_tables.h | 25 |
2 files changed, 10 insertions, 19 deletions
diff --git a/engines/glk/advsys/detection.cpp b/engines/glk/advsys/detection.cpp index f14fda2983..bb7c4e8319 100644 --- a/engines/glk/advsys/detection.cpp +++ b/engines/glk/advsys/detection.cpp @@ -71,10 +71,10 @@ bool AdvSysMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames & gameFile.seek(0); Common::String md5 = Common::computeStreamMD5AsString(gameFile, 5000); - int32 filesize = gameFile.size(); + uint32 filesize = gameFile.size(); // Scan through the AdvSys game list for a match - const AdvSysGame *p = ADVSYS_GAMES; + const GlkDetectionEntry *p = ADVSYS_GAMES; while (p->_md5 && p->_filesize != filesize && md5 != p->_md5) ++p; diff --git a/engines/glk/advsys/detection_tables.h b/engines/glk/advsys/detection_tables.h index e109f53369..561f8bd3ca 100644 --- a/engines/glk/advsys/detection_tables.h +++ b/engines/glk/advsys/detection_tables.h @@ -27,15 +27,6 @@ namespace Glk { namespace AdvSys { -/** - * Game descriptor for Scott Adams games - */ -struct AdvSysGame { - const char *_md5; - const char *_gameId; - int32 _filesize; -}; - const PlainGameDescriptor ADVSYS_GAME_LIST[] = { { "advsys", "AdvSys Game" }, @@ -49,15 +40,15 @@ const PlainGameDescriptor ADVSYS_GAME_LIST[] = { { nullptr, nullptr } }; -const AdvSysGame ADVSYS_GAMES[] = { - { "2246a2686a07c714868680eaf980ece9", "bustedadvsys", 79091 }, - { "120d7041dfa000c9a313a8b0ae9cef33", "starshipcolumbus", 76032 }, - { "746963e82552f95b5e743fe24ecd1ec3", "elves87", 77947 }, - { "892217ab8d902a732e82c55efd22931d", "keytotime", 24941 }, - { "3a2a3cc24709ff3272f3a15d09b5e63e", "onehand", 95762 }, - { "e55fff2ac51a8a16b979541e8d3210d8", "pirating", 29529 }, +const GlkDetectionEntry ADVSYS_GAMES[] = { + DT_ENTRY0("bustedadvsys", "2246a2686a07c714868680eaf980ece9", 79091), + DT_ENTRY0("starshipcolumbus", "120d7041dfa000c9a313a8b0ae9cef33", 76032), + DT_ENTRY0("elves87", "746963e82552f95b5e743fe24ecd1ec3", 77947), + DT_ENTRY0("keytotime", "892217ab8d902a732e82c55efd22931d", 24941), + DT_ENTRY0("onehand", "3a2a3cc24709ff3272f3a15d09b5e63e", 95762), + DT_ENTRY0("pirating", "e55fff2ac51a8a16b979541e8d3210d8", 29529), - { nullptr, nullptr, 0 } + DT_END_MARKER }; } // End of namespace AdvSys |