This adds support for the OPL rhythm mode to the AdLib multisource MIDI driver.
Some games (f.e. Simon 1) use this to generate the rhythm sounds of their music.
The new option only works as intended if the engine that have TTS support apply their own settings. It cannot be globally implemented before and after runGame(), since the engines don't all use the same config manager variables (sometimes "tts_enabled_speech", "tts_enabled" or "tts_narrator, sometimes more than one of these).
Depending on other game option checkboxes. This is used to
enable/disable the semi-smooth scrolling checkboxes for FM Towns Loom,
since it's only used when smooth scrolling is enabled.
The autosave refactoring that was done in
7adad5aaf5831dc5adcee140f38aacc4a5db2518 used g_engine for identifying the
autosave slot. This worked for in-game save/load, but doesn't fit when
called from the launcher.
Fix by passing MetaEngine to SaveStateDescriptor ctor and using it for this
query.
Amends 7adad5aaf5831dc5adcee140f38aacc4a5db2518.
This employs a "lazy" approach: the "format" for the credits stays
exactly as it was, i.e., perl code. Of course one may want to change
this to another format (e.g. YAML, JSON, XML; or also shell script or
AWK, like `configure.engine` uses). But I deliberately kept it simple,
to get a minimal change that is easy to verify. Any further changes to
e.g. the format can be layered atop this.
OSystem now just returns a nullptr if there is no text to speech manager instance
(because none is compiled into the binary, or the system doesn't provide support
for it). This removed the need for the engine authors to add scummvm osystem compile
time options checks into their engine code
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 outside in the town, the game plays an ambient sound of twittering birds.
When first entering town after falling through the chute, this sound does not
play; it first starts after you enter and exit a building. This issue is
present with the original interpreter as well.
This change fixes this by calling removeSounds after playing the chute
animation. This function calls the bellsBodge function, which manages the
ambient sounds in town. Because there are no other sounds playing when first
entering town, this has no unwanted side effects.
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).
Some room exit data have the door opening or door closing sound defined as 0
(f.e. the cave doors). This means no sound should be played. ScummVM would play
sound 0 instead, which is the running water sound. This change fixes this by
checking for value 0 and not playing a sound in that case.
ScummVM did not seem to trigger door opening and closing sounds, f.e. the cell
door at the start of the game. The checks in the roomExitAnimHandler compared
hotspot IDs to room numbers, which are different sets of IDs AFAICT. Also, the
door opening part would decrease the frame counter first, then compare to the
set destination frame. The opening sound should often be triggered at the start
of the animation, but because the frame counter is decreased first, it does not
trigger at the first frame. I moved the frame counter decrease after the check
to fix this.
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.
This change fixes some small differences in the barrel animation between the
original interpreter and ScummVM:
- The animation should fade in at the start
- The music should continue until the animation has faded out
- The mouse cursor should appear after the animation has faded out
The first track in the LotT introduction fades out before the second track
starts. The fade-out is implemented by reducing the velocity of the new notes
that are being played. Because this does not affect notes that are already
playing, the fade-out effect is not very good. I've replaced this by a fade-out
using MIDI channel volume.
The music playing at the game over screen would only play once and send MIDI
CC 18 messages, which are not defined in the MIDI standard. I added looping and
removed the non-standard MIDI messages to prevent possible compatibility
issues.
The music for cutscenes and for the game over screen had some strange volume
differences compared to the original interpreter which seem to be caused by a
bug in the original interpreter where volume adjustments from sound effects
would carry over into the music. I've added a note to explain this difference.
The animation that plays when you fall through the sewage chute near the start
of the game had some issues. Fades were missing at several points, the middle
part of the animation was played only once and too slow, and when skipping the
animation it would only skip the currently playing part instead of the entire
animation.
To fix these issues, I've added an option to AnimationSequence to loop the
animation a number of times.
When the player gets caught by a Skorl, an animation is shown where the player
is punched in the face. This had a few issues:
- The animation fades in and out on the original interpreter. I've added this.
- The animation plays faster on the original interpreter. Speed was updated to
match this.
- The sound effect for this animation would play right at the start instead of
at the moment of impact. I've added a delay to the sound effect using an
AnimSoundSequence.
This fixes several issues with the introduction animation:
- The timing of the various parts of the introduction did not match the timing
of the original interpreter. The music did not properly match the images and
the last section was completely missing. I've adjusted the timing to beter
match the original interpreter.
- The VGA palette of the first text screens was broken and would display them
as completely white. I've added a patch to add the colors of the palette of the
following text screens.
- The animation of the soldiers approaching each other would fade out on the
original interpreter. I've added this.
- The images of the battle sequence would fade out on the EGA version. This
does not match the original interpreter and has been removed.
Some tracks in LotT contain channel aftertouch events. These are not supported
by the MT-32 and the original interpreter does not send them to the MIDI
device. This change removes them from the MIDI output.
When pausing the game by bringing up the ScummVM menu, the MIDI notes would
hang. I've added code to pause and resume the active MIDI parsers, which stops
the active notes.
This change adds the MT-32/GM multisource MidiDriver to LotT. This adds the
following functionality:
- MT-32 initialization using the SysEx queue. ScummVM will remain responsive
while the SysExes are sent and the user can abort the process when skipping the
introduction or quitting the game.
- Use of Roland GS MT-32 instrument mapping.
It also allows for a proper implementation of music fade-outs. Some
functionality previously implemented in SoundManager is now done by the driver.