Commit graph

104 commits

Author SHA1 Message Date
Le Philousophe
58ade5240e GRAPHICS: Add missing drawing primitives
This allows to draw polygon and ellipses directly on the surfaces.
2025-01-24 12:11:17 +01:00
Torbjörn Andersson
904235ca4d GRAPHICS: Fix SurfacePrimitives::drawHLine()
It was using the wrong parameter order to hLine(). This caused a
regression in drawing Macintosh menu bars (rounded rectangles), and
quite possibly other things as well.
2025-01-06 09:56:25 +01:00
Cameron Cawley
027c9bddca GRAPHICS: Add drawRoundRect to Graphics::Surface 2025-01-06 01:35:05 +02:00
Cameron Cawley
a79a710feb GRAPHICS: Use a Primitives subclass in Graphics::Surface 2025-01-06 01:35:05 +02:00
Cameron Cawley
3da558fc96 GRAPHICS: Add a common function for detecting transparent surfaces 2024-06-19 02:36:17 +02:00
Eugene Sandulenko
ff24083fd4
GRAPHICS: Make convertTo() work with incomplete palettes
We we always assuming that the provided palette is 256 bytes long,
up to the point that we hardcoded this value and skipped this parameter
almost everywhere.

This changes the default parameter to 256 and allows the lesser values
be passed.
2024-05-01 22:42:03 +02:00
Matthew Jimenez
83aa8dc291 GRAPHICS: Remove palette start from surface convertToInPlace.
The palette start value was always zero, and was not properly multiplied by three when used in the function
2024-03-31 23:16:59 +03:00
Eugene Sandulenko
8af225e5f2
GRAPHICS: Improved debug output on incorrect formats in Surface 2024-03-16 00:35:07 +01:00
Cameron Cawley
327e0c4f1e GRAPHICS: Add palette start and size parameters to Surface::convertToInPlace() 2023-11-12 18:36:08 +01:00
Cameron Cawley
953772ba99 COMMON: Rename memset2/4/8 to memset16/32/64 2023-11-06 13:40:38 +02:00
Cameron Cawley
6669e36d2c GRAPHICS: Use memset2 and memset4 in Graphics::Surface 2023-11-06 13:40:38 +02:00
Filippos Karapetis
e918ce9bc6 GRAPHICS: Revert incorrect changes to error messages 2023-10-16 17:31:30 +02:00
Cameron Cawley
1e4abf786b GRAPHICS: Use crossBlit more for converting surfaces 2023-10-16 17:31:30 +02:00
Miro Kropacek
17f0941878 GRAPHICS: Fix compilation of blit-atari.cpp 2023-08-24 22:42:04 +02:00
Miro Kropacek
3ab147259b GRAPHICS: Add support for dithering from 3bpp into 1bpp
This allows using "ScummVM Modern" theme in 8-bit resolutions.
2023-06-10 23:27:57 +02:00
Miro Kropacek
3294b20653 GRAPHICS: Support Floyd dithering for RGB121
RGB121 is a special case of CLUT8 similar to RGB332 but with pixels
taking only the low nibble of a byte.
2023-06-10 23:27:57 +02:00
Miro Kropacek
76d3706492 BACKENDS: ATARI: Add build scripts
- consolidate public #define's (just ATARI)
- cpu compiler flags are specified in the script
- allow explicit move16, SV and SV Blitter features enabled/disabled

Provide two build scripts:

1. "Fat" one targeted at 040/060 machines (possibly with SuperVidel)

This one is optimized for 68020-60 (so it's still possible to try
highres engines on 68030 machines).

2. "Slim" one targeted at 030 machines (Falcon030+DFB/CT2 or TT030)

This one is optimized for 68030 and stripped from even more features:
"fancy" (highres) themes, move16 & SuperVidel routines and most
importantly the highres engines.
2023-05-10 22:58:26 +02:00
Cameron Cawley
f5f445be5f GRAPHICS: Add generic versions of applyColorKey() and setAlpha() 2023-04-09 12:49:23 +02:00
Miro Kropacek
6c5e3dbfd5 BACKENDS: ATARI: Refactor 2023-03-25 21:45:50 +01:00
Miro Kropacek
5ba26fdf35 GRAPHICS: ATARI: Introduce accelerated blitting 2023-03-04 23:38:42 +01:00
Cameron Cawley
ad33a3063b GRAPHICS: Add Surface::convertFrom() 2023-03-02 15:11:24 +00:00
Miro Kropáček
2c0e9555de
GRAPHICS: Refactor Surface::copyFrom() & Surface::copyRectToSurface (#4727)
GRAPHICS: Refactor Surface::copyFrom() & Surface::copyRectToSurface()

This change makes Surface::copyFrom() slightly slower but
Surface::copyRectToSurface() performs better for rectangles with the
same width as the surface.

And of course we avoid unnecessary code duplication.

Co-authored-by: Cameron Cawley <ccawley2011@gmail.com>
2023-02-25 14:22:08 +01:00
Vladimir Serbinenko
b9aa479bba GRAPHICS: Support Floyd dithering for RGB332
RGB332 is a special case of CLUT8 but RGB332 support allows to skip passing
palette explicitly and speeds up the dithering
2023-01-12 10:27:20 +03:00
Scott Percival
cb68c05dcb GRAPHICS: Loosen palette checks on Surface::convertTo
Surface::ditherFloyd() supports having different palette counts;
as it is a private function wrapped by convertTo(), adjust the
short-circuit check in convertTo() so that the short circuit
happens if both palettes are equal in size and content.
2023-01-10 13:41:53 +01:00
Cameron Cawley
7f2d9fd0fd GRAPHICS: Split conversion.cpp into multiple files 2022-12-22 23:45:14 +01:00
Thierry Crozat
31d76cd039 Graphics: Add flipHorizontal to Surface
This complements flipVertical and is needed for the AGS engine.
2022-12-15 22:40:17 +01:00
Eugene Sandulenko
18c88fabfe
GRAPHICS: Add possibility to specify dithering algorithm. Default is Floyd-Steinberg 2022-09-28 23:02:05 +02:00
Eugene Sandulenko
ff9313056d
GRAPHICS: Implement dithering in Surface::convertTo() 2022-09-28 22:38:08 +02:00
Eugene Sandulenko
502d171fc3
GRAPHICS: Improved error message on surface conversion 2022-06-06 01:55:58 +02:00
Cameron Cawley
07498687bd
GRAPHICS: Add Surface::copyRectToSurfaceWithKey() 2022-06-05 17:28:28 +03:00
Cameron Cawley
085130c6da GRAPHICS: Move ManagedSurface::clip() to the Surface class 2022-06-03 16:00:46 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paul Gilbert
baccbedf50 GRAPHICS: Changed surface classes sizes from uint16 to int16 2021-07-04 18:24:27 -07:00
Eugene Sandulenko
7eb9bcf705
GRAPHICS: Fix MSVC warning 2021-07-01 01:35:58 +02:00
D G Turner
a51f5e9c1a GRAPHICS: Fix GCC Compiler Warnings 2021-05-05 11:36:04 +01:00
Eugene Sandulenko
ed9c2f97ca
GRAPHICS: Implemented debug output for Surface 2021-05-02 01:03:01 +02:00
Cameron Cawley
394288db98 GRAPHICS: Move rotoscale code out of TransparentSurface 2021-04-19 03:08:11 +03:00
Eugene Sandulenko
e8e137a46c GRAPHICS: Create FloodFill mask with the matching pixel format of the main surface 2020-08-16 23:50:46 +02:00
Cameron Cawley
352653b8a2 GRAPHICS: Add a function for scaling a standard Graphics::Surface
This also makes use of it in the SCI and Wintermute engines
2020-07-18 12:16:52 +02:00
Eugene Sandulenko
8e215fad59 GRAPHICS: Fix memory leak 2020-03-30 11:48:02 +02:00
Cameron Cawley
ba035ac532 GRAPHICS: Add a function to vertically flip surfaces 2020-01-02 20:53:29 +02:00
Cameron Cawley
07834616b3 GRAPHICS: Fix dstFormat check in Surface::convertTo 2019-03-03 13:44:53 +01:00
Cameron Cawley
fd1162cb71 GRAPHICS: Support converting to 3Bpp surfaces 2019-03-02 07:29:22 +01:00
Eugene Sandulenko
934e186063 GRAPHICS: Initialize mask in FllodFill when required 2016-06-14 20:45:09 +02:00
Eugene Sandulenko
2bf0ebf317 GRAPHICS: Add possibility to specify Fill maskmode in the constructor 2016-06-14 20:30:24 +02:00
Eugene Sandulenko
60297cb9fa GRAPHICS: Add mask mode to FloodFill class and document the class. 2016-06-03 16:39:03 +02:00
Eugene Sandulenko
e171d21fc5 GRAPHICS: Fix FloodFill 2016-06-03 15:52:48 +02:00
Eugene Sandulenko
531b190d59 GRAPHICS: Added FloodFill class to Surface.
Moved from WAGE engine and is using stack-based classic floodfill
implementation.
2016-06-03 00:45:56 +02:00
Johannes Schickel
53332e8066 GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
RichieSams
701250efb5 GRAPHICS: Remove variable shadowing 2013-09-22 15:54:06 -05:00