Commit Graph
4746 Commits
Author SHA1 Message Date
sluicebox e672a7b5f6 SCI: Show all palette cycles on PQ1, PQ3 tile screen
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
2022-08-02 17:23:34 -04:00
sluicebox e09010f7d8 SCI: Restrict kGetEvent throttling to fast cast mode
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.
2022-08-02 17:23:34 -04:00
sluicebox adb211613f SCI: Fix SQ5 WD40 missing messages 2022-07-30 16:39:26 -04:00
sluicebox b267706b8d SCI: Fix SQ5 WD40 tunnel entrance lockup
Fixes bug #9988
2022-07-30 16:39:26 -04:00
sluicebox c346905a1a SCI: Reset palette cycling when loading games
Fixes frozen palette animation when loading from within the engine
2022-07-30 16:39:26 -04:00
sluicebox 6e5b1e31f0 SCI: Include all music fade flags in save files
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.
2022-07-30 16:39:25 -04:00
sluicebox 6a3fb9b5f8 SCI: Fix LONGBOW hedge maze music
Fixes bug #13674
2022-07-30 16:39:25 -04:00
sluicebox d2d46b67c5 SCI: Fix KQ5 bandit music fade workaround
The existing workaround prevented a crash but it performed volume tests
on an object's offset and abruptly ended the bandit music instead of
fading it out as in the original.

The broken kDoSoundFade call is redundant because a second script calls
kDoSoundFade correctly at the same time. Now the broken call is ignored
and the music fades out normally.

Bug #5078
2022-07-30 16:39:24 -04:00
sluicebox 55c719aea9 SCI: Handle alternate bit orders in game flag debug commands
Five games store flags in a different bit order than the rest
2022-07-30 16:39:24 -04:00
Donovan Watteau 27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
sluicebox 50fec97f8a SCI32: Fix LSL6HIRES phone crash
Fixes bug #13554
2022-06-08 09:03:39 -04:00
sluicebox 9558095053 SCI: Remove trailing array commas 2022-06-06 17:55:50 -04:00
sluicebox 0eac3efe70 SCI32: Add LSL6HIRES kResCheck Wave/Audio handling
Adds missing fallback behavior that appeared in at least LSL6-Hires.
Removes a workaround that only addressed a symptom of this bug;
the buggy scripts only execute when a correct call to kResCheck fails.

- Clicking four times on lobby sign no longer crashes
- Sound effect now plays when quitting during end credits

Fixes bug #13549
2022-06-06 17:32:50 -04:00
sluicebox fa59cf87f3 SCI: Fix reading version string on earlier games
Fixes the version string not being included in GMM saves or autosaves
if the game stored its string in global 28 instead of 27.
2022-06-06 17:30:47 -04:00
sluicebox a100e03663 SCI: Fix SQ4 Skate-O-Rama chase timing
- Skate-O-Rama (CD version) can now be completed at all game speeds.
- Removed the extra speed throttling on Skate-O-Rama. Floppy doesn't
  have the timing bugs and now both versions run at normal speeds.
- Fixed the coordinate bug that made the west exit impossible at
  certain game speeds.

Bugs #5514 and #11038
2022-06-06 17:30:47 -04:00
sluicebox ea48986006 SCI: Disable speed tests with script patches
Disables SCI16 speed tests with generic script patches.

- All games now pass their speed tests, and consistently.
- Handles games/versions that the benchmarking heuristic misses.
- Fixes bug #13529 (speed test overflow on fast CPUs) on all games.
- Replaces most game-specific patches.

I've left the benchmarking heuristic so that any game or version that
still needs patching will still be handled with unthrottling.
2022-06-06 17:20:58 -04:00
sluicebox 3c3ed549f1 SCI: Disable JONES speed test
Fixes bug #13529
2022-06-03 12:00:58 -04:00
sluicebox dffe39a91c SCI: Disable LSL2 speed test 2022-05-28 03:49:45 -04:00
sluicebox 5b3adb4407 SCI: Fix some script patch typos 2022-05-27 02:38:47 -04:00
sluicebox 1c2e1bc54f SCI32: Fix LSL6HIRES delay when guard presses button
Fixes bug #13501
2022-05-27 02:07:37 -04:00
sluicebox 6e743a97ef SCI: Fix QFG3 event bugs at the Laibon's hut
Fixes some well known deadend bugs in the original game:
- Not being able to give the Laibon the horn
- Not being able to enter the Laibon's hut

Bug #11425
2022-05-24 17:05:27 -04:00
sluicebox f45a5eff90 SCI: Fix QFG3 ring rope uninit read with script patch
Restores original behavior. The workaround caused the player to
always win and receive points even if they lost.
2022-05-24 16:57:45 -04:00
sluicebox b3a77a79a9 SCI: Add QFG3 workaround for casting open on wall 2022-05-24 16:57:45 -04:00
sluicebox c4a95fad5c SCI: Remove duplicate QFG3 uninit read workaround 2022-05-24 16:57:45 -04:00
sluicebox b74b93ad46 SCI32: Fix LSL6HIRES inventory background color
Fixes bug #13497
2022-05-22 17:11:26 -04:00
Filippos Karapetis 34007cb7c2 SCI: Clean up script patches for Hoyle Bridge and Children's Collection
For Hoyle Bridge, we jump directly to the Bridge screen, and it's not
possible to go back to the game selection screen, so we don't need
patches for that version.
For Children's Collection, we now use enablePatch(), which results in
cleaner code.
2022-05-22 19:37:51 +03:00
sluicebox 82a16d71a9 SCI: Add debugging commands for Game Flags 2022-05-22 11:20:41 +03:00
athrxx 311b6fec1a SCI: fix sound pausing when loading via kRestoreGame
This is similar to what we recently fixed for the saving. It does concern only the loading from the SCI menu and from the SCI death dialog (that's how it got my attention).

I have written a long comment in SciMusic::resetGlobalPauseCounter()  which explains it.

I have decided to make this very obvious (you could say: more ugly), so it won't cause confusion in the future. Of course, it could be just hidden somewhere deep in SciMusic::saveLoadWithSerializer() and noone would ever notice. But the "ugly" way seemed the safer thing to do...
2022-05-20 09:55:07 +03:00
Donovan Watteau 5b1ec56f96 JANITORIAL: Fix some lost or outdated URLs in comments 2022-05-19 07:57:31 +03:00
sluicebox 5e03f7a688 SCI: Fix LONGBOW Amiga when saving peasant woman 2022-05-14 19:57:37 -04:00
sluicebox 0d16892c1d SCI32: Fix GK2 lockups when music volume is turned off
Fixes a bug in the original that locks up many scenes and room
transitions if the music volume slider is lowered all the way
2022-05-12 14:59:53 -04:00
sluicebox 5fa0168e88 SCI32: Fix KQ7 wooden nickel hotspot in Faux Shop 2022-05-09 12:31:04 -04:00
sluicebox 2029c31e2b SCI: Fix QFG3 dropped events during vendor barter
Fixes bug #11422

Thanks to @lwcorp for reporting this
2022-04-27 01:33:19 -04:00
athrxx bd1dbecde9 TTS: (ENGINES) - add support for tts enable function
The new option only works as intended if the engine that have TTS support apply their own settings. It cannot be globally implemented before and after runGame(), since the engines don't all use the same config manager variables (sometimes "tts_enabled_speech", "tts_enabled" or "tts_narrator, sometimes more than one of these).
2022-04-26 21:08:41 +03:00
sluicebox 2c94bc32ba SCI: Fix LSL5 Mac password prompt 2022-04-17 21:14:10 -04:00
sluicebox 37b90c0ca4 SCI: Fix FPFP Mac easter egg view placement 2022-04-16 13:29:59 -04:00
sluicebox a0ac53e29c SCI: Remove SCI32 checks from kTextSize
These old checks are from before the SCI32 code was separated
2022-04-16 13:29:59 -04:00
Filippos Karapetis ec16ebbf96 Revert "SCUMM: Refactor the workaround for the broken sample in Indy4"
This reverts commit c59df76164.
2022-04-16 14:25:51 +03:00
Filippos Karapetis c59df76164 SCUMM: Refactor the workaround for the broken sample in Indy4
This makes the workaround code more self-contained
2022-04-16 14:23:02 +03:00
sluicebox 654a7306d2 SCI: Fix SCI0 GfxFunctionsType detection
Fixes LSL2 non-early versions being misidentified and all message boxes
being drawn 10 pixels too low. For example: the copy protection screen.

Thanks to @eriktorbjorn for noticing this inaccuracy
2022-04-11 10:10:19 -04:00
sluicebox 2c912be553 SCI32: Fix RAMA Demo crash when clicking on controls
Fixes bug #10344
2022-04-09 22:42:56 -04:00
sluicebox 4035e20b11 SCI: Fix SQ3 navigation message not displaying
Fixes bug #13114
2022-04-08 22:57:29 -04:00
sluicebox 437c80e382 SCI: Add delay between LSL2 lottery ticket messages
Thanks to @eriktorbjorn for noticing this
2022-04-08 22:56:39 -04:00
sluicebox 6abb9c6061 SCI: kScummVMSleep is now available in SCI16 2022-04-08 22:42:04 -04:00
sluicebox 0d4771c838 SCI32: Fix LSL6 oil lamp lockup when missing PATCHES
Bug #10484
2022-03-29 09:31:40 -04:00
sluicebox a61bcdee59 SCI32: Fix saving from GMM in LSL7 2022-03-22 17:20:51 -04:00
sluicebox e23f5fe855 SCI32: Update kSetShowStyle version checks for Mac
Consolidated kSetShowStyle version/argument checks and updated them to
handle SCI2.1 Mac games and PC demos. (The demos where the wrong
arguments were being applied happened to work anyway.)

Fixes LSL7 Mac pixel dissolve at the start of the game between the
postcard and the boat (rooms 120 and 130)
2022-03-22 07:32:55 -04:00
sluicebox e01775bcae SCI32: Fix SHIVERS and PHANT2 loading autosave slot
Fixes bug #13361
2022-03-21 15:33:52 -04:00
sluicebox 9afafb700c SCI: Fix SQ4 CD speed throttle in laser hallway
Thanks to AdmiralJay for reporting this!
2022-03-20 17:08:38 -04:00
sluicebox 3ac7b9c67c SCI: Fix SQ4 CD laser beam messages 2022-03-18 20:25:33 -04:00