("hanging MIDI notes")
The original interpreter resets the channels more often than we do
in the remap function. The assumption apparently was that the
loop at the very end of the function would catch everything. But
it does not catch the dontRemap channels if they are not within
the _driverFirstChannel/_driverLastChannel range.
If more bugs like this come up it might be necessary to add even
more resets, but I am very reluctant about unnecessary changes
to the remap function. And this code has been around for a long
time without any other bug reports of this sort. So I think we have
reason to be optimistic about it.
The default behaviour for `Common::convertBiDiString` is to use
BIDI_PAR_ON for direction, which means that it tries to guess to
paragraph language, and choose the direction according to it.
However, in SQ6 many (all?) texts begin with control characters,
which make that function to think that these are English texts,
and therefore it chooses LTR direction, and punctuations are wrongly
placed.
Since the call to the function is under `if` clause for RTL,
it's safe to hard code that direction.
This is a follow-up to the script patches for the dead-end event
bugs in the Laibon's hut: 6e743a97ef
Those patches had the unintended side effect of allowing two dialogue
options during an event where they shouldn't be available. Now their
logic is updated to match the other patches so that they only appear
during their intended event.
Fixes bug #13748
In SCI1 and later, kDoSoundFade does not test a sound's status.
Incoming fade properties are applied regardless of whether the
sound is playing and kDoSoundFade does not set the signal.
The code that's been doing this was added and updated in 2010
for ICEMAN and LSL3. Now it's only applied to SCI0 calls.
e41874c91df743468ec7
Verified in QFG2 1.000, JONES CD, and LB2 CD.
Fixes scenes in LB2 where multiple songs occasionally play at the
same time due to broken fade-outs. Hiding behind the tapestry
during a meeting is the one that occurred the most consistently.
Related to bug #6462
Allows testing the speed throttler for possible improvements
and to demonstrate what it affects and what it doesn't.
`speed_throttle 0` disables kGameIsRestarting throttling.
(Except for game-specific workarounds.)
This command is possible due to several recent cleanups of other
throttling mechanisms that overlapped and were absorbed by this one.
In 2010 a 10 ms delay was added to every kGetEvent call to prevent
maxing out the CPU when some games display message boxes:
b0b4ddcc52
This rapid kGetEvent polling is called fast cast and it only exists in
SCI1.1 games and some SCI1 games. It occurs in an inner loop when the
fast cast global is set.
Now the workaround is only applied to fast cast games and only when the
kGetEvent polling occurs.
Removing this 10 ms delay from every SCI16 game cycle doesn't change
game speed by itself because the larger dynamic throttling in
kGameIsRestarting has been absorbing the 10 ms. But this does make the
other throttles easier to understand and work with, and solves minor
edge cases where delays from multiple kGetEvent calls add up.
fadeSetVolume and fadeCompleted are used by the fade timer to signal
SoundCommand::processUpdateCues() that there is work to be done.
By not syncing them, if a save occurs after a fade completes but before
it's processed then the game won't see the completed fade when loading.
This can happen when the game is paused because the user has brought up
the game's menu bar or control panel in order to save a game. The fade
completes while the UI is displayed, then a save occurs, and then the
fade is processed after the UI is dismissed.
Now completed fades are processed when loading.
Fixes bug #7073 in KQ6 where saving in the Land of the Dead while
Alexander dismounts Night Mare results in a softlocked save.
Fixes bug #13546 in LSL6HIRES where saving while music fades from
a previous room results in a save that doesn't play the new music.
Fixes two discrepancies in redundant fade detection that were discovered
while investigating LONGBOW bug #13674:
- MusicEntry::fadeTo was altered even when the fade was ignored
- Redundant fades are allowed in SSCI when the stopOnFade flag is passed
This cleans up some things I noticed when I implemented the mute flag handling. It removes the hack that manually forces flag 2 on all channels with number 9, regardless of the device.
I presume the hack was done for the earliest SCI 1 games, due to improper handling of flag 1.
Use READ_LE_UINT16 instead of FROM_LE_16 to avoid unaligned memory
access, as seen on OpenBSD/loongson (mips64el) where it would SIGBUS
when trying to play the demo.
(cherry picked from commit 980b693a6c)
Because autosave can be triggered at any time, there may be empty lists present
in the engine. Avoid crashing if the UCList is empty. Should fix bug #13852.
1839780513 made a mistake by
confusing the IO-attributes with the non-IO_-attributes,
as there is a difference in the order of the flags between
these two sets.
Fixes bug: https://bugs.scummvm.org/ticket/13810
Size of the alpha channel is not set to its default value and this caused totally corrupted graphics on my PC.
See:
https://bugs.scummvm.org/ticket/13712
The map in IMuseDigiDispatch can contain unaligned blocks if it
contains a TEXT block with a length not divisible by four. This causes
unaligned memory accesses in a few places.
This commit fixes the issue by ensuring only aligned pointers are typed
as `int32 *` while unaligned pointers are typed as `uint8 *` and are
only accessed through helper functions.
Fixes an error when playing a QuickTime video that has a mediaTime set
on its first edit. This was caused by mediaTime changes in:
ef184a6cef
Those changes buffered frames during initialization so that the keyframe
and other frames don't play instead of the intended start frame that
mediaTime specifies. My mistake was that decoding isn't allowed during
VideoDecoder::loadStream(); VideoDecoder::setDitheringPalette() requires
that no frames have been decoded yet, and at least Director and Mohawk
call that.
Now the initial mediaTime buffering is delayed until the first decode.
Fixes bug #13479 where certain Myst videos error.
Fixes the opening movie in the Director game Chop Suey.
Fixes the police lights on the title screens of each game.
Only one of every eight frames in the palette cycle was appearing.
Thanks to @eriktorbjorn for reporting this