Age | Commit message (Collapse) | Author |
|
|
|
|
|
This doesn't really make any difference because either both
VAR_SAVELOAD_SCRIPT and VAR_SAVELOAD_SCRIPT2 exist, or neither
does. But it feels more correct this way.
|
|
SCUMM: More precise Player_Mac::durationToSamples
|
|
Uses the fact that 4*480*480 == 225 << 12, and the identity
(a*b)>>n == (a>>n)*b + ((a%(1<<n))*b)>>n (assuming non-overflowing math),
except the rhs uses smaller intermediate values and does not overflow(*).
Compared to the original code, this uses 1 fewer division and eliminates
the rounding error.
(*) Technical note: In some cases the right hand side of the above
identity still has possibilities of intermediate overflow, but only if
b > (1 << n), or if (b << n) overflows, neither of which are true here.
|
|
|
|
In fact the code was wrong there due to copy-paste error
|
|
|
|
|
|
We're clearly using 12 bytes, not 11.
|
|
|
|
|
|
Verify that 'bits' really is one of 8, 12 or 16 before decoding
the data. It's probably always the case (unless the data files are
damaged) but if it isn't we'll either try to queue NULL to the
audio stream, or queue the same buffer more than once, or free the
buffer more than once. All of which are bad, though Coverity only
noticed the last of these cases.
|
|
CID 1003018
|
|
1. Remove _sc55 bool. All Roland GS-capable devices have MT-32 sound/drum maps, so they should always be used when _enable_gs is set.
2. Always enable _native_mt32 if Roland GS mode is selected. I don't know why I never did this originally, since _enable_gs is automatically disabled for SCUMM v6+ games that use General MIDI tracks instead of MT-32 music.
3. Set master tune for GS devices to 442.0kHz. This is the master tune setting for the MT-32.
|
|
"PC" was very ambiguous and now it matches what we show in the GUI.
This also corrects sword2's platform to Windows.
|
|
For consistency with NUM_SCRIPT_SLOT.
|
|
I believe this fixes CID 1003954, 1003957, 1003958, 1003962 and
1003966.
|
|
We only need to initialize 'args' in runInventoryScript() when we
are actually using them.
|
|
The initializeLocals() function assumes that it can copy 25
elements when being provided an array of values. But this array
was frequently a lot smaller than that. I've introduced a constant
for the number of locals (though VirtualMachineState has one more
for some reason), and fixed the array sizes in a number of places.
CID 1003951, 1003952, 1003953, 1003955, 1003956, 1003959, 1003960,
1003961, 1003963, 100394, 1003965
|
|
|
|
football2002 endzone videos now display
|
|
|
|
|
|
|
|
Seems to fix bug #3495704
|
|
|
|
All instances uncovered by clang warnings.
|
|
|
|
|
|
|
|
Also fixed enemy behavior along the way. No wonder it differed
from the original!
|
|
|
|
|
|
|
|
mine road"
There was a missing Sfx call.
|
|
|
|
This changes the warning to a debug and also updates the comment a bit.
Thanks to eriktorbjorn for checking Loom Mac in an emulator.
|
|
Skip music resources that don't have the "so" (song?) tag. It is
better than asserting, now that it turns out that they do exist.
|
|
RFC: Allow use of override and nullptr. Also allow C++11 compilation.
|
|
Added some comments to make it more readable. Switched usage of a temporary buffer and a double memcpy with a memmove.
Also fixed a potential out-of-bounds write, thanks to LordHoto.
|
|
|
|
Clang will produce plenty of warnings (most of them seem to be of
the "if the stars align the wrong way, this may happen" variety),
but I don't have the time or patience to look at all of them.
|
|
Unlike the EGA DOS version, it doesn't seem to be the scripts
that keep track of double-clicks. Instead, the engine sets a
variable to indicate them. Unlike the DOS version, we don't check
that the second click happens close enough on the screen to the
first one. We could, but it seemed needlessly complicated.
|
|
|
|
SCUMM: Add support for Macintosh music in Monkey Island 1 and Loom
|
|
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.
|
|
Some notes in the main theme are very staccato, and this could
possibly explain why.
|
|
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.
|
|
SCUMM: Support OPL3 in Sam&Max
|