The workaround itself doesn't require any v7/v8-only feature, and
there's no much sense in saving a few bytes for such a small
workaround. Others Dig/FT/COMI workarounds don't use an ifdef for
this anyway.
The entirety of v3 games use script-based controls for textSpeed values, which were
broken by yet another 15 years old workaround which didn't take into account the fact
that boot-up is not the only moment that textSpeed is changed by the scripts, but is also
changed when sending the '<' '>' key commands.
The fire animation is sped up along with the rest of the game while the
messenger nymph is flying. Slow it down to make it appear to run at
constant speed throughout the intro. This does not apply to the VGA
talkie version, because there the fire isn't animated.
FT, DIG and COMI interpreters explicitly ask for flag == 2 instead of flag >= 0x80.
This fixes a class of bugs in which some scripts which should have been paused
still manage to execute.
I don't see anything in the script that would do it (well, there is one
but that may be just an accidental leftover from the DOS version), so
trigger on the end of each delay throughout the credits script.
Pretty? No, I guess not. But it's at the end of the game, so there
should be no risk of it messing things up.
It looks like the input script - or at least this particular input
script - expects to be called twice. Once to clear the verbs and once
for the recipient to accept/reject your offer. In the 256-color DOS
version, both of these are done during the same call.
I don't know if this applies to other input scripts as well, but I'm
limiting it to this one for now.
Unlike the PC version, the practice mode box appears to be hard-coded in
the Mac version. The script that draws the box in the PC version just
sets variables in the Mac version. This implementation is based on
screenshots.
To keep things a bit saner, I've split out the Mac-specific drawing to
its own file.
Due to poor translation of the v2 script to v5 an if statement jumps in the
middle of a cutscene causing a endCutscene() without a begin cutscene()
Previous "fixes" do improve the code, but do not fix this cutscene issue.
See also
https://bugs.scummvm.org/ticket/3099https://bugs.scummvm.org/ticket/5624
and commits
1d40f78499
Fixes the mistranslation of getState08(465) into classOfIs(465,[0]) at 001A
0725be325f
Fixes several mistranslations of setClass
This situation is triggered normally when _currentScript is 0xFF,
but it could potentially also happen if _currentScript is some
other number >= NUM_SCRIPT_SLOT, so the check is a bit more
conservative than it might appear to need to be.
The initializeLocals() function assumes that it can copy 25
elements when being provided an array of values. But this array
was frequently a lot smaller than that. I've introduced a constant
for the number of locals (though VirtualMachineState has one more
for some reason), and fixed the array sizes in a number of places.
CID 1003951, 1003952, 1003953, 1003955, 1003956, 1003959, 1003960,
1003961, 1003963, 100394, 1003965
Unlike the EGA DOS version, it doesn't seem to be the scripts
that keep track of double-clicks. Instead, the engine sets a
variable to indicate them. Unlike the DOS version, we don't check
that the second click happens close enough on the screen to the
first one. We could, but it seemed needlessly complicated.
command in v0
If for instance an object necessary for the sentence command is not reachable or pickupable (try to use faucet (object 55) with jar with water in microwave (object 50), the pick-up script of the jar will tell the actor to pickup object 99 (jar not in microwave)) the actor will try to pick-up the jar infinitely.
This is fixed by counting the amount of nested scripts the sentence command has called (directly or indirectly) so far and aborts it if there have been too many.