scummvm/graphics
Adrian Frühwirth 00e59a3122 ALL: Load savegame thumbnail only when necessary
This commit introduces the following changes:

1. Graphics::loadThumbnail()

   Now returns a boolean and takes a new argument skipThumbnail which
   defaults to false. In case of true, loadThumbnail() reads past the
   thumbnail data in the input stream instead of actually loading the
   thumbnail. This simplifies savegame handling where, up until now,
   many engines always read the whole savegame metadata (including
   the thumbnail) and then threw away the thumbnail when not needed
   (which is in almost all cases, the most common exception being
   MetaEngine::querySaveMetaInfos() which is responsible for loading
   savegame metadata for displaying it in the GUI launcher.

2. readSavegameHeader()

   Engines which already implement such a method (name varies) now take
   a new argument skipThumbnail (default: true) which is passed
   through to loadThumbnail(). This means that the default case for
   readSavegameHeader() is now _not_ loading the thumbnail from a
   savegame and just reading past it. In those cases, e.g.
   querySaveMetaInfos(), where we actually are interested in loading
   the thumbnail readSavegameHeader() needs to explicitely be called
   with skipThumbnail == false.

   Engines whose readSavegameHeader() (name varies) already takes an
   argument loadThumbnail have been adapted to have a similar
   prototype and semantics.
   I.e. readSaveHeader(in, loadThumbnail, header) now is
   readSaveHeader(in, header, skipThumbnail).

3. Error handling

   Engines which previously did not check the return value of
   readSavegameHeader() (name varies) now do so ensuring that possibly
   broken savegames (be it a broken thumbnail or something else) don't
   make it into the GUI launcher list in the first place.
2018-04-07 09:26:20 +02:00
..
fonts GRAPHICS: Fix potentially uninitialized pointers in BDF loader 2017-11-14 09:12:15 +01:00
macgui GRAPHICS: MACGUI: Do not crash when nothing was drawn yet 2017-08-28 19:17:45 +02:00
scaler ALL: Remove obsolete register keyword 2017-12-03 20:27:42 -06:00
colormasks.h GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
conversion.cpp GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
conversion.h GRAPHICS: Fix some Doxygen comments that seem wrong. 2014-08-29 03:26:48 +02:00
cursor.h GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
cursorman.cpp GRAPHICS: Send blank cursors to graphics backends 2017-10-15 13:24:20 -05:00
cursorman.h GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
font.cpp GRAPHICS: Added optional initial line width ot text wrapper 2017-01-29 18:41:07 +01:00
font.h GRAPHICS: Added optional initial line width ot text wrapper 2017-01-29 18:41:07 +01:00
fontman.cpp Revert "COMMON: Change way the Singleton instances are instantiated" 2017-07-10 21:17:41 +02:00
fontman.h GRAPHICS: Fix some Doxygen comments that seem wrong. 2014-08-29 03:26:48 +02:00
maccursor.cpp GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
maccursor.h GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
managed_surface.cpp GRAPHICS: Fix ManagedSurface clear calls when no surface is set 2017-12-03 13:10:41 -05:00
managed_surface.h JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
mode.h BACKENDS: Fix window sizing of games that switch between multiple resolutions 2017-10-07 12:30:29 -05:00
module.mk GRAPHICS: Skeleton of MacTextWindow 2017-07-17 23:45:22 +02:00
nine_patch.cpp GRAPHICS: Fix leak in ninepatch destructor 2016-08-26 12:27:16 +02:00
nine_patch.h GRAPHICS: Fix warnings 2016-08-03 14:41:14 +02:00
palette.h BACKENDS: Refactor OpenGL & SDL graphics backends 2017-10-15 13:24:20 -05:00
pixelformat.cpp GRAPHICS: Include bytesPerPixel in toString representation 2017-05-27 09:39:08 +02:00
pixelformat.h ALL: Fix misuse of comma operator 2017-11-10 09:57:03 -06:00
primitives.cpp GRAPHICS: Correcting think line thickness 2016-08-25 12:25:58 +02:00
primitives.h GRAPHICS: Move generic primitives from WAGE engine 2016-02-14 17:13:03 +01:00
scaler.cpp GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
scaler.h GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
screen.cpp GRAPHICS: Set parameterless Screen constructor to use screen format 2016-03-21 20:12:10 -04:00
screen.h JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
sjis.cpp GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
sjis.h GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
surface.cpp GRAPHICS: Initialize mask in FllodFill when required 2016-06-14 20:45:09 +02:00
surface.h COMMON: Add limited support for custom deleters to ScopedPtr 2017-11-18 22:35:12 +01:00
thumbnail.cpp ALL: Load savegame thumbnail only when necessary 2018-04-07 09:26:20 +02:00
thumbnail.h ALL: Load savegame thumbnail only when necessary 2018-04-07 09:26:20 +02:00
transform_struct.cpp COMMON: Copy TransparentSurface from Wintermute engine to common code 2014-06-15 15:43:06 +03:00
transform_struct.h Graphics:: Add multiply blend mode 2017-08-12 08:31:56 +02:00
transform_tools.cpp COMMON: Copy TransparentSurface from Wintermute engine to common code 2014-06-15 15:43:06 +03:00
transform_tools.h GRAPHICS: Silence an MSVC warning 2014-10-19 17:03:14 +03:00
transparent_surface.cpp Graphics:: Add multiply blend mode 2017-08-12 08:31:56 +02:00
transparent_surface.h GRAPHICS: Allow nearest neighbor scaling of 1Bpp and 2Bpp TransparentSurfaces 2017-07-06 19:12:36 -05:00
VectorRenderer.cpp GUI: Prepare button to be clipped 2016-07-03 12:14:45 +02:00
VectorRenderer.h GUI: Remove the ThemeItem draw queues 2018-03-12 11:46:04 +01:00
VectorRendererSpec.cpp JANITORIAL: Fix formatting 2018-03-23 20:40:30 +01:00
VectorRendererSpec.h GUI: Added transparency to PicWidgets 2016-08-24 16:07:55 +06:00
wincursor.cpp GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
wincursor.h GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
yuv_to_rgb.cpp ALL: Remove obsolete register keyword 2017-12-03 20:27:42 -06:00
yuv_to_rgb.h GRAPHICS: Cleanup the YUV to RGB usage documentation 2013-06-30 17:56:36 -04:00