Failing to reduce the size of the ScreenItem arrays causes other
parts of the decoder (like RobotDecoder::getFrameSize) to try
reading ScreenItems that were already destroyed and nulled out in
the list. (In SSCI, the screen item count was held in a separate
property instead of being part of the screen item list.)
The original interpreter created subdirectories for each in-game
profile, but copying this behaviour would add a lot of
superfluous complexity to the save game system in ScummVM, and
may not be portable to all supported platforms. Instead, when the
game tries to save its files to a subdirectory, the backslash in
the file name is replaced with an underscore so it can be created
successfully on filesystems where backslash is an illegal file
name character.
This has a side-effect of causing all save games to be displayed
under all profiles, instead of just the ones "belonging" to a
particular profile, but this seems like a reasonable trade-off
given that there is no reason to play this game with more than one
profile.
This is most noticeable at the beginning of the game during
benchmarking, where the benchmarking loop used to cause the mouse
to get stuck for the duration of the benchmark.
That is yet-another deviation from clean grammar rules in origial.
In order to avoid mess, two-word builtins are implemented, and
'sound <op>' are also switched to that method.
All of the Director 3.0 grammar should be parseable now, albeit buggy,
especially because many stubs do not push their result values
which leads to a stack underflow.
This fix is not totally clean as it spuriously uses the
serverLabelPosition variable in one case of the preprocessor ifdef
configuration, but with the current structure, this is a simple hack to
fix.
A better solution would be to rewrite some of these functions to remove
some of the preprocessor usage if possible.
SCI3 includes four new opcodes:
* op_info[0x26][0] puts -info- flag in accumulator
* op_infoSP[0x26][1] pushes -info- flag to stack
* op_superP[0x27][0] puts -super- reference in accumulator
* op_superPSP[0x27][1] pushes -super- reference to stack
The implementation of these opcodes was correct already, but the
opcode names given were a bit misleading (the value is not always
stored to accumulator), and magic numbers were used for these
opcodes in places.
A review of the opcode table in Phant2 indicates that there are
no other new opcodes for SCI3.