CLOUD: Fix crash on HTTP request with unparsed path
Occurred during an nmap scan. Fixes bug #12997
SCI: Fix kSetPort return value
SSCI doesn't return zero; it doesn't return anything. This shouldn't affect any games since no scripts should depend on a non-existent return value, but this discrepancy came up while investigating a fan script that accidentally relies on this.
SCI: Remove GUIO_NOSPEECH from HOYLE4
HOYLE4 has speech. Bug #13007
GUI: Don't apply values from disabled subtitle toggle
When the subtitle toggle controls are disabled for a game, don't read the value and then set config values based on it. This caused "Override global audio settings" to always set "subtitles" and "mute_speech" even when the controls were disabled. Fixes bug #13007 where "Override global audio settings" always mutes the speech clips in Hoyle4.
SCI: Apply workarounds to Mac games without object names
Restore object names in QFG1VGA workarounds that were removed to accommodate the Mac version. Instead, don't match object names on games that are known to not have them, since there are several. Fixes workarounds not being applied to HOYLE4 Mac and LSL6 Mac.
SCI: Add LAURABOW2 workaround for uninit read in museum
Prevents a warning that frequently occurs during most of the game as actors walk around the museum.
SCI32: Create kScummVMSleep for script patches
We have several SCI32 script patches that replace kGetTime spin loops with calls to kWait for the intended delay. This prevents blocking the main thread and allows ScummVM to be responsive and update the screen. But kWait isn't a simple sleep, it's a throttling function, and the duration that it sleeps (if any) is determined by the time since it was last called. kWait was only in SCI16 interpreters so it had to be restored to SCI32 and this required a further workaround for Phant2 compatibility. Now we have a dedicated custom kernel function, kScummVMSleep, which does a simple sleep so that SCI32 script patch delays are consistent and the Phant2 workaround isn't needed. This approach is similar to kScummVMSaveLoad.
SCI32; Improve KQ7 cursor script patch
Removes a jump to an unverified offset
SCI: Clarify passing of parameter: pass instead of parse for `class_t…
…able` debug command. Minor wording change to say pass instead of parse.
SCI: Add uninit read workarounds for QFG3, QFG4
Fixes bugs #13045, #13046
SCI32: Fix QFG4 upgraded inventory views
Fixes script bugs where items are upgraded but their graphics aren't
SCI: Only throttle kGameIsRestarting from game loops
Prevents extra speed throttling from being applied when a script queries the restart flag. Some rooms such as the KQ6 caves and the QFG4 caves do this on every game cycle. In practice, this extra throttling didn't seem to have much effect, but the intent is to only throttle game loops and the script patches that fix inner loops. Updated script patches to call kGameIsRestarting like game loops.
CREATE_PROJECT: Add DETECTION_FULL feature
Allows disabling full detection with --disable-detection-full, just like the configure script.
CREATE_PROJECT: Add --include-dir and --library-dir
Additional include and library directories can now be added. This is most useful to Xcode Mac projects where a vanilla Homebrew setup requires manually adding five directories through the Xcode UI and then repeating that every time the project needs to be regenerated. Now create_project can be scripted to regenerate a working Mac project without any extra Xcode steps.
SCI32: Remove kFileIOReadString warning
It's normal for fewer charcters to be available than the maximum buffer size . Confirmed that nothing depends on not zeroing out the remaining bytes. (In fact, we've had problems before when not zeroing out buffers in other kernel functions as scripts have been known to assume success and use the buffer regardless of the return value.)
VIDEO: Limit QuickTime workaround to Riven
QuickTimeDecoder has a workaround for a video in a Spanish version of Riven, but this workaround breaks valid QuickTime videos such as the KQ6 Macintosh opening movie. (Bug #11085) Until the original Riven video bug can be debugged to improve the workaround, it is now disabled unless an engine enables it. Workaround added in: b8abe40
VIDEO: Fix QuickTime decoding of edits with mediaTime
QuickTimeDecoder has a bug which causes the mediaTime offset to be ignored when a track begins with an empty edit and is followed by an edit with a non-zero mediaTime. This causes the KQ6 Mac opening movie to start several tracks at unintended frames (they're never supposed to be displayed) and the intended frames at the end of the edit to never be displayed. (Bug #11085)
VIDEO: Fix QuickTime decoding when color depth is 32
Color depths greater than 32 have grayscale bit 0x20 set, but the decoder incorrectly treats 32 as grayscale and and clears the bit, leaving the color depth as zero and causing codecs to fail. Confirmed correct behavior in the ffmpeg code that the decoder was based off. The decoder was introduced with the Mohawk engine in 2009,so presumably no Mohawk movies had color depth 32. Fixes videos in the Director game Virtual Cocktail Bar