This code is present in all the original interpreters using Digital iMUSE, and it was implemented
in order to allow slower CD drives to fetch new data without having music skipping during load times.
This works by basically flooding the music buffer with data whenever a big resource, a voice file, or
a SMUSH movie is loaded.
Arguably this is not needed for devices using SSD drives, but since this change had its benefits on a
quite old laptop of mine, and since the memory overhead is very minimal, I have decided to implement it.
This game needs to use the Clifftop Games variant of the AGSSpriteFont
plugin. Also it uses an alternate name for the plugin. That name
was already supported when loading builtin plugins, but not for the
Clifftop Games variant.
This commit also adds detection for the Mac version from Steam.
When using the base SpriteFont plugin and not the ClifftopGames variant,
the renderers pointer were not initialized in the constructor, which
could lead to them not being instantiated, and then causing a crash.
Fixes kq1agdi crashing on big-endian systems, since it tried to allocate
a gigantic amount of memory from MFLUtil::ReadV21() because of the
misread values.
From upstream 5e29a339fc83bf5c06a3a9a3b1c65a2fc4b4e72c
Also includes upstream 427752da015fd93549deef1a31d5e533e5c9319e
Add check on currentSprite because if statement before does a
check if currentSprite exists, meaning currentSprite can be a nullptr.
Fixes COVERITY: 1498653
I'm told by some French players that only the 8-disk French VGA floppy
release had invalid MT-32 content, but that the 4-disk release didn't
have this problem. The MD5 check still appears to be OK, but the comment
was a bit wrong.
In practice shouldn't matter, but just to avoid having
uninitialized values around, we should set the value-field,
even for Nil.
Fixes COVERITY: 1470689
This is a field in GfxBase that is only used (and initialized)
in GfxOpenGL, hence it will be left uninitialized in the other
renderers.
Fixes COVERITY: 1009909
Presumably the indata always defines the parents before
the children, but nevertheless doesn't hurt to fix this,
if nothing else to make tools like Coverity happy.
Fixes COVERITY: 1470594
It was left uninitialized if loadBinary was run,
presumably it was only used in use cases where that
was the loader that was run.
Fixes COVERITY: 1470688
Not likely to be a problem, as it is guaranteed to be
fully set once loadFile() has been called. But nevertheless
all fields should have a defined value after the constructor
has been run.
Fixes COVERITY: 1433423
This has 0 impact beyond pedantic correctness, as the
surface is square in this case, but doesn't hurt to
silence this warning properly.
Fixes COVERITY: 1433334
The 256-color versions of Indy3 have a very strange vertical line on the
big tapestry that's in the middle of room 135, in Castle Brunwald.
It looks like an artist made some wrong click when redrawing this object
for the VGA versions, or maybe the compression routine for those images
had some bug. QA was probably rushed for this port, too, since Indy3 has
various oversights related to the VGA conversion. A similar problem was
fixed in commit 6735e3c0f006730831f020e31b3385ee55f58edb.
The tapestry glitch was a bit harder to fix, because the glitched line
hides several pixels with different colors, and because this resource is
in a compressed format. AFAICS, v3 games have no concept of transparent
pixels for background objects, so that simpler solution wouldn't work
either. We could also trim the leftmost OI strip (since the wall in the
background is fine), but I couldn't get this to safely work with the way
unkDecode11() works.
So I have redrawn a fixed OI_0324 with the old BMRP.EXE tool, diffed
the two resources and then added a small mechanism which patches (for
copyright reasons) the impacted bytes from the original resource, as
it is being read. This is a very low-level trick, so various checks
have been added to make sure that we're not corrupting something
(incl. any fan-made modified Indy3), and also in order to make the
workaround a bit easier to follow.
(The most obsessive players will notice that the tapestry still cuts
through a part of the column in the upper-right corner, but I'm only
interested in fixing the obvious problem which was right in the
middle of the room. Sorry if you wished you hadn't seen this.)
_walkbox may be equal to kOldInvalidBox, which is 255, but then
_extraBoxFlags[_walkbox] would be dereferenced while _extraBoxFlags only
has 65 elements.
Found with UBSan in Loom Talkie, when the leaf falls from the tree.