diff --git a/engines/glk/comprehend/game_data.cpp b/engines/glk/comprehend/game_data.cpp index 192c9a1595b..bbf0ee04e8a 100644 --- a/engines/glk/comprehend/game_data.cpp +++ b/engines/glk/comprehend/game_data.cpp @@ -574,14 +574,13 @@ void GameData::parse_word_map(FileBuffer *fb) { _wordMaps.push_back(map); } - /* Consume two more null bytes (type and index were also null) */ - fb->skip(2); - /* * Parse the target word table. Each entry has a dictionary * index/type. The first and second words from above map to the * target word here. E.g. 'go north' -> 'north'. */ + fb->seek(_header.addr_word_map_target); + for (i = 0; i < _wordMaps.size(); i++) { WordMap &map = _wordMaps[i]; @@ -842,8 +841,7 @@ void GameData::parse_header(FileBuffer *fb) { parse_header_le16(fb, &header->addr_dictionary); parse_header_le16(fb, &header->addr_word_map); - /* FIXME - what is this for? */ - parse_header_le16(fb, &dummy); + parse_header_le16(fb, &header->addr_word_map_target); addr_dictionary_end = header->addr_word_map; /* Rooms */ diff --git a/engines/glk/comprehend/game_data.h b/engines/glk/comprehend/game_data.h index eef6de0970b..a3b3f5a7116 100644 --- a/engines/glk/comprehend/game_data.h +++ b/engines/glk/comprehend/game_data.h @@ -319,6 +319,7 @@ struct GameHeader { uint16 addr_dictionary; uint16 addr_word_map; + uint16 addr_word_map_target; uint16 addr_strings; uint16 addr_strings_end;