Commit Graph
145 Commits
Author SHA1 Message Date
Cameron Cawley 09ab1ddfb7 SCI: Speed up GfxScreen::scale2x() for 2bpp and 4bpp formats 2024-11-01 02:33:51 +02:00
Cameron Cawley 68f3c51f2b SCI: Support more pixel formats in GfxScreen::scale2x() 2024-11-01 02:33:51 +02:00
sluicebox 5a6470e3f2 SCI: Remove unused member 2024-10-15 13:31:34 -06:00
athrxx de32f308b4 SCI: remove GFX_SCREEN_MASK_DISPLAY
(and code sections guarded by it)

This was only used for the KQ6 Win hi-res code.
2024-10-09 08:35:11 +03:00
athrxx 2ec9c46373 SCI: replace workaround to clear hires portrait rects
As the GFX_SCREEN_MASK_DISPLAY flag is no longer
used, I have made a new workaround. Nowadays it
seems to be needed only for the mixed speech/text
mode (which didn't exist in the original game, but has
been added to ScummVM via script patches). The
problem is that the hires portrait frames will be drawn
at y = 5 in mixed speech/text mode. The window/port
rect starts at y=10, though. The engine is not meant to
update screen parts outside the port dimensions.

Another solution would be to improve the vertical
placement of the portraits with these patches, but
that seems to be more complicated.
2024-10-09 08:35:11 +03:00
athrxx a4380b8e0b SCI: add appropriate render options for KQ6 Win 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
Hubert Maier 7fd0c0f68f JANITORIAL: SCI: Fix typos 2024-09-16 01:58:56 +03:00
athrxx 7afa86e0f4 SCI: add setShakePos() function to gfx drivers
Currently the screen shakes will not be scaled to the driver's
screen resolution. This patch fixes that.

Now, this isn't exactly the original behaviour. The screen
shaking was a hardware feature that only EGA and VGA
adapters had. Therefore, the screen shake function is
only implemented in the drivers for these devices. For
all other graphics hardware the drivers have an empty
dummy function for the screen shake (at least from
what I have see). But we needn't be strict here, we can
shake everything...
2024-09-13 01:12:31 +03:00
athrxx 31a2c0349b SCI: (PQ2) - fix text colors
I noticed that the original PQ2 interpreter can have other text
colors than blue. It can also draw text in yellow and white. I don't
think that it gets used, but I'd rather just fix it, before I try to find
that out...
2024-08-10 11:44:24 +03:00
athrxx 4cfa133fb3 SCI: add warpMouse functionality to gfx drivers (#6015)
I have noticed (while playing QFG1VGA) that the engine
makes use of OSystem::warpMouse() which will not work
like that with the drivers that upscale the image. I have
implemented the function for the drivers that need it.
It's basically just the reverse of getMousePos().

I also fixed some of my comments to make more sense.
2024-08-07 17:24:49 +03:00
athrxx b815a5e80c SCI: remove commented out code 2024-08-06 08:47:25 +03:00
athrxx bfdb490eae SCI: fix bug 15309
(KQ1 SCI keeps crashing on recent dev builds)

This is about a missing bitmap buffer. It isn't always needed
for SCI0, but SCI_01 (= KQ1) requires it. For the PC-98 targets
(which are also SCI_01) this had already been fixed in this PR,
but not for other 01 targets.
2024-08-06 08:47:25 +03:00
athrxx 3ce0915e58 SCI: make Korean fan-patched games use upscaled gfx driver
Next step to get rid of upscaling code in the engine.
Tested with SQ4. Since all these fan-patched versions
seem to work the same way, I am optimistic that the
other games run fine, too. Unfortunately, it is difficult
to obtain these fan patches. I only found one for SQ4.
2024-08-06 08:47:25 +03: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 9d833af3d0 SCI: fix video display regression 2024-07-13 00:33:00 +02:00
athrxx c5bfd8cfb5 SCI: move x-alignment into gfx drivers
The alignment can be done inside the drivers. We need it for CGA and early
version CGA b/w only, since we don't have the same (hardware based
requirements) as the original drivers. So we can really clean up the code
here.
2024-07-12 23:51:47 +02:00
athrxx eb66963f05 SCI: fix regression from video modes update
(src and dst coords need to get the same alignment)
2024-07-12 13:51:31 +02: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 4071d023fb SCI: (CGA/Hercules) - add argument for cropped Hercules image
This is an idea that came up in the PR. It will remove the black border in
Hercules mode. Currently, there is no other way to enable it except in the
code. It could be added as a launcher option, but having a checkbox just
for the case where Hercules mode is enabled might be a bit too much.

I also turned the monochrome colors into an argument to make it more
flexible.
2024-07-01 19:27:24 +02:00
athrxx f0a0675c1c SCI: disable rgb rendering for CGA/Hercules modes
The option is not compatible. It could be implemented, but it isn't trivial
and as far as my (limited) understanding goes it would be totally pointless
for these modes.
2024-07-01 00:05:57 +03:00
athrxx 728153ec62 SCI: get rid of EGA driver implementation
This is more or less a leftover from the beginnings of my work on the
CGA and Hercules modes. The EGA driver implementation does
nothing except forward the data, so it can just run on the default.

Also remove an unnecessary buffer.
2024-06-30 19:51: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
Matthew Jimenez 5219c99400 GRAPHICS: Move PaletteManager definition to a separate header 2024-03-12 12:24:00 +02:00
sluicebox 1f4124b121 SCI: Remove or disable unused functions 2023-11-03 15:12:41 -07:00
sluicebox c241f21baa SCI: Reduce scope of variables 2023-11-03 15:12:40 -07: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
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh 940c7bfc14 SCI: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Paul Gilbert 0136043f09 COMMON: Revert Change Rect and Point to have int32 fields
This reverts commit 1c3e7fb4e9.
2021-07-06 20:35:42 -07:00
Paul Gilbert 1c3e7fb4e9 COMMON: Change Rect and Point to have int32 fields 2021-07-04 18:24:26 -07:00
sluicebox 05d5299c54 SCI: Remove unused 640x480 mode from SCI16 code
This is old SCI32 code that should have been removed from
GfxScreen when GfxScreen32 was created.
2021-05-14 17:37:19 -06:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
wonst719 b7664c24dc SCI: Korean fan translation support 2020-11-08 22:26:31 +02:00
Willem Jan Palenstijn 2cc67cd29b SCI: Add custom palette mods for SQ3 and LSL2
This adds a devtools script to convert scifx config files from FreeSCI
into C++ code to apply the palette mods.

The actual palette mods are by Matt Hargett, and from FreeSCI.
2020-10-31 11:44:28 +02:00
Willem Jan Palenstijn 0be765b288 SCI: Add support for RGB rendering 2020-10-24 02:55:01 +03:00
D G Turner d11c61db14 SCI: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-01 05:06:31 +00:00
sluicebox 336a79f078 SCI: Add horizontal shake to kShakeScreen 2019-11-19 00:20:40 +01:00
sluicebox b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
sluicebox 954f5142cb SCI: Implement full kWait behavior
Fixes PQ3 bug #11020
2019-07-21 18:20:07 +03:00
Colin Snover 432fd522d2 ENGINES: Remove default1x scaler flag
This flag is removed for a few reasons:

* Engines universally set this flag to true for widths > 320,
  which made it redundant everywhere;
* This flag functioned primarily as a "force 1x scaler" flag,
  since its behaviour was almost completely undocumented and users
  would need to figure out that they'd need an explicit non-default
  scaler set to get a scaler to operate at widths > 320;
* (Most importantly) engines should not be in the business of
  deciding how the backend may choose to render its virtual screen.
  The choice of rendering behaviour belongs to the user, and the
  backend, in that order.

A nearby future commit restores the default1x scaler behaviour in
the SDL backend code for the moment, but in the future it is my
hope that there will be a better configuration UI to allow users
to specify how they want scaling to work for high resolutions.
2017-10-07 12:30:29 -05:00
Colin Snover a4eb6a5ca5 SCI: Remove old SCI32 view scaling code from SCI16 graphics code 2017-09-27 20:27:34 -05:00
Colin Snover 31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Colin Snover ee4b172d54 SCI: Remove old SCI32 hires detection heuristic 2016-11-02 15:43:07 -05:00
Eugene Sandulenko dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00