Commit Graph
4970 Commits
Author SHA1 Message Date
sluicebox 0663e3564f SCI32: Remove QFG4 Thieves' Guild script patch
Fixes bug #15776
2025-04-14 13:15:09 -07:00
sluicebox 48c95e3797 SCI32: Fix GK1 day 5 phone lockup in all game versions
Fixes bug #15857
2025-04-10 14:10:28 -07:00
sluicebox 91884f87eb SCI: Update validate_property comments and static usage
This change should not alter any game behavior, because no game scripts
are known to contain an instruction that alters an invalid property.

If such a script does exist, it is now handled correctly.
2025-04-10 14:08:41 -07:00
Filippos Karapetis d74a9542fa SCI: Rename graphics/palette.* to graphics/palette16.*
This is to avoid file name inclusion clashes with graphics/palette.h
placed in common code, as uncovered by PR #6471

After discussing with @sluicebox, this is a simpler solution, where
only the offending palette.* files are renamed, without affecting
palette32.*, or introducing a sci prefix in files
2025-03-10 02:58:55 +02:00
Filippos Karapetis d9e5a9eaa1 Revert "SCI: Rename graphics/palette*.* to graphics/scipalette*.*"
This reverts commit d3230461ea.

A simpler follow-up commit will be done instead
2025-03-10 02:53:24 +02:00
Filippos Karapetis d3230461ea SCI: Rename graphics/palette*.* to graphics/scipalette*.*
This is to avoid file name inclusion clashes with graphics/palette.h
placed in common code, as uncovered by PR #6471
2025-03-09 16:31:35 +02:00
sluicebox 4fa1d891d8 SCI: Fix QFG1 trip wire lockup
Fixes bug #15736
2025-02-25 22:55:18 -08:00
sluicebox 04a538dbaf SCI: Fix LSL6 CD Interface Help cursor 2025-02-16 17:33:58 -07:00
sluicebox 8a5c1f20e0 SCI32: Fix LSL6HIRES Interface Help cursor
Fixes bug #14591
2025-02-16 12:55:37 -07:00
sluicebox 995da76327 SCI: Fix LSL1 lockup when casino doors close
Fixes bug #15701
2025-01-19 21:28:30 -08:00
sluicebox 2a020f02c9 SCI: Fix KQ1 script lockup when drowning in cave
Fixes bug #15667
2025-01-07 04:51:29 -08:00
sluicebox f61afc2b87 SCI: Fix SQ5 introduction speeds
Fixes comets not animating in the star field, bug #15622
Fixes speed and timing when exiting simulator, bug #15610

The introduction scenes are heavily dependent on both CPU speed and the
undefined lag that occurs in the original interpreter when animating
many actors at once. Now our speed throttler adjusts for this.

Thanks to @GermanTribun and @eriktorbjorn for reporting.

Big thanks to @PickledDog for testing and recording on a 386 and a 486.
2024-12-30 14:25:43 -08:00
Hubert Maier beda547e40 JANITORIAL: SCI: Fix typos 2024-12-25 18:00:32 +02:00
athrxx 047f3fbfea SCI: cleanup and reorganize gfx drivers
gfxdrivers.cpp has become quite large. So I've now made a
separate file for each driver. I also separated the mode
validation and driver init code from the enigine and put
it into an extra file.
2024-12-24 13:15:37 +02:00
athrxx fdd1d1644c SCI: (KQ6WinCD) - fix hires drawing glitches
(items 1- 3 from bug ticket no. 15594)

I have added redrawing functionality for the hires GFX from the
original interpreter. I guess the original only needed that code
to handle WM_PAINT messages (= full window redraw). It also
does actually call a redraw in kDisposeWindow, the same way I
implemented it here, to refresh the inventory. But that is really
only needed for the speech+text mode which isn't supported
in the original. Maybe they ditched the mode only after they
had already implemented that, who knows...

I have also improved the workaround for the out-of-bounds
portraits to catch the case from the bug ticket.

I added a check in kDisposeWindow. It isn't strictly necessary,
but it it makes the code easier to understand.

I also renamed a var that I had previously renamed in a way
that makes no sense. I had renamed it from `upscaledHiresRect'
to 'portraitRect' since it is neither upscaled nor hires (it is just a
lowres rect). But it isn't a portrait rect either. The portraits get
drawn elsewhere. It's more likely to be a picture frame, a GUI
control or an inventory item.
2024-12-17 16:43:45 +02:00
athrxx cf1808fa7d SCI: fix kernel sub function mapping for certain builds
I had issues to run any SCI1 game with MSVC ASan builds.They
always failed to start up with a 'DoSoundMasterVolume: no
previous signatures' error. When I recently had that issue (which
I quickly discussed with digitall on discord) I got it fixed by
simply doing a full rebuild. But not this time. So I looked into it
deeper. And I find it quite surprising that it usually works in 99,9%
of all cases, since it does a comparison of two pointers that are
meant to point to different strings. In the kDoSound_subops
table, each entry gets its own string. My only explanation is that
these string repetitions get optimized away (but apparently not
or not always for the MSVC ASan build). I have replaced it with
a strcmp which seems to work fine.
2024-12-15 21:31:54 +02:00
sluicebox b99925afb1 SCI32: Update GK1 CD speech repair config check
Ensures this option is only applied to the intended detection entries
2024-12-06 01:16:21 -08:00
sluicebox 3ac24923fb SCI: Fix KQ5 CD lock up when falling in mountains
Fixes bug #15550

This began occurring in 2021 when kDoAudio was fixed to stop all
currently playing digital samples. The fix exposed that the KQ5 CD
mountain script is incompatible with playing digital samples from
within sound resources. The KQ5 CD sound driver never played these
samples, and the script was not written to handle this condition.
We play all samples when "prefer_digitalsfx" is enabled, and it is
enabled by default, so now we patch out the script incompatibility.
See: de9443407f

Thanks to @LaZar00 for reporting.

Thanks to @MusicallyInspired for audio consulting and testing.
2024-12-03 23:25:47 -08:00
sluicebox bdfb26f31a SCI: Fix script patch comment typos 2024-12-02 17:36:41 -08:00
sluicebox be6011de2a SCI: Fix Talker timer rollover in LSL5, SQ1, BRAIN1
Fixes bug #15303

Thanks to @eriktorbjorn for reporting this
2024-12-02 16:54:46 -08:00
sluicebox bdc6725e41 SCI: Remove unused declaration 2024-12-02 16:54:46 -08:00
sluicebox 3fe61a10a6 SCI: Fix SCI1 kDoAudio language inaccuracies
- Replaces KQ5 FM-Towns workaround with generic initialization.
- Separates SCI1 audio language from unrelated engine components.
  Confirmed in disassembly.
- Improves accuracy of error handling and return values.
2024-11-27 13:16:10 -08:00
sluicebox f209a2304e SCI: Fix script patch comment typos 2024-11-13 11:32:36 -08:00
sluicebox 2b9c11d36b SCI: Fix KQ4 Lolotte bedroom door
Fixes bug #15471
2024-11-12 01:58:43 -08:00
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