This is a cleaner approach to handle the Mac version of DW1 (demo
and full versions - refer to bug #3110936). This way, we can keep
the game engine as LE even with the Mac BE resource files.
Both the demo and the full version progress up to drawing the scene
graphics now and crash because of the currently unhandled bitmap
chunk.
This was added in commit 3fdddd53b2b970aae3e967bebc0bff6e642a5111.
However, having handling for both BE and LE resource complicates
the engine code unnecessarily. Thus, a different approach will be
done.
Refer to bug #3110936
This is still work in progress, but it doesn't affect the rest
of the LE versions of DW1. Both the Mac demo and the full
version still crash. The music in the Mac version is skipped for
now, as it isn't MIDI
The scrollbar handle was one pixel too far to the left, and the
topmost position was off by one as well. I've verified this to the
best of my ability. I've compared it visually in DOSBox (which is
a bit tricky for Discworld 2, but I think it's right now), and
against the initial Tinsel v1 source code that was added to
ScummVM. I don't know what the initial Tinsel v2 source code
looked like, though.
Adjusted NM_SLIDE_INSET and NM_SLIDE_THICKNESS to make the inventory
scrollbar work as it did before Tinsel v1 and v2 were combined. The
scrollbar worked before, but you had to click a bit to the left of
it to operate it. It's the only place in the code where these
constants are used, so it should not break anything else.
DW1 PSX seems to have its own scene skipping code for scenes 2 and 3, thus
injecting our own causes it to hang. Scenes 2 and 3 can be skipped separately.
Previously, SetMidiVolume() would stop the currently playing track when
the MIDI volume was set to 0. Now, the music track always plays, even
when the volume is set to 0. This fixes bug #3541533 - "DW: Silencing
music volume stops music" and resolves two FIXME comments
Removed the superfluous MIDI offset storing code. Now, the MIDI buffer is
re-read when the music loops. This removes a static variable and also
fixes another bug in the SEQ decoder.
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
According to dreammaster it should be enough to add cases for the
US version in these two functions, but unfortunately he can't test
it himself. I guess I should try to find the time to play through
the game, but right now there's an annoying DW2 regression from
commit d5690e0. See GitHub commit note for details.