When clicking "buy clue" in the microscope puzzle, the game could crash with a division by zero in
cartesian:buyClue, depending on the initialization of the puzzle itself. Because the initialization is
random and non-deterministic, this crash would only occur very rarely
When converting DrawList to use Common::Array in the previous commit,
I couldn't see a reason to not reuse them in frameOut() and avoid
the extra heap allocations on every frame.
QFG4 attempts to copy from a null array/string, and this had no effect
in the original interpreter. Now we behave the same.
Update kFileIOOpen to handle the script's subsequent attempt to open a
nameless file.
Fixes bug #14646
Fixes a crash due to an assertion failure that appeared in Google Play
Console. This would occur if a script somehow called kMessage to get
the next message from the stack before calling kMessage to initialize.
We don't know what game caused this, but I have confirmed that this was
not a fatal error in the original interpreter. I then tested this with
a custom script that calls kMessage in the wrong order.
Now our behavior matches the original and we log a warning.
Fixes bug #14613
Tweak in scriptdebug.cpp disassembler logic because the new logging wasn't quite working how it was expected.
- These opcodes weren't showing up with their selectors in all scenarios
- Improve output formatting
Show additional selector name context when push0, push1, push2 opcodes are used.
Possible matching selector names are always shown for the debugger disassembly when a `pushi` opcode is encountered. This is great as it gives additional context when push is used for call/send related invocations.
It would be nice to additionally show *possible* matching `selector` methods/properties when `push0`, `push1` or `push2` is encountered because selector names start at 0 so the dissassembly never shows selectors 0 through 2 inclusive.
This happens during the first meeting in the LSL5 intro. There is no
consensus on how fast this animation should run, but ScummVM runs it
extremely slow, possibly due to speed throttling. This speeds it up
by updating the animation ever 6th time the doit script is run,
rather than the original every 32nd time.
Fixes KQ4 introduction not automatically ending
Thanks to @athrxx for locating the correct behavior in disassembly
Thanks to @eriktorbjorn for reporting this
The RateConverter class has been modified to allow for
variable input and output rates. The optimized code paths
for copy/simple conversions are retained, but have been moved
inside separate functions instead of subclasses. The templatization
of the stereo parameters has been maintained, and is implemented
via the newly-added RateConverter_Impl template class.
Internal variables have been renamed to be more readable. The
flow() function has been renamed to convert(). The drain()
function has been removed, since it was never implemented
or used anywhere.
Allows viewing and editing local variables in any loaded script.
This is different from `vm_vars` because vm_vars only operates
on variables in the current execution context.