kBitmap's kernel signature is incorrect and out of sync with the
signatures of its sub operations, causing valid calls to subop #1
(BitmapDestroy) to fail. BitmapDestroy allows an invalid reference
to be passed, which GK1 Mac does when decoding the Rada drums in
room 410, but kBitmap's signature doesn't.
Fixed by applying the correct signature, which is the same as kFileIO
which has a similar structure: require an integer for the subop and
then allow anything, including invalid references.
Fixes KQ7 deleting the wrong save game and other bugs.
Most of these digit strings start with zero and so they've
been parsed as octal instead of decimal.
Factors some common save game code into functions and creates an
overload of GuestAdditions::runSaveRestore that doesn't rely on
SCI memory for returning the description string, all of which will
be used by the custom save/restore kMacPlatform32 subops.
Updates the generic SCI32 video benchmark patch to be compatible with
all game versions, including localized versions of SQ6 and Mac versions
of SQ6 and RAMA. Removed HOYLE5 patches as it doesn't run the benchmark.
Fixes several problems with the SoundResource class:
- Constructor doesn't fully initialize object if resource doesn't exist
- Destructor crashes if object not fully initialized
- Constructor has no mechanism to report failure
- Callers believe failure is reported by constructor returning null
- SoundCommandParser::initSoundResource attempts to pre-detect failure
insufficiently in the absence of a formal mechanism.
SoundResource now always fully initializes, the destructor no longer
accesses uninitialized memory, and an exists() method has been added
which callers now test.
SQ6 Mac can now progress past the main menu.
Loading is not normally allowed while audio is being played in SCI games.
Stopping sounds is needed in ScummVM, as the player may load via
Control-F5 at any point, even while a sound is playing.
The current patch mechanism allows only replacing intructions in current
scripts, but not adding new instructions out of nowhere.
Thus, issue like #9646 is about to be closed as WONTFIX.
This new mechanism adds a hook on vm.cpp, before executing opcodes, and
if required, executs a new code.
It solves one of the issues of #9646, the others can be solved as well using that mechanism.