Previously, all property list inserts would happen twice, causing
widespread mayhem. Property lists are allowed to have duplicate keys,
which may have disguised the impact of this bug.
Fixes lots of voice clips playing twice in DEVO Presents: Adventures
of the Smart Patrol.
It's possible to call a method designed for a me object with any
nonsense in the first argument. By design, this should look up the
clean function handler in the script context instead of the one in the
offspring object. However the "me" handle needs to be nulled out,
or else accessing properties will leak through from the previous
object.
Fixes saving games in DEVO Presents: Adventures of the Smart Patrol.
If the play state for the score stops for whatever reason, Lingo will
attempt to bail early so the movie can switch over. Freeze the state so
that we can pick up execution where we left off.
Fixes the location/time announcements in DEVO Presents: Adventures of
the Smart Patrol.
At first glance it would seem we could use funcSym.nargs for this,
except it is fixed to the number of args in the function definition.
We also can't derive it from the argument list that is sent through,
as it is truncated/padded with VOIDs. To keep things simple, track
paramCount as part of CFrame.
Previously, the Lingo state would be frozen by persisting the frames on
the bottom of the callstack with a special flag. This required extra
logic to determine whether or not the callstack was intended to be empty
after execution finished, with some complex edge cases.
The new approach is to swap out the LingoState object on the window,
meaning that an empty callstack always signifies execution has completed.
It remains to be seen if we'll need to track more than one frozen
context; for now it seems to be okay.
Fixes driving to locations in DEVO Presents: Adventures of the Smart Patrol.
The previous arrangement was to copy the bits of Lingo state back and forth from
the Window object to the Lingo instance, and query the window for the
callstack. This refactor consolidates the current Lingo state into a single
struct, owned by the Window object and accessible via a pointer on the
Lingo object.
Fixed exit door in the7colors, where the frame had a looping
birds chirping sound together with the following Lingo:
if the soundbusy of 2 then go to the frame
And that led to an infinite loop and inability to pass through the
opened door.
The original apparently is returning 0 in-between the sound loops
since it manually restarts the sound after its completion. We, in
contrast, are optimizing that and using LoopedAudioStream
since f48dbb43b6b6483ef2160ae3d087eb2e0f06c7e5
playStream() is called right after setting loopPtr, which was leading
to immediate reset of loopPtr. Thus, we were not able to control
the looping sounds