Commit graph

577 commits

Author SHA1 Message Date
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
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
3779f208ad SCI: (SQ4/CD/Windows) - make use of windows gfx drivers
SQ4/CD/Windows uses a simiar interpreter to the KQ6 one, minus the hires
graphics support. It has the same upscaling to 640x440 (or 320x220 for small
windows) and also support the same 16 colors mode.

Also removed some whitespace...

I have attached the SQ4 Windows variant to the gfx drivers I made for KQ6.
The 16 colors mode now requires the SCIWV.EXE executable, though. I had
hard coded the 512 bytes color pattern table for KQ6, since I thought it
would remain the only one necessary. But SQ4 has a different table. So I now
load them from the executable.

There might be more Windows games like that, I just currently don't know
about it (probably other SCI_VERSION_1_1 titles). Adding support would be
super easy. But it will not work right out of the box, since I explicitly check
the game IDs in customizeGuiOptions(), to avoid any nonsense to happen.
2024-12-21 18:33:13 +02:00
Thierry Crozat
93569608d5 SCI: Improve grammar for GK2 fan subtitles prompt 2024-12-10 21:55:01 +00:00
athrxx
a4380b8e0b SCI: add appropriate render options for KQ6 Win 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
sluicebox
29ebd43d2e SCI: Cleanup warning messages 2024-08-17 17:54:13 -07:00
athrxx
8eac961aa6 SCI: (PQ2/PC-98) - make some specific gfx adjustments
PQ2 seems to be the oldest of these PC-98 ports. It
uses text mode print, a vertically scaled mouse pointer,
etc. Also, it doesn't really have a 16 colors mode.
I make the necessary adjustments here to provide
both 16 and 8 colors modes, since there is no technical
limitation not to have the 16 colors...
2024-08-06 08:47:25 +03:00
athrxx
9dc71ef701 SCI: (PC-98) - add gfx drivers for PC-98 games
16 colors and 8 colors modes for the SCI0 and SCI1
PC-98 games.

The 8 colors modes are new, the 16 colors mode is
basically the pre-existing mode, just with some
minor fixes (palette, font drawing, etc.).

The final goal is to get rid of the upscaling inside the
engine, but that will require more work on the other
game versions that depend on it.
2024-08-06 08:47:25 +03:00
athrxx
975ba55f8b SCI: add SCI 1 video modes for EGA and VGA grey scale 2024-07-11 08:02:49 +03: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
athrxx
a1e6ac6811 SCI: fix undithering option and disable it for CGA/Hercules 2024-06-30 13:05:01 +03: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
sluicebox
27e339c171 SCI32: Remove unused SCI3 big endian handling
This code anticipated Macintosh SCI3 games, but they do not exist.
Mac versions of SCI3 games are all SCI2.1 Late.
2024-04-11 07:52:15 -07:00
sluicebox
32fa3679ea SCI: Reduce g_system use 2024-01-30 13:22:44 -08:00
Le Philousophe
45286ad131 SCI: Migrate engine to Path 2023-12-24 13:19:25 +01:00
sluicebox
62a5b6dc95 SCI: Refactor away SciEngine::exitGame 2023-11-21 22:02:54 -08:00
sluicebox
8dac2204cd SCI: Clean up SegManager
Fewer casts, pointers, and parameters
2023-11-21 22:02:54 -08:00
sluicebox
f2d0b0b33a SCI: Prevent potential stack overflow in errorString 2023-11-21 22:02:53 -08:00
sluicebox
49a2fac05e SCI: Reduce global engine usage 2023-11-16 18:44:42 -08:00
sluicebox
e491dd4e81 SCI: Replace fan-made patch message box with warning
We no longer need an unskippable message box about fan-made patches.

We really just want to know if a fan-made patch is present when
diagnosing a bug report, just in case that's part of the problem.
This lets us re-enable detection of the patches that GOG includes
in their releases.
2023-11-14 15:38:05 -08:00
sluicebox
3e339b0097 SCI: Update errorString
- Fixes stack overflow when `error` is called from kernel function
- Includes most recent pc when `error` is called from kernel function
- Handles script procedures in addition to object methods
- Uses target name to identify game to log variant/fallback info
- Condenses errorString to a single-line header
2023-11-09 14:50:58 -08:00
sluicebox
cfa1ad6de2 SCI: Fix errorString version query 2023-11-08 01:09:59 -07:00
sluicebox
cb233df64d SCI: Fix errorString when execution stack isn't initialized 2023-11-07 20:47:31 -07:00
Filippos Karapetis
e9e88003dc SCI: Add sanity checks to SciEngine::errorString()
It would crash in errors thrown during resource loading
2023-11-05 11:44:36 +02:00
sluicebox
6bffed45b3 SCI: Remove redundant checks. PVS-Studio V547 2023-10-31 14:20:26 -07:00
Ralph Caraveo
e9b8394750 SCI: Provide additional errorString context on crash 2023-10-08 08:32:14 +02:00
sluicebox
daed465639 SCI: Add option for high resolution Mac fonts
This adds the existing GAMEOPTION_HIGH_RESOLUTION_GRAPHICS option to
Mac games with native fonts. Default is enabled. If disabled, then the
low resolution Mac fonts are used and the game isn't upscaled.
2022-11-06 23:05:20 -08:00
sluicebox
1efdb1cb6c SCI: Add support for Macintosh fonts
High-resolution native Macintosh fonts are now supported in the
following games when the game's executable is present:

- Castle of Dr. Brain
- Freddy Pharkas
- King's Quest 6
- Leisure Suit Larry 1
- Leisure Suit Larry 5
- Space Quest 1

And in these games when classicmacfonts.dat is present:

- Leisure Suit Larry 6 (floppy)
- Quest for Glory 1
2022-11-06 23:05:20 -08:00
sluicebox
9be84837b3 SCI: Add speed_throttle debug command
Allows testing the speed throttler for possible improvements
and to demonstrate what it affects and what it doesn't.

`speed_throttle 0` disables kGameIsRestarting throttling.
(Except for game-specific workarounds.)

This command is possible due to several recent cleanups of other
throttling mechanisms that overlapped and were absorbed by this one.
2022-08-12 00:33:20 -04:00
sluicebox
9d40b46f7e SCI: SciEngine was accessing itself through globals 2022-08-02 17:23:34 -04:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Filippos Karapetis
763b4cbd84 SCI: Corrections to the initialization/destruction of the SciTTS class 2021-12-24 02:57:27 +02:00
Filippos Karapetis
a488bb47e8 SCI: Text to Speech (TTS) functionality for SCI16 (SCI0 - SCI1.1) games
This is based on the work done for GSoC by @taylorzhancher in PR #3256

Highlights:
- TTS has been hooked globally onto places where text is shown
- TTS is currently performed for textboxes and button texts
- TTS stops when text windows are disposed (which enhances the in-game
  experience)
- No game-specific logic has been added
- This hasn't been extensively tested with all SCI16 games yet
- There will be cases that are not handled properly yet
- The TTS functions have been grouped under a SciTTS class
2021-12-24 02:57:27 +02:00
sluicebox
8e9c93938e SCI: Use LSL5 patch directory name 2021-12-20 12:42:42 -05:00
Orgad Shaneh
940c7bfc14 SCI: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Tarek Soliman
1720cdb659 SCI: Fix GK2 patch dialog button behavior
The button behavior was reversed.
"Download patch" did nothing and "ok" downloaded the patch.
2021-08-21 00:19:51 +03:00
sluicebox
8e1d90f8e4 ALL: Remove clearAllDebugChannels() from Engine dtors 2021-06-14 12:42:38 -05:00
sluicebox
0715affdd6 SCI: Use for loop in gameHasFanMadePatch() 2021-05-25 10:31:59 -06:00
sluicebox
4e8db68d4a SCI: Remove asserting "new" allocation results 2021-05-23 16:55:35 -06:00
sluicebox
a8dacadf40 SCI: Use initializer list for all SciEngine members
Cleans up inconsistencies and excludes more SCI32 members
from SCI16-only builds
2021-05-23 11:26:30 -06:00
ysj1173886760
3a65856f4c SCI: move debug channels to metaEngineDetection 2021-05-22 01:34:57 +02:00
sluicebox
604ab98b5e SCI: Removed completed TODO 2021-05-18 18:32:44 -06:00
sluicebox
4713278be2 SCI32: Add detection for LSL7 Polish "data" directory
Fixes bug #10066
2021-05-16 21:11:08 -06:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
sluicebox
cc95809bb5 SCI: Fix compatibility with PQ1VGA & PQ3 GOG versions
GOG includes NRS scripts in PQ1VGA and PQ3 which trigger our
warning about fan patches. The patches introduce several forms of
speed throttling but we already throttle at the engine level.
This changes timing throughout the games and may cause conflicts.

This commit:
- Disables the speed throttling that the patches introduce
- Removes the warning for these versions

GOG versions now play the same as original unpatched ones.
2021-04-05 23:47:45 -07:00
Cameron Cawley
c877097b49 ALL: Remove use of "" in Common::U32String constructors 2020-11-16 16:56:58 +00:00