It could re-delete previously deleted objects, causing
ex data (frame/text) corruption. This is the likely cause of bug #3591088.
Asm conversion error from eaf87bdfa7.
This is partly for readability and partly to avoid any possible
portability issues i.e. though they should be the same, size_t is
defined by system headers, whereas uint is defined within our build
system.
Also, replaced a array size calculation with our ARRAYSIZE macro.
Removed the buffer from being a global non-const variable. Also, the
code changes should allow the buffer size to be increased by just
changing the size of _keyBuffer if needed.
After listening to the original music in a Mac emulator (which
unfortunately doesn't handle the music very well), I can only
conclude that note value 1 means the note should continue playing.
At first I thought maybe it was supposed to fade the current note,
or perhaps change its volume, but I can't hear any traces of
either. So I'm going to assume it just means "hold the current
note", though for the life of me I cannot think of any valid
reason for such a command. So it may be wrong, but it sounds
closer to the emulator than it did before.
I completely forgot to delete the dummy iMUSE object after using it
to skip over the old music save information. Thanks to Lordhoto for
pointing this out.
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.