It's much better now and hopefully quite close to the original when it comes
to the music part. The intro music of Loom and Monkey Island 1 EGA sounds fine
to me now at least.
Albeit the code is marked as a hack inside the source, the original behaved
exaclty the same. If the code is removed the PC Speaker output will miss notes,
since unlike the original we only output to parts, which have an instrument set
up.
The enum is only used inside the SCUMM engine so it is rather pointless to
keep it in common/util.h right now. Also if we really want it in some common
place it should probably be better in graphics/ too.
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
This provides fallback to 8bit color mode for SCUMM3 FM-TOWNS games on platforms which set the USE_RGB_COLOR define even though that color mode is not being fully implemented for that platform.
This adds an extra detune parameter which is assigned via sysex code 0.
Most tracks don't use this (= assign a value of 0), so it isn't really a
very noticeable feature.
This also removes the dependency of engines on the event recorder header
and API, and will make it easier to RandomSources that are not properly
registered.
Previously, we had a couple of arrays of size N (where N = number of
resource types), one for each attribute of a resource type (such as as
the number of resources of that type.
Now, we have one array of size N, whose elements are a record
aggregating all the attributes of each resource type.
Since displayMessages usualy vsnprintf internally it is not quite safe to pass
any string to it, since it might include a format argument like %n, which is
unsafe.
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.