Should fix bug #13072
The code for Leary's AI script ChangeAnimationMode() was re-checked against the c file produced from our dissassembly of the AI-ACT1-23 dll.
"engineid" isn't present on all games. Games that predate the "engineid"
feature and haven't been run since it was introduced don't have it yet.
Fixes bug #13038
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)
OD Beta is a mips linux OS based on buildroot, that runs on ingenic gaming handhelds
like the gcw0, rg350 and many more.
There was a previous GCW0 port, that was running on legacy opendingux, but that
OS is not maintained since 2014 and has an outdated kernel and toolchain.
Od Beta on the other hand, runs with linux 5.15, has a GCC 10 toolchain and
an active developpment community.
This adds support for 3 flavors :
gcw0 that runs on all jz4770 cpus
lepus that runs on all jz4760 cpus
rg99 which is a jz4725 device
Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
This is taken from pull request #3368 ("New Digital iMUSE Engine").
AndywinXp asked me to do it for him because it was less inconvenient for
me. It is only being applied to the 2.5 branch since his pull request
should take care of everything on the master branch later.
Setting the Miles driver version property to 3 was meant to set the pitch bend
range to 2. In the AdLib driver, the pitch bend range was set during
construction, before the version property could be set, so this did not work
properly. This is fixed by moving the MIDI data initialization from the
constructor to the open function.
At this point, the driver still tries to play notes at the maximum
allowed volume or louder, but ScummVM's music volume setting can bring
them back down to the expected range. That may have to be good enough
for now.
Also, since the master volume is only used internally there's no need to
keep converting back and forth. Just use the interval 0-255 throughout.
After feedback from NMIError, and some more guesswork. The master volume
isn't applied until noteOnSetVolume(), so that the correct adjusted
volume can be stored in the channel data structure.
Now the volume seems too low to me, but of course that could be fixed by
having some other default value than 15 for _masterVolume.
Because only the unused channelVolueAdjust value was clipped, the actual
velocity of the note would often overflow, causing the note to be almost
muted instead of played at full volume.
I assume it was an oversight that chanelVolumeAdjust wasn't used, so
I've fixed that and moved the clipping to after all adjustments have
been made. Also eliminated some unneeded floating-point math.
Is it correct now? I honestly don't know. It seems that, at least in
Waxworks, almost all notes end up being played at max volume. But maybe
that's how it should be?