Commit graph

17 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
Johannes Schickel
d5b21c4036 HOPKINS: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Paul Gilbert
ac70aa2e5c HOPKINS: Bumped up savegame version, and added load handling the brief version 3 format 2013-07-31 21:21:29 -04:00
Paul Gilbert
07d8e5643b HOPKINS: Reverted to saving Breakout high scores in a separate file 2013-07-31 21:01:04 -04:00
Paul Gilbert
dee719390c HOPKINS: Move breakout highscore table to savegames, and fixes to display 2013-07-26 21:57:02 -04:00
Strangerke
63c462efce HOPKINS: Remove erroneous static keyword, get rid of g_vm 2013-06-26 20:11:00 +02:00
Strangerke
848841772f HOPKINS: Remove setParent() from SaveLoadManager and ScriptManager 2013-03-20 08:06:10 +01:00
Strangerke
de883e6198 HOPKINS: Fix some warnings reported by CppCheck 2013-03-18 08:19:33 +01:00
Strangerke
84e290eade HOPKINS: Reorder includes 2013-02-15 22:20:24 +01:00
Strangerke
65c61ab6d7 HOPKINS: Add synchronization of car position on the city map 2013-01-14 07:52:24 +01:00
Strangerke
687b7f97df HOPKINS: Remane functions and variables from Globals 2012-12-20 00:30:01 +01:00
Paul Gilbert
b230dff1e9 HOPKINS: Fix savegame thumbnails 2012-11-30 23:15:47 +11:00
Paul Gilbert
d52ae2f47b HOPKINS: Clean-up of CHANGE_TETE to fix switching characters 2012-11-24 22:26:06 +11:00
Paul Gilbert
ec0a33b949 HOPKINS: Beginnings of save/load implementation 2012-10-27 22:16:54 +11:00
Paul Gilbert
1651bb07d9 HOPKINS: Move Save/Load dialog code from menu.cpp to dialogs.cpp 2012-10-27 20:19:21 +11:00
Paul Gilbert
7441e0e8d7 HOPKINS: bugfixes to conversation code 2012-10-24 23:20:26 +11:00
Paul Gilbert
38b5cf1efe HOPKINS: Created new SaveFileManager class to handle save file related code 2012-10-24 22:49:32 +11:00