[Scummvm-git-logs] scummvm master -> 209a738cbba668a0db1c9ccc230ecdfcf0e3e1e8
dreammaster
paulfgilbert at gmail.com
Wed Sep 9 02:23:55 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
209a738cbb GLK: COMPREHEND: Fix loading of OO-Topos header data
Commit: 209a738cbba668a0db1c9ccc230ecdfcf0e3e1e8
https://github.com/scummvm/scummvm/commit/209a738cbba668a0db1c9ccc230ecdfcf0e3e1e8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-09-08T19:23:36-07:00
Commit Message:
GLK: COMPREHEND: Fix loading of OO-Topos header data
Changed paths:
engines/glk/comprehend/game_data.cpp
diff --git a/engines/glk/comprehend/game_data.cpp b/engines/glk/comprehend/game_data.cpp
index 9fc1f1ca89..9282eacc13 100644
--- a/engines/glk/comprehend/game_data.cpp
+++ b/engines/glk/comprehend/game_data.cpp
@@ -528,6 +528,8 @@ void GameData::parse_header(FileBuffer *fb) {
fb->seek(0);
header->magic = fb->readUint16LE();
+ fb->skip(2); // Unknown in earlier versions
+
switch (header->magic) {
case 0x2000: /* Transylvania, Crimson Crown disk one */
case 0x4800: /* Crimson Crown disk two */
@@ -536,13 +538,12 @@ void GameData::parse_header(FileBuffer *fb) {
break;
case 0x93f0: /* OO-Topos */
- _comprehendVersion = 2;
- _magicWord = (uint16)-0x5a00;
- break;
-
case 0xa429: /* Talisman */
_comprehendVersion = 2;
_magicWord = (uint16)-0x5a00;
+
+ // Actions table starts right at the start of the file
+ fb->seek(0);
break;
default:
@@ -550,15 +551,8 @@ void GameData::parse_header(FileBuffer *fb) {
break;
}
- /* FIXME - Second word in header has unknown usage */
- parse_header_le16(fb, &dummy);
-
- /*
- * Action tables.
- *
- * Layout depends on the comprehend version.
- */
- for (int idx = 0; idx < (_comprehendVersion == 1 ? 7 : 5); ++idx)
+ /* Basic data */
+ for (int idx = 0; idx < 7; ++idx)
parse_header_le16(fb, &header->addr_actions[idx]);
parse_header_le16(fb, &header->addr_vm);
More information about the Scummvm-git-logs
mailing list