At least the German Obsidian release stores the resource files directly
in a folder called 'RESOURCE' in the root directory of the game installation.
Without this patch, one needs to manually copy the files located in the
RESOURCE folder to the game's root directory.
The implementation of std::list::erase invalidates iterators to the
erased item. However our implementation in Common::List does not.
And the SpriteCache code relied on this behaviour. So instead we
have to invalidate the iterators manually.
In particular the SpriteCache class can call this function with both
iterators pointing to the same item (when trying to move an item to
the start of thr MRU list, and it is already the first item).
Instead of returning an iterator to the inserted item, it was
returning an iterator to the next item. This was for example causing
bugs in the SpriteCache.
According to the manual, you can execute commands by clicking on the
sentence line. But this doesn't work with the v1 or v2 DOS versions,
even though it works with the C64 demo. This is because the verb script
doesn't for this, so we have to do that ourselves. This is loosely based
on how Zak McKracken does it.
The Ultimate Talkie edition of Monkey Island 2 has a small script error
when you try to sell back your hub cap or your pirate hat to the antique
dealer. It wasn't doing a comparison with the proper object number, and
so it would play a fallback line with no voice.
playIntroSequence would not set the playVideo stopMusic parameter to false,
so the music would be immediately stopped. Also, the CfoVideoTrack destructor
would stop all mixer channels, including the music. This would cause the music
to stop at the end of each video. This is replaced by a call to stopAllSounds,
and stopMusic is only called when the music is in the video data.
This commit also fixes an issue where playing a sound on a channel where a
sound was already active would not stop the old sound, but replace the sound
handle with a new one. The old sound could then no longer be accessed by the
sound class.
This is to allow to distinguish implementations in case there were games
using older variants (although it's not clear if any had yet).
From upstream 11315b3487d22ce4830d60fad36ae7124aa45e55
This fixes a possible infinite loop in VocStream. It depends on the stream size
matching the size specified in the VOC block headers, but if the size in the
headers is incorrect and larger than the stream size, it will keep trying to
read the stream. This is fixed by adding an end-of-stream check to the error
check.
SFX and speech data are actually VOC format without the header. This was not
correctly processed and non-audio data was played as audio, causing popping.
This commit adds a VocStream subclass to handle this variant of the VOC format.