Commit Graph
19 Commits
Author SHA1 Message Date
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
Paul Gilbert da4d4d8272 SHERLOCK: Remove redundant derived Serializer class 2017-08-07 19:08:03 -04:00
Eugene Sandulenko dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Paul Gilbert 621a37bbe3 SHERLOCK: Fix saving/loading when characters are moving 2015-08-15 20:26:36 -04:00
Paul Gilbert ad72d862b2 SHERLOCK: Bump up savegame version 2015-07-30 20:34:31 -04:00
Paul Gilbert fc0cf31fde SHERLOCK: RT: Skeleton class for Files dialog 2015-07-24 22:14:40 -04:00
Paul Gilbert 6d35a547ad SHERLOCK: Add missing virtual prefix to SaveManager destructor 2015-06-25 21:03:10 -04:00
Paul Gilbert 92ac962718 SHERLOCK: RT: Further split-off of Scalpel-specific code 2015-06-25 20:42:02 -04:00
Paul Gilbert af2a1a3351 SHERLOCK: Refactoring, cleanup, and fixes for savegame code 2015-06-07 19:18:14 -04:00
Paul Gilbert 46e85f389f SHERLOCK: Go to save mode when clicking empty save slot 2015-05-20 21:15:33 -04:00
Paul Gilbert 6f9693102f SHERLOCK: Further minor cleanups 2015-05-19 09:35:53 -04:00
Paul Gilbert 033241eb43 SHERLOCK: Corrected incorrect method name in SaveManager 2015-05-19 09:19:42 -04:00
Paul Gilbert fa35249a24 SHERLOCK: More syntactic fixes 2015-05-19 08:01:06 -04:00
Paul Gilbert 1df183ffcb SHERLOCK: Move method comments from cpp to headers 2015-05-19 07:37:55 -04:00
Willem Jan Palenstijn 902b791165 SHERLOCK: Make copyright headers consistent 2015-05-09 18:06:05 +02:00
Paul Gilbert 8b0e8cd505 SHERLOCK: Hook up savegames to launcher 2015-04-22 06:25:04 -05:00
Paul Gilbert 0984405a0d SHERLOCK: Implement savegame synchronization 2015-04-21 22:51:03 -05:00
Paul Gilbert 3186016370 SHERLOCK: Implemented save game dialog event handling 2015-04-21 18:25:06 -05:00
Paul Gilbert 6fe65dc719 SHERLOCK: Beginnins of SaveManager class 2015-04-21 03:48:21 -05:00