When the MUSIC_DEFAULT flag was removed, the logic for looping music was
accidentally inverted: Instead of everything except tracks 13 and 19
defaulting to looping, now only tracks 13 and 19 would default to
looping.
See b14a2599bc (SAGA: Get rid of the MUSIC_DEFAULT flag, 2014-07-20)
The autosave refactoring that was done in
7adad5aaf5 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 7adad5aaf5.
This commit adds a fallback for the GOG version of I Have No Mouth... This
version is missing the AdLib instrument definition files which are necessary
to use the Miles driver. If these files are missing, the regular AdLib driver
is used, which has built-in instrument definitions. A warning is shown so the
user knows the music is inaccurate without the missing files.
The engine expected all files listed in the detection entries to be resource
files. This commit adds the option to use a non-resource file for detection.
This is needed to use a MID file to detect one of the Windows versions of
Inherit the Earth.
This commit adds separate detection entries for the Windows and Linux versions
of Inherit The Earth.
There was a combined DOS/Windows/Linux entry with DOS as the platform. It is
not clear to me if this is a combined release or a single entry for three
separate releases, but the Windows and Linux release do exist as separate
releases. These would be detected with DOS as the platform, which would cause
the music not to work, because the DOS, Windows and Linux versions use
different music formats.
We can detect the modern 64-bit macOS and WinCE trial versions and
inform users that they're unsupported.
We should explore whether the limited trial functionality can be
implemented in ScummVM, as the Pocket PC version has some unique
features in both trial and unlocked states.
Miles 2 uses the default MT-32 pitch bend range of 12 semitones for its AdLib
driver. Miles 3 switched to the default GM pitch bend range of 2 semitones for
AdLib. ScummVM would always use the Miles 2 pitch bend range, which caused
pitch bend for Miles 3 games to sound wrong on AdLib.
To fix this, a property was added to the Miles AdLib driver to specify which
Miles version to emulate. Depending on the value of this option, the correct
default pitch bend range is set.
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.
This fixes the fade-outs in IHNM, most notably at the end of the title screen
when using GM. Fades would take 30 seconds instead of the intended 3, and the
engine did not wait for the fade to finish but immediately played the next
track, which aborted the fade.
Note that the engine still does not always wait for a fade to finish when it is
triggered from a script. For example after AM's speech when dying in
Gorrister's chapter, in the original interpreter the music fades out while the
screen fades to black. In ScummVM, the screen does not fade out, so the music
fade is immediately aborted by playing the next track.
This limits the pitch bend and sustain reset messages at the end of MIDI tracks
to I Have No Mouth, And I Must Scream. Inherit The Earth does not use sustain
and pitch bend is already reset at the start of each track. IHNM does use
sustain and does not reset pitch bend at the start of each track.
A new MidiParser object is created every time a MIDI track is played, but the
old parser would not be freed. Fixed this by first deleting the parser before
creating a new one.
Music volume is now handled by the Music class. Some calls to play included a
call to setVolume, but play already does this, so these calls were unnecessary.
This removes the MusicDriver class, which was a subclass of MidiPlayer. The
MidiPlayer relies on MidiChannel objects for some functionality and has
problems with the Miles AdLib driver and Munt.
The functionality of this class is now implemented in the Music class. Volume
management is handled by the multisource MIDI drivers themselves, and added to
the Music class for digital and PC98 music.