Commit Graph
15 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 a929c5aabc TITANIC: Add further strings to create_titanic tool 2017-08-26 11:13:34 -04:00
Paul Gilbert 015cf46cb0 TITANIC: Fix highlighting of name slots when loading a savegame 2016-11-07 21:11:39 -05:00
Eugene Sandulenko dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Paul Gilbert 7ace328cb8 TITANIC: Fix various warnings 2016-07-31 18:08:57 -04:00
Paul Gilbert 41a3c83bc6 TITANIC: Fleshing out PET RealLife Load functionality 2016-07-22 12:44:14 -04:00
Paul Gilbert 4ff4215706 TITANIC: Display first 5 savegame slots in PET RealLife tab 2016-07-20 22:23:42 -04:00
Paul Gilbert b324d2ea6c TITANIC: FIx confusion between mouse down & up messages in CPetGlyph hierarchy 2016-07-10 16:22:32 -04:00
Paul Gilbert e778ac8bcd TITANIC: FIx confusion between mouse down & up messages in CPETElement hierarchy 2016-07-10 16:22:31 -04:00
Paul Gilbert 2675580208 TITANIC: Fix crashes in PET and text cursor 2016-07-10 16:12:10 -04:00
Paul Gilbert 1512545f28 TITANIC: Resolve color handling code in CPetText 2016-07-10 16:12:02 -04:00
Paul Gilbert a88c0b0999 TITANIC: Starting to flesh out CPetText drawing 2016-07-10 16:11:59 -04:00
Paul Gilbert d11a95068c TITANIC: Standardizing PET mouse button methods, quit is now working 2016-07-10 16:11:49 -04:00
Paul Gilbert b398a5001b TITANIC: Implementing CPetLoad and CPetSave 2016-07-10 16:11:38 -04:00
Paul Gilbert 42206332d0 TITANIC: Adding new class stubs for PET Real Life btns & elements 2016-07-10 16:11:30 -04:00