Commit Graph

1227 Commits

Author SHA1 Message Date
Eugene Sandulenko
8a340007ea Merge pull request #361 from rundfunk47/guiimprovements
GUI: Various GUI Improvements
2013-08-22 05:31:23 -07:00
Johannes Schickel
a2fabef87c GRAPHICS: Increase robustness of VectorRendererSpec::drawString. 2013-08-22 11:46:50 +02:00
Johannes Schickel
af13b74d02 GRAPHICS: Unify drawing paths in VectorRendererSpec::drawString.
Formerly, the behavior between when a drawable area was specified and when not
was different in a sense which is not expected. For example, when an empty
textDrawableArea was passed and the text could be drawn outside the 'area'
specified. While when a textDrawableArea covering the whole screen was passed
the text was clipped inside 'area'. Now, the code does follow the latter logic
in both cases.

I am not sure whether this will cause any issues, but a quick check of the
launcher and options menu didn't reveal anything...
2013-08-22 11:46:49 +02:00
Johannes Schickel
81ae06cae3 GRAPHICS: Simplify VectorRendererSpec::drawString.
This removes the two additional copy steps for rendering when a drawable text
area is specified. Instead it uses Surface::getSubArea to draw directly onto
_activeSurface.
2013-08-22 11:46:48 +02:00
Torbjörn Andersson
8c2bbb09a8 GRAPHICS: Add missing "break"s in switch, CID 1063214
This won't actually make any difference, since the fall through
would do nothing and then reach the break in the default case. But
I think it's less error-prone this way if the code is ever modified.
2013-08-19 19:34:41 +02:00
Narek Mailian
6fa3c7751f GRAPHICS: Gradient blending on borders of rounded squares 2013-08-16 20:54:10 +02:00
Narek Mailian
52ee92625f GRAPHICS: Change soft-shadow calculation to not use doubles 2013-08-16 20:54:09 +02:00
Narek Mailian
b91e10f931 GRAPHICS: Shadows on tabs 2013-08-16 20:54:09 +02:00
Narek Mailian
5c00dbbd2a GRAPHICS: Add support for Soft Shadows with rounded squares 2013-08-16 20:54:08 +02:00
Narek Mailian
887a99e211 GRAPHICS: Added changes and improved code from inisider/scummvm (partial text)
Includes code from https://github.com/inisider/scummvm/ , which has been
squashed and bugfixed
2013-08-16 20:54:08 +02:00
Johannes Schickel
a2a5d42a58 GRAPHICS: Fix warnings about mismatching format arguments. 2013-08-12 16:43:35 +02:00
Narek Mailian
1f1d35bd3d GRAPHICS: Allow VectorRenderer and ThemeEngine to init with 4BPP 2013-08-08 08:35:08 +02:00
Narek Mailian
f545a2f08f GUI: Change name of GUI-renderers to remove "16-bit" 2013-08-08 08:35:08 +02:00
Narek Mailian
ece8b7fb65 GRAPHICS: Fix fonts/bdf.cpp to allow for 32bpp to be used 2013-08-08 08:27:11 +02:00
Narek Mailian
1d40dca7a0 GRAPHICS: Add error-checking in blendPixelPtr for invalid BPPs 2013-08-08 08:27:11 +02:00
Johannes Schickel
0f59009e6e GRAPHICS: Fix VectorRendererSpec for RGBA8888.
Formerly values in the gradient and blending code overflowed and thus caused
incorrect colors. Now there's some special case for 32bpp modes, which needs
slightly more operations but assures a correct output.
2013-08-08 08:27:11 +02: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
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
5111746911 GRAPHICS: Take advantage of Surface::getPixels. 2013-08-03 04:02:49 +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
dbef9fef3b GRAPHICS: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 04:02:49 +02:00
Johannes Schickel
affb7c3cb3 GRAPHICS: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:34 +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
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
9db17152c1 GRAPHICS: Make Surface::copyFrom work for any src pitch.
Formerly we assumed that the newly created surface has the same pitch as the
source surface. This is a assumption that might be invalid (for example in
case of the Surface returned by OSystem::lockScreen.)
2013-08-01 23:57:10 +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
Johannes Schickel
e9bb9ddcf5 GRAPHICS: Be more robust with broken/unsupported thumbnail headers.
This fixes future issues like bug #3614654:
"ALL: ScummVM 1.5.0 can't read newer saved games".

There are a few behavior changes introduced with this commit:

- checkThumbnailHeader will now also report the presence of
  unsupported/broken (but skippable) headers.

- skipThumbnail will also try to skip the data for broken/unsupported
  thumbnail data.

- loadThumbnail will skip over broken/unsupported thumbnail data but still
  return 0 in this case.
2013-07-12 22:54:53 +02:00
Eugene Sandulenko
49210a803a Merge pull request #331 from sev-/gsoc2012-eventsrecorder
GSoC2012: Event Recorder (reworked)
2013-07-04 04:58:54 -07:00
Matthew Hoops
7445459c9d GRAPHICS: Cleanup the YUV to RGB usage documentation 2013-06-30 17:56:36 -04:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00
Matthew Hoops
2d6b66ef41 GRAPHICS: Fix quantization table id check 2013-04-16 12:00:39 -04:00
Einar Johan Trøan Sømåen
0db8a0b3b1 GRAPHICS: Let JPEGs pixelformat state 0 alpha bits. 2013-02-01 01:54:39 +01:00
Johannes Schickel
b4d0a8ba66 JANITORIAL: Enforce "} // End of namespace" with a single space after }. 2013-01-26 19:38:02 +01:00
Matthew Hoops
6ae97cdfbe GRAPHICS: Modify the JFIF version warning
v1.02 images should only differ with the thumbnail from v1.01, and should be handled correctly by our decoder.
2013-01-26 11:56:13 -05:00
Johannes Schickel
2ef500ce81 Merge pull request #256 from lordhoto/thumbnail-pixelformat
GRAPHICS: Serialize PixelFormat for thumbnails and allow 4Bpp surfaces.
2013-01-26 05:37:32 -08:00
Einar Johan Trøan Sømåen
5d4d65d6d9 JANITORIAL: Fix ){ -> ) { 2013-01-24 20:15:13 +01:00
Einar Johan Trøan Sømåen
58777682fe GRAPHICS: Fix leak in PNG-decoder. 2013-01-24 17:39:16 +01:00
Tomas Jakobsson
befa207bfa GRAPHICS: Delete iff.cpp and iff.h since all ILBM and PBM decoding is handled by IFFDecoder now 2013-01-06 20:04:50 +01:00
Tomas Jakobsson
fe2b4b39f7 GRAPHICS: New IFFDecoder that decodes ILBM and PBM images 2013-01-06 20:04:42 +01:00
D G Turner
0b72bd2dea GRAPHICS: Add ability to override outputPitch to ILBM decoder.
This allows loading an image into a buffer of a larger width.

Thanks to Tomaz^ for this patch.
2012-12-26 02:54:18 +00:00
D G Turner
5fecf5bcb5 GRAPHICS: Allow ILBM bitmap loading for images with 6 planes.
Thanks to Tomaz^ for this.
2012-12-26 02:09:33 +00:00
D G Turner
0eb68f6c97 GRAPHICS: Add support for ILBM files containing uncompressed data.
Thanks to Tomaz^ for this patch.
2012-12-26 00:52:30 +00:00
Einar Johan Trøan Sømåen
1ef63578bb GRAPHICS: Mark decoders used by Wintermute as such. 2012-10-23 21:48:27 +02: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
Matthew Hoops
c645f7dc93 GRAPHICS: Make failing to find the PICT header return false from loadStream 2012-10-16 22:15:09 -04:00
Johannes Schickel
a5bce74635 GRAPHICS: Fix compilation of conversion.cpp on motomagx.
Using plain "inline" instead of "FORCEINLINE" allows the compiler to continue
even when it fails to inline crossBlitLogic/crossBlitLogic3BppSource. The
impact of other systems now not inlining the functions anymore is hopefully
small enough to not cause any problems.
2012-10-09 23:32:51 +02:00