scummvm/engines/mads
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
..
dragonsphere JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
nebular MADS: Fix crash when Rex is locked in cell 2017-11-21 19:33:02 -05:00
phantom JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
action.cpp MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
action.h MADS: Initialize some variables in player code 2016-01-11 06:54:11 +01:00
animation.cpp MADS: Remove obsolete comment and add debug trace in animation code 2015-11-18 13:05:51 +01:00
animation.h MADS: Rename the parameter of setNextFrameTimer 2015-11-12 00:50:39 +01:00
assets.cpp MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
assets.h MADS: Phantom: Implement scene 401 2015-10-30 11:05:07 +01:00
audio.cpp MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
audio.h MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
camera.cpp JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
camera.h MADS: Refactor camera code 2015-11-24 21:47:53 +01:00
compression.cpp MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
compression.h MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
configure.engine MADS: Change the engine description 2016-02-06 00:12:41 +02:00
conversations.cpp JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
conversations.h JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
debugger.cpp MADS: Changed engine to use Graphics::ManagedSurface 2016-03-14 20:56:26 -04:00
debugger.h MADS: Phantom: Expand the existing camera adjustment logic for V2 games 2015-10-22 02:14:41 +03:00
detection_tables.h MADS: Mark unsupported games as unstable 2016-11-21 20:24:25 -05:00
detection.cpp ALL: Load savegame thumbnail only when necessary 2018-04-07 09:26:20 +02:00
dialogs.cpp MADS: Changed engine to use Graphics::ManagedSurface 2016-03-14 20:56:26 -04:00
dialogs.h MADS: Extra conversation dialog setup 2016-01-18 17:12:54 -05:00
events.cpp MADS: Changed engine to use Graphics::ManagedSurface 2016-03-14 20:56:26 -04:00
events.h MADS: Implement GameConversations::update 2016-01-10 06:10:03 +11:00
font.cpp MADS: Refactor MSurface and Screen to not use virtual inheritance 2016-05-26 21:37:52 -04:00
font.h MADS: Refactor MSurface and Screen to not use virtual inheritance 2016-05-26 21:37:52 -04:00
game_data.cpp MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
game_data.h MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
game.cpp ALL: Load savegame thumbnail only when necessary 2018-04-07 09:26:20 +02:00
game.h ALL: Load savegame thumbnail only when necessary 2018-04-07 09:26:20 +02:00
globals.cpp MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
globals.h MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
hotspots.cpp MADS: Phantom: Initial work on hotspots with dynamic animations 2015-10-22 00:42:04 +03:00
hotspots.h MADS: Phantom: Initial work on hotspots with dynamic animations 2015-10-22 00:42:04 +03:00
inventory.cpp MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
inventory.h MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
mads.cpp ENGINES: Remove default1x scaler flag 2017-10-07 12:30:29 -05:00
mads.h MADS: Changed engine to use Graphics::ManagedSurface 2016-03-14 20:56:26 -04:00
menu_views.cpp JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
menu_views.h MADS: Remove git conflict markers in menu_views.h 2016-04-16 20:23:10 +03:00
messages.cpp MADS: Refactor MSurface and Screen to not use virtual inheritance 2016-05-26 21:37:52 -04:00
messages.h MADS: Refactor MSurface and Screen to not use virtual inheritance 2016-05-26 21:37:52 -04:00
module.mk MADS: Refactor camera code 2015-11-24 21:47:53 +01:00
msurface.cpp MADS: Refactor MSurface and Screen to not use virtual inheritance 2016-05-26 21:37:52 -04:00
msurface.h MADS: Remove redundant allocation in surface creation 2016-05-27 06:00:58 -04:00
palette.cpp MADS: Fix two off-by-ones in Fader::insertionSort 2016-10-26 22:30:02 +02:00
palette.h MADS: Janitorial: Remove trailing spaces and tabs 2015-10-27 23:33:23 +01:00
player.cpp JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
player.h MADS: Phantom: Flesh out walk triggers 2016-01-07 18:11:24 +11:00
POTFILES MADS: Update POTFILES 2016-11-26 11:14:03 +01:00
rails.cpp MADS: Changed engine to use Graphics::ManagedSurface 2016-03-14 20:56:26 -04:00
rails.h MADS: Phantom: Add scene 303 2015-10-28 09:53:11 +01:00
resources.cpp MADS: Silent another cppCheck warning 2015-11-23 01:23:37 +01:00
resources.h MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
scene_data.cpp JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
scene_data.h JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
scene.cpp MADS: Changed engine to use Graphics::ManagedSurface 2016-03-14 20:56:26 -04:00
scene.h MADS: Phantom: Merge _variant and _initialVariant 2015-11-15 18:18:29 +01:00
screen.cpp MADS: Fix Unused Private Variable Compiler Warning. 2017-01-12 06:41:00 +00:00
screen.h MADS: Fix Unused Private Variable Compiler Warning. 2017-01-12 06:41:00 +00:00
sequence.cpp MADS: Changed engine to use Graphics::ManagedSurface 2016-03-14 20:56:26 -04:00
sequence.h MADS: Replace the use of setTimingTrigger by a call to addTimer for V2+ games 2015-11-10 09:15:55 +01:00
sound.cpp JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
sound.h JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
sprites.cpp MADS: Refactor MSurface and Screen to not use virtual inheritance 2016-05-26 21:37:52 -04:00
sprites.h MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
staticres.cpp MADS: Fix spelling mistake 2016-10-31 18:10:16 -04:00
staticres.h MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
user_interface.cpp JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
user_interface.h MADS: Refactor MSurface and Screen to not use virtual inheritance 2016-05-26 21:37:52 -04:00