Thought there was already a topic for this, but couldn't find one.
In Quest For Glory 1 (Hero's Quest), in Feature.sc, Act:canBeHere, there is this clause in an if statement:
(and
(== illegalBits 0)
(& signal --UNKNOWN-PROP-NAME--) ; SCI Companion couldn't figure out the property name.
)
You can SV.exe has problems with it too:
code_0825: pTos illegalBits
ldi $0
eq?
bnt code_0833
pTos signal
pToa property_26044 // It doesn't know what property it is either... property_26044!
and
code_0833: bt code_0843
The byte code sequence is $62 $cb78, which is pToa with a value of $cb78 (52088 decimal... SV.exe shows half this number, I don't know why... anyway). Selector numbers should be less than $1000 generally (look at the selector vocab resource). $cb78 is crazy.
If you look in other games' implementations of canBeHere, you can see that the signal is supposed to be compared to $2000, which is the ignoreHorizon flag (or possibly $4000, ignAct - different games do different things). That is, it's supposed to look like this:
(and
(== illegalBits 0)
(& signal ignoreHorizon) ; what it's supposed to be
)
(That would be a ldi operation, which would be the byte code sequence $34 $2000).
So I guess the mystery is, what was the typo/bug in the original source code that cause that kind of byte code to be emitted?
Maybe the name of whatever flag they were using somehow collided with the name of a property selector? (But then why the crazy property selector number?)