aboutsummaryrefslogtreecommitdiff
path: root/graphics/thumbnail.h
AgeCommit message (Collapse)Author
2018-04-07ALL: Load savegame thumbnail only when necessaryAdrian Frühwirth
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.
2014-02-18GRAPHICS: Make GPL headers consistent in themselves.Johannes Schickel
2013-05-17RECORDER: Implement Events RecorderEugene Sandulenko
2012-07-14GRAPHICS: Serialize PixelFormat for thumbnails and allow 4Bpp surfaces.Johannes Schickel
This allows any 2Bpp/4Bpp Surfaces to be written via saveThumbnail and loadThumbnail now. It furthermore will preserve the loaded Surface in loadThumbnail.
2011-08-07GRAPHICS: Slight formatting fix.Johannes Schickel
2011-08-07GRAPHICS: Simplify the interface of Graphics::loadThumbnail().Christoph Mallon
Now it returns the Surface, so the caller does not need to create one and pass it.
2011-08-07JANITORIAL: Remove trailing empty lines.Christoph Mallon
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2010-11-19ALL: Push down deps on stream.h from .h to .cpp filesMax Horn
svn-id: r54358
2010-08-03GRAPHICS: Fix a typo in a comment.Jordi Vilalta Prat
svn-id: r51692
2010-08-02GRAPHICS: Renamed skipThumbnailHeader to skipThumbnail.Johannes Schickel
svn-id: r51668
2009-10-04Change a couple places from 'end of namespace' to 'End of namespace', for ↵Max Horn
consistency svn-id: r44634
2008-08-20Committed patch #2050337 "KYRA/SCUMM: Thumbnail support/improvement". ↵Johannes Schickel
(Without Max' compressed backward seeking support for now) svn-id: r34053