Eric Culp
c802ab3b60
GRAPHICS: add setFactor to scalerplugins
2021-03-15 16:48:40 +02:00
Eric Culp
d56a7d610c
GRAPHICS: add static methods for 1x and 1.5x scale
2021-03-15 16:48:40 +02:00
Eric Culp
a54ea85641
GRAPHICS: fix dotmatrix inconsistencies
...
Now it uses the x and y coordinates to produce
the same pixels in the destination surface.
2021-03-15 16:48:40 +02:00
Eric Culp
b70a04214b
GRAPHICS/BASE: adds Dotmatrix scaler plugin
2021-03-15 16:48:40 +02:00
Eric Culp
6320ea772e
GRAPHICS: small formatting change in HQPlugin
2021-03-15 16:48:40 +02:00
Eric Culp
8c9cb22734
GRAPHICS/SDL/BASE: fix scaler declarations
...
mainly adding const and using uint instead of int
2021-03-15 16:48:40 +02:00
Eric Culp
ca1754c047
GRAPHICS/BASE: add maxExtraPixels() to ScalerMan
2021-03-15 16:48:40 +02:00
Eric Culp
489d361d18
GRAPHICS: fix formatting to conform to guidelines
2021-03-15 16:48:40 +02:00
Eric Culp
a0299cf5d2
GRAPHICS: fixes the value of extraPixels for 2xsai
2021-03-15 16:48:40 +02:00
Eric Culp
ef2b057eef
GRAPHICS: adds 2xsai as scaler plugin
2021-03-15 16:48:40 +02:00
Eric Culp
83a8abda70
GRAPHICS: add support for hq scaler plugin
2021-03-15 16:48:40 +02:00
Eric Culp
0d103d01c4
GRAPHICS: adds comments for scalers and clean up
2021-03-15 16:48:40 +02:00
Eric Culp
739c75c869
BACKEND: fixes some errors from changing modes
2021-03-15 16:48:40 +02:00
Eric Culp
60c430d6e5
GRAPHICS: adds additinoal methods to scaler api
2021-03-15 16:48:40 +02:00
Eric Culp
318130a905
BACKENDS/GRAPHICS: Stops overlay from being scaled
2021-03-15 16:48:40 +02:00
Eric Culp
202f4efdee
GRAPHICS: Changes name of normal plugin to be consistant
2021-03-15 16:48:40 +02:00
Eric Culp
7bcc1f0b13
GRAPHICS: Adds a nearest neighbor plugin
...
It's not used yet, but it compiles and is managed by the plugin manager.
2021-03-15 16:48:40 +02:00
Eric Culp
a3af191753
GRAPHICS/BASE: Adds definitions for scaler plugins
...
This includes a class for plugin implementations to inherit from and
code necessary for plugin managers to use scalers
2021-03-15 16:48:40 +02:00
Orgad Shaneh
ce5b27f82f
TINYGL: Implement a real operator=
...
With logic similar to the copy ctor.
2021-03-15 13:25:01 +00:00
D G Turner
7beaae25ba
TINYGL: Fix Compilation with pre-C++-11 Compilers
2021-03-13 19:42:56 +00:00
D G Turner
4a5e96ce6f
TINYGL: Fix GCC Warning for Implicit Copy Operator
...
This is emitted when -Wdeprecated-copy is enabled. The fix implemented
is to explicitly declare this to be the default copy operator.
Since this may be a latent bug, this is marked with a FIXME.
2021-03-13 11:28:46 +00:00
Thierry Crozat
4945526219
GRAPHICS: Fix 24bpp pixel formats handling in ManageSurface blitting
...
The code was only working for one specific case of 24bpp
pixel formats, and it is now generic. This fixes wrong
colors in the AGS savegame screenshots.
2021-03-13 03:28:22 +00:00
Vladimir Menshakov
91cbd8fc53
GRAPHICS: Fix crash in blitFromInner if destRect is empty
2021-03-06 20:57:27 +00:00
Eugene Sandulenko
3dc6137b6f
GRAPHICS: MACGUI: Fix crash for first cursor undrawing
2021-03-03 16:20:51 +01:00
Paul Gilbert
44d616d9c0
GRAPHICS: Compilation fixes
2021-02-26 18:20:11 -08:00
Paul Gilbert
4142f7b7f8
GRAPHICS: Allow TTFFont to handle ManagedSurfaces with transparent pixels
2021-02-26 17:58:19 -08:00
Thierry Crozat
f12813c630
GRAPHICS: Support having transparent ManagedSurface
2021-02-22 22:59:07 +00:00
Matthew Jimenez
286cccdafe
GRAPHICS: Update TTF render color blending to work with any surface alpha level
2021-02-21 15:30:30 +00:00
Matthew Jimenez
85854120fa
GRAPHICS: Improve TTF rendering on transparent surfaces.
...
Update color blending to match blending found in ManagedSurface. TTF rendering assumed the alpha channel of the surface was completely opaque. ULTIMA8 TTF rendering attempts to use a transparent surface and became near-illegible for text on scrolls. This change will affect TTF rendering on surfaces that are not already painted.
2021-02-21 15:30:30 +00:00
Paul Gilbert
c53fb72922
GRAPHICS: Better 32-bit surface handling in ManagedSurface
...
Fixes several issues dealing with 32-bit surfaces, such as
- transBlitFrom between 32-bit surfaces
- 32-bit surfaces where the alpha channel is explicitly turned off
- Alpha blending when dest pixels are the transparent color
- Specifying colors to fill, line routines without alpha
2021-02-20 14:37:29 -08:00
Henrik "Henke37" Andersson
2300f0a7d4
MACGUI: Use getValOrDefault
2021-02-12 00:41:23 +01:00
Matthew Jimenez
c9696cb36c
GRAPHICS: Fix blending with default transColor on 32-bpp surfaces
2021-02-06 20:56:38 -06:00
Paul Gilbert
0589f9a817
GRAPHICS: Support 24-bit surfaces as dest for blitFrom
2021-02-06 16:37:31 -08:00
Paul Gilbert
81d891ebb0
GRAPHICS: ManagedSurface transBlitFrom ignore alpha matching transColor
2021-02-06 16:37:31 -08:00
Paul Gilbert
420cee48a5
GRAPHICS: Allow ManagedSurface blitting to ignore transparency
2021-02-06 16:37:31 -08:00
Martin Gerhardy
b02ae40c9c
GRAPHICS: allow scaling for opaque surfaces
2021-01-17 21:54:11 +01:00
antoniou79
5e467e1bbc
GRAPHICS: FONT: Clarification for combo of wrapping flags
...
for the wordWrapTextImpl and the kWordWrapEvenWidthLines, kWordWrapOnExplicitNewLines bit flags
2020-12-09 18:53:42 +02: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
Bartosz Gentkowski
a35cbeab46
DOXYGEN: Add doxy groups to remaining headers in 'graphics'
...
To make sure that they appear in the graphics group
in the doc structure.
2020-12-01 23:24:37 +00:00
Le Philousophe
b093c9d6b5
GRAPHICS: Fix decoding of TTF font names
...
This fixes a buffer overflow when decoding font Unicode name as length
provided to decodeUTF16BE is in code units and not in bytes (twice less).
2020-12-01 20:03:07 +01:00
athrxx
cf08894520
GRAPHICS: (SJIS) - SAGA adjustments
2020-11-22 19:02:43 +01:00
sluicebox
b5241be248
SCI: Fix buffer overflow when loading Korean font
...
Fixes bug #11966
2020-11-21 00:51:26 -08:00
Cameron Cawley
c877097b49
ALL: Remove use of "" in Common::U32String constructors
2020-11-16 16:56:58 +00:00
Vladimir Serbinenko
68a9136e4d
COMMON: Rewrite Encoder and drop dependency on iconv ( #2586 )
...
Different platforms have different levels of support of encodings and
often have slight variations. We already have tables for most encoding
with only CJK missing. Full transcoding inclusion allows us to get reliable
encoding results independently of platform. The biggest con is the need for
external tables encoding.dat.
It removes a duplicate table for korean in graphics/korfont.cpp
2020-11-15 16:20:35 +01:00
Paweł Kołodziejski
9ee7215d4f
GRAPHICS: Fixed logic typo "_format.aLoss = 8" -> "_format.aLoss == 8"
2020-11-12 12:07:22 +01:00
Vincent Pelletier
02294ee717
GRAPHICS: Use memcpy when copying to same-format-no-alpha destination
...
Accelerates when source format is compatible with destination except for
alpha channel bit-loss. Ex:
from: 32bits A << 24 | R << 16 | G << 8 | B
to: 32bits R << 16 | G << 8 | B
2020-11-12 08:16:52 +01:00
Vincent Pelletier
f8c72b5967
TINYGL: Move texture resampling from create time to render time
...
Thanks to pixel repacking using cpu data cache, this has a low runtime
cost even for TGL_LINEAR.
Adds support for TGL_NEAREST.
Adds support for TGL_MIRRORED_REPEAT, TGL_CLAMP_TO_EDGE and TGL_REPEAT.
Also, add support for more texture clamping and resampling options.
Mipmaps are not supported, although their sampling modes will be
applied - but to the full-size texture instead of selected mipmap.
Note: Texture sampler is still chosen at texture creation time.
2020-11-12 08:15:39 +01:00
Vincent Pelletier
bd37cd3012
TINYGL: Make gl_resizeImage* pixel-format-independent
2020-11-12 08:13:49 +01:00
Vincent Pelletier
0108c11d98
TINYGL: Add support for more texture color formats
2020-11-12 08:03:48 +01:00
Vincent Pelletier
b7b797d74d
TINYGL: Use PixelBuffer for texture pixel format conversion
...
Instead of duplicating pixel-unpacking logic.
2020-11-12 07:49:15 +01:00