Commits on Nov 27, 2021

  1. CLOUD: Fix crash on HTTP request with unparsed path

    Occurred during an nmap scan. Fixes bug #12997
    sluicebox committed Nov 27, 2021
  2. 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.
    sluicebox committed Nov 27, 2021
  3. SCI: Remove GUIO_NOSPEECH from HOYLE4

    HOYLE4 has speech. Bug #13007
    sluicebox committed Nov 27, 2021
  4. SCI: Remove redundant check

    sluicebox committed Nov 27, 2021
  5. 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.
    sluicebox committed Nov 27, 2021
  6. 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.
    sluicebox committed Nov 27, 2021
  7. 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.
    sluicebox committed Nov 27, 2021
  8. 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.
    sluicebox committed Nov 27, 2021
  9. SCI32; Improve KQ7 cursor script patch

    Removes a jump to an unverified offset
    sluicebox committed Nov 27, 2021
  10. SCI: Clarify passing of parameter: pass instead of parse for `class_t…

    …able` debug command.
    
    Minor wording change to say pass instead of parse.
    deckarep authored and sluicebox committed Nov 27, 2021
  11. SCI: Add uninit read workarounds for QFG3, QFG4

    Fixes bugs #13045, #13046
    sluicebox committed Nov 27, 2021
  12. SCI32: Fix QFG4 upgraded inventory views

    Fixes script bugs where items are upgraded but their graphics aren't
    sluicebox committed Nov 27, 2021
  13. 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.
    sluicebox committed Nov 27, 2021
  14. CREATE_PROJECT: Add DETECTION_FULL feature

    Allows disabling full detection with --disable-detection-full,
    just like the configure script.
    sluicebox committed Nov 27, 2021
  15. 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.
    sluicebox committed Nov 27, 2021
  16. 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.)
    sluicebox committed Nov 27, 2021
  17. 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
    sluicebox committed Nov 27, 2021
  18. 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)
    sluicebox committed Nov 27, 2021
  19. 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
    sluicebox committed Nov 27, 2021