Commit Graph
4946 Commits
Author SHA1 Message Date
Filippos Karapetis 5972e1b97c SCI: Add support for playing Mac QT videos in paletted screen formats
This is needed for the QT videos of the Mac version of KQ6
2024-11-04 10:33:12 +02:00
Filippos Karapetis 609e8b54e0 SCI: Disallow saving from the GMM and add a new game option to allow it
This disables the feature, but allows users to enable it, if they want,
via a new checkbox. An appropriate warning has been added to the
checkbox, notifying the user that saves created through the GMM may be
corrupted and unusable. This addresses bug 15358
2024-11-04 10:11:57 +02:00
sluicebox 2554549b41 SCI: Reduce variable scope 2024-10-17 14:47:43 -06:00
sluicebox c779adb2b1 SCI: Clip kStrCmp result before casting
CID 1003896
CID 1003897
2024-10-17 13:27:13 -06:00
Le Philousophe ace20bbf29 SCI: Fix build when SCI32 is disabled 2024-10-10 19:07:37 +02:00
sluicebox 2c110fd12a SCI: Initialize various members
Coverity issues
2024-10-09 09:52:33 -06:00
athrxx c0492ece44 SCI: work around original script/interpreter bug
The original interpreter expects the same arguments for
kGraph 15 as for kGraph 7. The scripts never pass the last
arguments, though. So the engine would use undefined
values here (which apparently had no visual consequence).
2024-10-09 08:35:11 +03:00
athrxx 523add9022 SCI: revert unneeded video code changes 2024-10-09 08:35:11 +03:00
athrxx 6be167aeaf SCI: cleanup 2024-10-09 08:35:11 +03:00
athrxx 71a2af0de2 SCI: more accurate KQ6 video handling
I was just exploring this when trying to debug a glitch (which was
not connected to this). The changes do literally nothing to the
output. So the only purpose is to have a better documentation
of what the scripts actually do here.
2024-10-09 08:35:11 +03:00
athrxx 70414a0b87 SCI: make upscaled gfx driver for KQ6 Windows
- The main purpose was to move more upscaling logic out of the engine
- This actually contains various precision fixes to the hires code. There
were some comments about being unsure what to. I think I managed to
fix all of these, although it shouldn't make a visible difference, since the
workarounds worked as intended.
- It does actually fix a very minor glitch: The portraits were vertically off
by one pixel. And the opening AVI video is probably also vertically fixed
by one pixel (although the video display in the original is not done very
well, anyway).
2024-10-09 08:35:11 +03:00
sluicebox 7a4974a35c SCI: Improve KQ6 CD enable_high_resolution_graphics
- KQ6 CD DOS now delivers a DOS experience by default instead of Windows
- KQ6 CD Windows no longer offers an option that has no effect
2024-10-06 01:25:14 +03:00
sluicebox 92e54f4026 SCI: Fix memory leak in EngineState when restarting 2024-09-18 01:07:00 -07:00
Hubert Maier 7fd0c0f68f JANITORIAL: SCI: Fix typos 2024-09-16 01:58:56 +03:00
athrxx c6882da457 SCI: call resetGlobalPauseCounter() when loading from original save/load dialog
This was done only for the ScummVM save/load dialogs, but there are situations
where the global pause counter runs out of sync regardless of whether these
dialogs or the original ones get used (e. g. bug no. 15336). The counter should
always be 0 after loading a savegame.
2024-08-29 09:49:07 +03:00
sluicebox 29ebd43d2e SCI: Cleanup warning messages 2024-08-17 17:54:13 -07:00
sluicebox b53d5fea26 SCI32: Fix GK1 Italian patch being applied to Mac
The compatibility script patch for the GK1 Italian fan patch was being
accidentally applied to GK1 Mac as well, causing dialogs to crash.
2024-08-05 17:59:33 -07:00
Cameron Cawley 89c57d29ef COMMON: Move more maths functions into the Math namespace 2024-07-27 14:00:48 +03:00
sluicebox c0b6eb3317 SCI: Fix CAMELOT guard messages at Jaffa Gate
Fixes but #14811
2024-07-24 12:48:34 -07:00
sluicebox 71dd6872d9 SCI: Fix PEPPER lockup when entering kitchen
Fixes bug #15263
2024-07-22 17:25:57 -07:00
sluicebox 7bd9f0b81b SCI: Fix CAMELOT empty purse message
Fixes bug #15288
2024-07-22 12:42:40 -07:00
sluicebox 5ffad3bbfe SCI: Fix LSL5 poker jackpot when restarting 2024-07-21 16:44:18 -07:00
sluicebox 66f994d797 SCI: Fix Betrayed Alliance speed menu
Fixes #15159
2024-07-19 11:28:58 -07:00
sluicebox 259099c412 SCI: Apply SCI1.1 control panel workaround to all games
Fixes uninit temp error on all SCI1.1 games, PQ4
2024-07-17 18:27:36 -07:00
sluicebox 5fa9935730 SCI: Fix PEPPER dictionary word in maze
Fixes bug #15266
2024-07-17 18:27:35 -07:00
sluicebox 2fab44097e SCI: Update script patch comments 2024-07-17 18:27:35 -07:00
sluicebox bc46925636 SCI: Add support for KQ5 FM-Towns save/restore UI 2024-07-11 22:28:17 -07:00
sluicebox b29ffb2bfb SCI: Update class table while initializing objects
Sierra's interpreter populated the class table and initialized objects
in one pass, until SCI3. We have always been doing two passes: one to
initialize the class table and then another to initialize objects.
This should not make a difference, except that some scripts contain two
classes with the same supposedly unique class number. When this occurs,
the first class is always overwritten before it can be used, causing any
objects in between to be associated with the wrong class.

In 2010, this condition caused the ICEMAN demo to crash. It was worked
around by adding a third pass. This prevented that particular script
from crashing, but the real problem remained.

Now we update the class table and initialize objects in one pass.
For SCI3, we continue to use two passes like the original.

- Fixes KQ5 FM-Towns save and restore dialog buttons
- Fixes ICEMAN demo properly, removes workaround (bug #4963)

See: 3485d433c5
2024-07-11 22:28:17 -07:00
sluicebox 157c8935f3 SCI: Improve workaround for incomplete class table
Fixes Macintosh version of Castle of Dr. Brain, room 220
2024-07-11 22:28:16 -07:00
sluicebox 03b41d6045 SCI: Apply Bridge workaround to HOYLE4, HOYLE5-Mac 2024-07-11 22:28:16 -07:00
athrxx fc1bc6a9fd SCI: move rgb and custom palette rendering into GfxDriver classes
This enables the rgb rendering for all video modes and cleans up the
engine a lot, since the engine can now be more or less agnostic of the
screen pixel format.
2024-07-11 08:02:49 +03:00
sluicebox ed8682dfba SCI: Fix issues with SCI16 save/restore UI patching
Game object save methods were being patched out by default, while
their restore methods weren't. This suppressed some game-specific
behavior and created a mismatch that could corrupt saves.

- PEPPER saves at start of game no longer crash
- KQ5 FM Towns now works with ScummVM restore UI
- LSL6 auto save timer no longer launches ScummVM save UI
- QFG3 no longer requires special handling

Fixes bug #15212
2024-07-06 22:57:41 -07:00
athrxx 478cd8925a SCI: (SCI0) - add support for CGA and Hercules render modes
(as per usual, each target has to be run once to upgrade the launcher
options, so that the new render modes can actually be selected)
2024-06-30 13:05:01 +03:00
Torbjörn Andersson fb5096b3f0 SCI: Fix double "the" in comment 2024-06-27 07:56:04 +02:00
sluicebox 00adc4642f SCI: Fix PEPPER unsolvable puzzle box
Congratulations to @eriktorbjorn for discovering what has to be one of
the funniest Sierra bugs yet: a truly unsolvable puzzle.

Thanks to @m-kiewitz for the initial patch and @eriktorbjorn for the
impressively thorough research.

Fixes bug #15225
2024-06-26 18:49:52 -07:00
sluicebox 7690377cad SCI: Remove invalid PQ2 workaround 2024-06-26 17:51:15 -07:00
sluicebox 9d605801f0 SCI32: Fix HOYLE5 volume sync on variants 2024-06-19 16:31:36 -06:00
sluicebox 039069e803 SCI: Replace ECO2 workaround with script patch
The workaround fixed the crash in the first scene, but the underlying
script bug still corrupted global variables
2024-06-19 16:31:36 -06:00
amytant 0866f10e22 JANITORIAL: Fix typo in SCI script_patches.cpp 2024-06-16 00:56:52 +03:00
sluicebox dbb93adee4 SCI32: Add support for HOYLE5 School House Math variant 2024-06-15 00:12:04 -06:00
sluicebox 2dec932aff SCI32: HOYLE5 script patch cleanup 2024-06-15 00:00:56 -06:00
sluicebox 283a9022bd SCI: Fix HOYLE4/HOYLE5 Hearts strategy
Replaces uninit-variable workarounds with script patches.

The workarounds hard-coded a utility function in Hearts to always
return the first player's hand. The workarounds also used bytecode
signatures that only matched some game versions.

Now the correct Hearts hand is returned and all versions are fixed.
2024-06-14 16:43:22 -06:00
sluicebox 90f8cb2613 SCI: Implement SCI1.1 AudioLoc behavior
- Fixes LSL6 CD (SCI16 version) Electroshock freeze, bug #15165
- Improves LB2 CD "Ra Ra Amon Ra" chant scene

Neither of these scenes are perfectly reproduced in ScummVM yet, but
they are better than they were. They accidentally rely on precise
undocumented/undiscovered audio driver behavior when digital sound
and speech are played at the same time and interrupt each other.

These scripts do conflicting things that had no effect in the original
floppy versions, but caused conflicts once CD speech was added later.
They still appeared to work, but only by accident, and so no one would
have noticed the problems at the time. When LSL6 was ported to SCI32,
the Electroshock script was discovered and rewritten to be normal.

This commit implements two missing pieces of interpreter behavior:

1. processUpdateCues stops the sound if it's a digital sample and
   the audio driver's AudioLoc function returns -1. To replicate
   this, we query our two separate components that play digital
   samples and speech.

2. kDoAudio(AudioLoc) returns the audio driver's AudioLoc result.
   SSCI's audio driver could have been playing a digital sample or
   speech, but we do these in two separate components, and we were
   only querying one of them. Now we query both and produce the
   same results as the original.
2024-06-13 14:30:30 -06:00
sluicebox 98fefbdfda SCI: Remove unused function declaration 2024-06-13 14:30:30 -06:00
sluicebox de9710be94 SCI32: Remove completed TODO 2024-06-13 14:30:30 -06:00
sluicebox 0a497c5af4 SCI: Set kShowMovie subop 0 return value
This doesn't alter game behavior, but the KQ6 Windows movies were
only working by accident due to a stale value in the accumulator.
2024-06-13 14:30:29 -06:00
sluicebox b4a2c8d512 SCI: Add Betrayed Alliance uninit variable workaround
Ticket #15141
2024-05-27 19:54:13 -06:00
sluicebox 076ea03926 SCI: Fix KQ6 message when clicking on horse in castle
Fixes an inaccessible message due to the wrong verb

Thanks to @StuntmanSnake for discovering this
2024-05-21 16:26:01 -07:00
sluicebox 9b58b79ad1 SCI32: Use modified attenuation for QFG4 CD
Thanks to @tsoliman for discovering this obscure discrepancy.

Confirmed in disassembly. Also confirmed that MOTHERGOOSEHIRES uses
modified attenuation, and discovered that floppy QFG4 and PQ4 do not,
and that one version of SQ6 does and one does not.
2024-05-18 09:49:25 -07:00
sluicebox 02cd64b9c7 SCI: Remove unused SavegameDesc::virtualId 2024-05-13 09:04:07 -07:00