In the castle cellar, when you pull the bung out of the wine cask, a sound is
played for the running wine. However, when the cask runs empty, the sound is
not stopped. Also, when the Skorl starts drinking the wine, the sound is not
restarted when you enter the room, and it is also not stopped when the wine
runs out. These issues exist with the original interpreter as well.
I fixed this by adding the running wine sound when the hotspot script for the
drinking Skorl is in the loop where the Skorl is drinking, and removing the
sound when the hotspot script for the running wine is unloaded and when the
running wine stops in the animation for the drinking Skorl.
When entering town after escaping from prison, after a little while bells start
chiming constantly. This does not happen in the original interpreter.
This is caused by a script that generates the ambient thunder sounds in the
prison. After the prison escape the clearSequenceDelayList function is called,
but this did not remove the script because it is not marked as "can be cleared".
Because this script is not running in town in the original interpreter, I think
the clearSequenceDelayList function is supposed to clear all scripts, even the
ones not marked as "can be cleared". The only other scripts that this affects
are two more ambient sound scripts that are now removed after entering the
castle towards the end of the game (the only other place where
clearSequenceDelayList is called). These scripts only play sounds while in town,
so removing them has no effect (but does remove some unnecessary processing).
This change fixes several issues with the endgame animation:
- The timing for the sounds for the animation was based on the number of frames
after which the sound should start playing. However, the animation code
interpreted it as the number of frames to wait after playing the sound. This
caused the timing of the sounds to be wrong. Fixed this by moving the number of
frames up to the next sound and adding a dummy sound for the initial pause.
- The pause and thunder sound effect at the end of the animation were missing.
- The AdLib endgame sound resource was not loaded, causing a sound effect to
play instead of the endgame music.
- Changed the timing of the first text screen to match the original interpreter.
- At the last text screen, the game now waits for a keypress before quitting
the game after the music has finished. This matches the behavior of the
original interpeter.
- Made animation more responsive to user quitting the game.
- Screen no longer fades in EGA version.
Distinction between music and SFX was made based on the most significant bit in
the sound number byte. This does not accurately reflect which MIDI sequences
are music or a sound effect.
Instead, I've added a flag which can be passed to
SoundManager::musicInterface_Play to indicate whether the sound is music or a
sound effect. All music is started from hard-coded animation sequences, so this
flag can be passed from ScummVM code when appropriate.
This also removes the dependency of engines on the event recorder header
and API, and will make it easier to RandomSources that are not properly
registered.