The theme files were modified in c80adc3e, and the theme version was
incremented in the theme files, but not in the ThemeEngine, causing
a discrepency.
Though this only works if the game was added recently enough. My old
entry for VGA Loom doesn't have an "extra" field, nor does my old EGA
Loom entry specify the platform. I really should regenerate that
scummvm.ini file one of these days...
We now store the difference compared to the default value, rather than
the actual SCUMM ticks. Therefore, the default value for the setting is
0, not DEFAULT_LOOM_OVERTURE_TICKS.
It's hard to make this appear only on EGA Loom, so the tooltip has to
document the fact that it's only useful there. The setting is made
relative to the default tempo, which I feel is a much more sensible way
of presenting it to the user than the raw ticks value.
I can only conclude that SCUMM ticks aren't accurate enough to match the
original timer, but at least the transition now happens almost at the
same point as with the MT-32 version, when using the Ozawa version of
the music. Maybe this should be configurable, to accommodate for
different recordings?
Thanks to eientei and GandalfTheWhite for confirming that the Atari ST
and Amiga versions use the same track numbering as the EGA (AdLib) and
Macintosh versions. That should mean that only the versions that already
use CD audio track need to be excluded.
I had originally thought I could set _isRolandLoom when the Sound class
was created, but at that point the soundcard variable has not yet been
set. It was replaced with an isRolandLoom() function, but I left the
variable behind by mistake.
I mistakenly thought they should be looped, but after testing (both with
ScummVM and DOSBox) I have come to the conclusion that they should not.
The music ends whenever there is a sound effect anyway, so having the
music play to the end of the track is the exception, not the rule.
In the FM Towns version, music does play continuously. Personally I find
this makes the game much harder, since the music can drown out the sound
effects.
Also tweaked the expected length of the Overture so that it syncs up
nicely with Act II: No. 10 Scène (Moderato) from the Seiji Ozawa
recording. It was apparently used as tempo reference for the Loom
soundtrack, though I don't know if this was the actual track used for
the Overture since No. 14 is almost identical.
The way the code is written, it should still work fine even if the track
is longer or shorter than expected. And, let's face it, most players
will probably skip the Overture once they've heard it a few times.
This track is a bit harder to isolate from the ballet recording, since
it's in the middle of a piece of music. But since all enhanced tracks
are optional, that's not really a problem.
For the Loom Overture to end, the music timer has to reach at least 278.
Keep the music timer updated for as long as there is a current CD sound,
even if the track itself has ended. If the track ends very early during
the Overture, skip ahead to the scene change. There will be several
seconds of silence, but this seems unlikely to ever happen to begin
with.
This is currently hard-coded for the Loom Overture, and counts the
number of SCUMM ticks that have passed since the song started. Perhaps
it would make more sence to query the CD position, but our CD audio
manager doesn't support that at the time of writing.
This allows EGA Loom and Mac Loom to use replacement audio tracks, e.g.
from the FM Towns or TurboGrafx-16 versions or, with a bit work, any
recording of the original ballet.
Currently the Ouverture doesn't work, since it relies on the music
timer being updated.
This fixes bug #13246 Mage's Initiation - crashes while entering
the Palace on Lone Island.
The game has incorrect data causing the luminance value to be -26335
in the Lone Island palace. The original game doesn't crash has the
config file distributed with the game specifies either the D3D9 or
OGL driver should be used and those have a sanity check on the
luminance when tinting sprite to use 255 if it is negative. This
commit does the same sanity check for the software rendering path.