For some reason the pointer in D4 movies points to the header
instead of data. Perhaps there is a flag which indicates that.
In the meanwhile, adding a hack to skip it so we could proceed
with development.
In SSCI, strchr is called against a hex string with a duplicate 0
("01234567890abcdef") to determine the decimal value of hex digits,
which means the values A-F are incorrectly interpreted as 11-16
instead of 10-15.
All versions of SSCI with support for hexadecimal escape sequences
in messages (starting somewhere around Feb 1993) are buggy.
The native save/load dialog of SCI32 relies on this defect to
render the up and down arrows of the game selector.
Fixes Trac#9582.
SSCI transitions code sends a large number of small show rects
to the graphics manager, one at a time, for each division of a
transition. Each time a rect is submitted, a call to showBits
is made. This design was used when transitions for SCI32 were
first implemented in ScummVM, and it worked OK because the
hardware surface was updated by EventManager::getSciEvent,
not showBits, so the large number of calls to showBits from the
transitions code did not adversely affect engine performance.
Later in SCI32 engine development, hardware surface updates
were changed to occur in showBits so that the hardware surface
would be updated at frame-out time, instead of at input-in time.
This change meant that now the large number of calls to showBits
from transitions became very expensive, and the engine would
stall constantly refreshing the entire hardware surface.
To fix this problem, the transitions code now (1) maximises the
size of rects coming from transitions, when possible, and (2) only
calls showBits when all the rects from one frame of a transition
have been calculated and added to the show rects list.
Additionally, there were some arithmetic errors in the
implementation of pixel dissolve that have been corrected in this
changeset.
Fixes Trac#9614.
Fixes a couple of issues reported by valgrind and clang
sanitizers.
In particular, the initialization of Actor::_inCombat means that McCoy
no longer randomly has his gun out at the beginning of the game. In
SliceRenderer::drawInWorld, the assert of _sliceFramePtr has been
moved to after the call to setupFrameInWorld which is the method that
initializes the field. This misplaced assert caused the game to crash
for several people.
The original starts a movie for the Doorbot taking his cloak off,
but then plays a cutscene of the doorbot first appearing. Because of
this delay, our VideoDecoder wasn't correctly playing the movie after.
To fix that, new movies are initially paused when started, and then
resumed the first time we try to do events checking for it
Exports with a zero offset are supposed to point to the start of
the code block in the script hunk, but they were being ignored.
This may also apply to SCI1.1 games, but until that can be
verified, this fixes the zero-offset in only SCI32 games for now.
Game scripts pass an extra argument which is never used in SSCI.
This happens e.g. when warping from room 620 to room 860 in
LSL6hires.
Adding a signature for kPalVarySetVary for SCI2.1early games only
does not work because KQ7 1.51 is detected as SCI2.1early but the
interpreter includes kPalVary code that matches SCI2.1mid.
Fixes Trac#9611.
Previously, this was using the offset of the property dict inside the
script. However, this isn't unique. For example, SQ6's DPath and
PolyPath classes both have their property dict at offset 8 of their
respective scripts. This would break Obj::isMemberOf.
Closes#846.
The GOG version comes with a fan patch that uses rm470::name to
store a timer to rate-limit rm470::doit. This breaks the workaround
detection since that uses the name field.
Original AGI TIME_DELAY 0 made the game run as fast
as possible. We didn't go that far, but it still seems to run
too fast. This should hopefully fix that.
See bug #9607
Now that a lot of the game's resources have been figured out, it turns
out that using comic.tgp was a bad idea, as it's the same in both the
English and German versions. atds.tap contains all of the game's texts,
so it is probably the best candidate for detection
Memory references and integers in SSCI are both 16-bit numbers,
so game scripts frequently (incorrectly) use an IntArray instead
of an IDArray for holding references. Since references in ScummVM
are 32-bit reg_ts, IntArray entries must be large enough to hold
reg_ts in order to be compatible with game scripts that store
references in integer arrays.
The alternative solution is to find and patch all incorrect use of
IntArray across all games. This is possible, but a bit risky from
a save game stability perspective, since incorrect IntArray usage
is sometimes not apparent until well after the array is
instantiated (like GK1's global interview array).
This change invalidates existing SCI32 save games.
This avoids a deadlock where the main thread (via reconstructPlayList)
tries to acquire the mixer lock (in soundPlay) while holding the SCI
music lock, and the audio thread is holding the mixer lock and tries to
acquire the SCI music lock (in miditimerCallback). Bug #6691.
also added support for rendering items on screen (not in the world)
pickup effect can be tested in debug compilation by clicking on any object (not item, but object like, hydrant, or doors) in first scene
Instead of the engine-based 0, we now default to
kThumbnailWidth/kThumbnailHeight2, as values of 0
here disable thumbnails in the engine.
TODO: Perhaps consider looking into always running the
thumbnail-generation even if the sizes are 0?