Community

SCI Programming => SCI Syntax Help => Topic started by: troflip on June 14, 2016, 04:19:12 AM

Title: Decompiler mysteries 2
Post by: troflip on June 14, 2016, 04:19:12 AM
Also in QFG2... The decompiler produces a bunch of "--invalid--" tokens in Said strings. It turns out (of course), that these *are* valid. They just correspond to duplicate words in the vocab resource.

For example, QFG2 has:
word group 451:    open       verb
word group 1246:  open       verb/noun

When Companion loads the vocab resource, it assembles a dictionary of word -> group, and assumes each word is unique. So one word goes missing, and the decompiler can't map from word group to word.

So the questions are:
- Is that intended behavior for Sierra to have duplicate words? Was it used for different words in other languages maybe? (someone could probably test this)
- How did their compiler disambiguate them? 'open, open>'   -> how does it know the first open is 451, and the second one is 1246?
Title: Re: Decompiler mysteries 2
Post by: troflip on June 14, 2016, 05:16:35 PM
My guess is that the source code just had 'open'. The compiler probably saw more than one entry for it, and then compiled it with all the entries (separated by ',').