Hmm.... signature mismatch should refer to kernel calls. The only kernel call in that method is Memory, but that should be part of the error message. Assuming the kernel call *is* the problem, that must mean one of the parameters is wrong...
Hold on a sec... Why is the room crashing when it starts in ScummVM... you implied it was fine running in Sierra's interpreter.
Oh... it crashes for me too in ScummVM. arghh... I guess I never tried the polygon stuff in ScummVM (and indeed, it is the Memory call, you didn't post the entire error message).
Full error text:
parameter 0: 0000:0006 (integer), should be null, integer
parameter 1: 0014:0042 (reference), may be any (optional) (more may follow)
parameter 2: 0029:0066 (reference, invalid)
[VM] kMemory[72]: signature mismatch via method ::export 13 (room 110, script 0,
localCall 0x408)!
Ok, this actually seems to be this code:
// Tell the caller the position of the next poly, if they care:
(if (> paramTotal 1)
Memory(memPOKE nextPoly (+ polyBuffer (+ 4 (* 4 pointCount))))
)
We're placing a pointer (which points *past* the local var buffer for room 110) into the address specified by nextPoly. Somehow, ScummVM knows this value is a pointer and not just a number (I have no idea how), and complains. Even though we will never actually read from this location. Hmmm....