Commit Graph
86 Commits
Author SHA1 Message Date
Miro Kropacek 24dcacfe69 JANITORIAL: Add missing references to const function parameters
Applied to all 'const Common::' and 'const Graphics::' instances.
2025-04-13 02:20:09 +03:00
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
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
Cameron Cawley 327e0c4f1e GRAPHICS: Add palette start and size parameters to Surface::convertToInPlace() 2023-11-12 18:36:08 +01:00
Cameron Cawley 1e4abf786b GRAPHICS: Use crossBlit more for converting surfaces 2023-10-16 17:31:30 +02:00
Le Philousophe f3ab611ee8 GRAPHICS: Remove spurious warning
This partially reverts commit aa9d13f84a.
It looks like a debug leftover more than an actual warning.
2023-09-02 10:49:14 +02:00
Wyatt Radkiewicz aa9d13f84a AGS: Preliminary optimizations of blending funcs
Just commiting my first attempts at optimizing BITMAP::draw and the
blendPixel function. Here's an overview of the changes (some are
temporary):

- Put the loop of BITMAP::draw into its own function drawInner.
 I templated it so that I could put different paths into the loop that
 could be optimized out at compile time if a certain blending function
 didn't need it etc.

- I added apple NEON (SIMD) intrensics to the drawInner function,
 haven't ported it to SSE yet, but there is a small library that actually
 maps neon intrensics to sse ones.

- Removed a few ifs from the normal x loop and put it in the y loop.
2023-08-28 21:16:42 +02:00
Eugene Sandulenko 9862969f69 GRAPHICS: Make setPixel assert in attempts to draw outside of the surface
Based on PR#5011 by phcoder.

Expect some of your engines to fail during runtime, fix them.
2023-08-06 14:07:43 +02:00
Walter Agazzi 421295bdc6 GRAPHICS: Change pitch from int16 to int32
This is required for games allocating very big surfaces
(e.g. 9000x300 in Chronicle of Innsmouth - Mountains of Madness)
2023-05-20 23:23:58 +02:00
Cameron Cawley f5f445be5f GRAPHICS: Add generic versions of applyColorKey() and setAlpha() 2023-04-09 12:49:23 +02:00
Cameron Cawley ad33a3063b GRAPHICS: Add Surface::convertFrom() 2023-03-02 15:11:24 +00: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
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
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
Martin Gerhardy b2878dea3b GRAPHICS: removed invalid char from comment 2021-07-11 13:56:19 +02:00
Paul Gilbert baccbedf50 GRAPHICS: Changed surface classes sizes from uint16 to int16 2021-07-04 18:24:27 -07:00
Cameron Cawley d02daaeb2b SCUMM: Remove direct use of Graphics::Surface from ARM code (#2931) 2021-05-04 00:17:52 +03: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
Cameron Cawley 099b593943 GRAPHICS: Add functions for getting and setting pixels in a surface 2021-03-28 09:50:15 -03:00
Bartosz Gentkowski 529b64d8cd DOXYGEN: Review of high prio files from graphics
Editing doxygen comments in:

- cursorman.h
- font.h
- managed_surface.h
- pixelformat.h
- surface.h
2020-12-01 23:24:37 +00: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
Cameron Cawley ba035ac532 GRAPHICS: Add a function to vertically flip surfaces 2020-01-02 20:53:29 +02:00
Colin Snover 076667dc00 COMMON: Add limited support for custom deleters to ScopedPtr
Custom deleters of ScopedPtr are not currently fully conforming to
C++11's support for custom deleters in std::unique_ptr for the
sake of simplicity of implementation. Unlike in the standard
library, plain functions and lvalue references are not supported,
nor may custom deleters be passed to the constructor at runtime.
This can be improved in the future, if necessary, by doing what
standard library implementations usually do and creating a Pair
class that uses the Empty Base Optimization idiom to avoid extra
storage overhead of the deleter instance when it is not needed, as
in typical standard library implementations, plus some additional
type traits to support the necessary metaprogramming for the
different type overloads.
2017-11-18 22:35:12 +01: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 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
Fedor 75305f136f GRAPHICS: Remove some trailing whitespace in surface.h 2014-10-28 15:03:44 +02:00
Einar Johan Trøan Sømåen 0593c2eab2 GRAPHICS: Fix some Doxygen comments that seem wrong. 2014-08-29 03:26:48 +02:00
Johannes Schickel 53332e8066 GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
Johannes Schickel 14d328faca GRAPHICS: Fix SharedPtrSurfaceDeleter for nullptr inputs. 2013-11-27 19:44:54 +01:00
RichieSams 701250efb5 GRAPHICS: Remove variable shadowing 2013-09-22 15:54:06 -05:00
RichieSams 6f4e80e36e ZVISION: Add wrapper function for copyRectToSurface
Also rename some arguments to make them more clear
2013-09-12 14:07:42 -05:00
richiesams 7e8e9bf3d1 GRAPHICS: Create copyRectToSurface member function 2013-08-15 14:31:21 -05:00
Johannes Schickel 7f8308e0eb Merge pull request #365 from lordhoto/protected-pixels
Make Graphics::Surface::pixels protected.
2013-08-07 12:24:59 -07:00
Johannes Schickel 363a5a95cf GRAPHICS: Make Surface::pixels protected. 2013-08-06 03:51:49 +02:00
Johannes Schickel 604e1b0070 GRAPHICS: Fix typo. 2013-08-04 01:01:15 +02:00
Johannes Schickel 260ec7a430 GRAPHICS: Add two new methods to change 'pixels' of a Surface.
One method is a simpler setter for 'pixels'. The other one can be used to
setup a Surface with custom data.
2013-08-03 04:02:54 +02:00
Johannes Schickel f03dc05847 GRAPHICS: Add an easy way to query 'pixels' of Surface.
This introduced getPixels which is a shortcut for getBasePtr(0, 0).
2013-08-03 04:02:49 +02:00
Johannes Schickel 058c22ddaa GRAPHICS: Allow to query a Surface describing a subarea in Surface. 2013-08-02 18:47:00 +02:00
Johannes Schickel c2971374cd Merge pull request #257 from lordhoto/graphics-conversion
Extend crossBlit for abitrary (in-place) conversions and add a in-place conversion to Surface
2012-10-08 14:18:33 -07:00
Johannes Schickel eeb3959259 GRAPHICS: Add an in-place Surface PixelFormat conversion. 2012-08-28 02:27:48 +02:00