121 Commits

Author SHA1 Message Date
Eric Culp
627fbaf8a0 GRAPHICS: Return value in dummy functions 2019-04-01 00:29:23 +03:00
Eric Culp
c666ecd41d GRAPHICS: Respect alpha and rgba formats in interpolation and conversion 2019-04-01 00:29:23 +03:00
Eric Culp
c2ddab7dd2 GRAPHICS: Fix braces in two interpolate functions 2019-04-01 00:29:23 +03:00
Eric Culp
e3357083d7 GRAPHICS: Change another interpolation function in Edge filter.
A 2 to 1 interpolation was causing errors. It is fixed, renamed, and
moved to the common interpolation file.
2019-04-01 00:29:23 +03:00
Eric Culp
0246ca8da0 GRAPHICS: Change Edge filter to use shared interpolation functions 2019-04-01 00:29:23 +03:00
Eric Culp
3d57c13af0 GRAPHICS: Add dummy specializations for some interpolate* functions
They use ColorMask values not present in 2-byte ColorMasks. Since they
should never be used on 2-byte pixel data, the dummy implementations
assert(0) and should be removed by any optimizing compiler since no
code path can ever reach them.
2019-04-01 00:29:23 +03:00
Eric Culp
2215e0cb51 GRAPHICS: Add 32bit versions of interpolate* functions 2019-04-01 00:29:23 +03:00
Thierry Crozat
3b542cea53 SURFACESDL: Respect filtering setting when performing aspect ratio correction 2018-10-24 23:34:41 +02:00
Adrian Frühwirth
3747d852ee JANITORIAL: Fix whitespace 2018-04-15 16:31:31 +02:00
Colin Snover
a5bc89102e ALL: Remove obsolete register keyword
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so
cannot exist in a well-formed C++17 program.

It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html>
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>.

The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.

Closes gh-1079.
2017-12-03 20:27:42 -06:00
Bastien Bouclet
e9bfbbd470 GRAPHICS: Allow saving thumbnails of 32 bits screens
Fixes saving in Myst ME when using the OpenGL output
2016-03-27 14:52:34 +02:00
Johannes Schickel
e499a25a00 GRAPHICS: Manually specify function alignment in ARM assembly. 2014-03-06 20:21:48 +01:00
Johannes Schickel
53332e8066 GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
Torbjörn Andersson
b8850522b6 GRAPHICS: Fix incorrect parameter order for getBasePtr.
This caused createThumbnail() to crash, e.g. when saving in the
Kyrandia engine. Probably other engines as well.
2013-08-08 06:55:17 +02:00
Johannes Schickel
5111746911 GRAPHICS: Take advantage of Surface::getPixels. 2013-08-03 04:02:49 +02:00
Johannes Schickel
dbef9fef3b GRAPHICS: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 04:02:49 +02:00
Johannes Schickel
ff451ba2dc GRAPHICS: Slight formatting fixes in thumbnail_intern.cpp. 2013-08-02 17:48:31 +02:00
Johannes Schickel
9a787fa586 GRAPHICS: Silence conversion warnings by using an explicit cast. 2013-08-02 17:33:13 +02:00
Johannes Schickel
adf8cee449 GRAPHICS: Allow arbitrary input sizes for thumbnail scaling.
Instead of a fixed 1/2 or 1/4 scaling we do a two step scaling now:
1) Scale image to width < 160*2 && height < [100,120]*2 with 1/4 or 1/2
   nearest-neighbor.
2) Use a bilinear scaler to scale aspect preserving to 160x[100,120]

This fixes bug #3614568 "GRAPHICS: Odd thumbnail sizes crash".
2013-07-13 01:57:23 +02:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00
David-John Willis
e7921438cd GRAPHICS: Rename NEON_ASPECT_CORRECTOR to USE_ARM_NEON_ASPECT_CORRECTOR
* This better matches other ARM codepaths.
* Also remove #ifdef OPENPANDORA as moved to configure.
2012-10-21 18:43:07 +01:00
Johannes Schickel
dc6b98f64c GRAPHICS: Slight formatting fixes in aspect.cpp. 2012-09-25 15:16:54 +02:00
Bertrand Augereau
4c02e19742 SCALER: Neon code for aspect correction for OpenPandora
It gains 35% on the first function of the profiling on Indy IV
It is now nearly memory-bound (~10%) so it might not be needed to schedule the code better than this
2012-09-17 22:13:34 +02:00
Bertrand Augereau
5f6a98cb5b SCALER: No need to inline interpolate5Line, it just bloats stretch200To240 for nothing 2012-09-03 01:34:41 +02:00
Johannes Schickel
0075fa2f98 GRAPHICS: Replace OverlayColor with uint16 in scaler code.
Scalers are actually fixed at 2Bpp right now and not at the
depth of OverlayColor.
2012-06-12 04:18:59 +02:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Willem Jan Palenstijn
052177d136 COMMON: Remove some double-underscore defines (reserved) 2011-11-14 14:59:58 +01:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
CeRiAl
d809756c8d SCALERS: Fix Normal1xAspect scaler bug reported in bug #3313709 2011-06-14 22:43:28 +02:00
Willem Jan Palenstijn
a1f12c25ca ARM: Fix normal2x scaler for width % 4 != 0
The first jump to 'thin:' didn't leave r14 (remaining width)
in the right state.
2011-06-10 21:31:03 +02:00
CeRiAl
ef3484646a SCALERS: Fix for compiling for ARM without using ASM scalers 2011-06-10 21:30:45 +02:00
Alyssa Milburn
1529287082 GRAPHICS: Move comment to the right function. 2011-06-08 19:30:22 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
peres
6ddf6693ce GRAPHICS: use the new interpolate16_5_3 2011-05-07 08:38:53 +09:00
peres
2dddcbf41d GRAPHICS: implement the long awaited interpolate16_5_3 2011-05-07 08:38:32 +09:00
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Johannes Schickel
3fd919060c GRPAHICS: Do not access Surface::bytesPerPixel anymore. 2011-04-17 20:58:08 +02:00
Johannes Schickel
39b993fb02 GRAPHICS: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. 2011-04-17 16:24:52 +02:00
dhewg
d83a83ef50 JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
2011-03-29 21:57:56 +02:00
Johannes Schickel
f53f1af062 GRAPHICS: Adapt thumbnail code to grabPalette RGBA->RGB change. 2011-02-14 17:08:32 +01:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
Max Horn
dbddd758d1 GRAPHICS: colour -> color
svn-id: r54287
2010-11-17 12:21:37 +00:00
Max Horn
7e7ad149c2 GRAPHICS: Cleanup advmame scaler code; don't include assert.h
svn-id: r54104
2010-11-07 00:37:04 +00:00
Johannes Schickel
2662d569d9 Fix long standing regression (introduced with r34053) in thumbnail scaling code for Hercules graphics.
svn-id: r50605
2010-07-02 22:38:42 +00:00
Filippos Karapetis
e22a75de99 Rewrote the handling of thumbnail creation for KQ6 Windows in rev #50600, so that it recreates the screen buffer like the other workarounds above it (thanks to LordHoto for pointing this out)
svn-id: r50601
2010-07-02 19:04:44 +00:00
Filippos Karapetis
1beff1a599 Added a special case for KQ6 hires in the thumbnail creation code, which runs at a resolution of 640x440
svn-id: r50600
2010-07-02 16:52:09 +00:00
Johannes Schickel
d163686d2d Document that the current Hercules mode thumbnail scaler code is pretty much aimed for SCUMM games.
svn-id: r48736
2010-04-19 20:44:25 +00:00
Johannes Schickel
498d1da182 Cleanup.
svn-id: r48735
2010-04-19 20:44:05 +00:00
Andre Heider
64cba2878a Do not call OSystem::grabPalette() for 16bit modes, when the result is not used anyway for those modes.
svn-id: r48733
2010-04-19 20:37:20 +00:00