Commit Graph
141 Commits
Author SHA1 Message Date
David Fioramonti 2649c429db LAB: By default skip thumbnail loading for readSaveGameHeader
This changes the convention back to skipping the thumbnail loading
for readSaveGameHeader. querySaveMetaInfos is the only place it
shouldn't be skipped.
2018-08-03 14:51:12 +02:00
David Fioramonti 75587c3c66 LAB: Fix thumbnail issues
Fixes Trac#10619.

The thumbnail loading for the saved games was defaulting to
disabled so no thumbnail was being loaded and this caused trying
to show the thumbnail to crash scummvm.

So I have set the thumbnail pointer to be null if the thumbnail
doesn't get loaded and I've set the thumnail to not be skipped
so that thumbnails get shown when using the gui.
2018-07-25 10:15:32 +02:00
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
Filippos Karapetis f3cdd217ba LAB: Get rid of _interfaceOff 2016-01-15 21:03:58 +02:00
Filippos Karapetis afa75b7047 LAB: Separate the interface from the event manager 2016-01-15 21:03:57 +02:00
Filippos Karapetis 46fdd5e7a4 LAB: Clean up the trial warning handling code 2016-01-14 23:41:35 +02:00
Filippos Karapetis 241c9829f6 LAB: Rename doCloseup() to reflect its actual purpose 2016-01-14 23:41:30 +02:00
Filippos Karapetis cd2520b795 LAB: Get rid of setDirection()
A leftover from code restructuring
2016-01-14 23:41:30 +02:00
Filippos Karapetis 463f889447 LAB: Rename the members of the CrumbData struct
This helps to distinguish them from the LabEngine variables
2016-01-14 23:41:29 +02:00
Filippos Karapetis 49a45a21ce LAB: The parameter of doMap() isn't needed 2016-01-14 23:41:27 +02:00
Willem Jan Palenstijn 15bbcff786 LAB: Fix switching between texts in monitor 2016-01-05 23:00:06 +01:00
Filippos Karapetis 5c75ac9898 LAB: Fix loading from the GMM and warping to rooms from the console 2015-12-28 01:04:28 +02:00
Filippos Karapetis 3977a7ffa1 LAB: Add support for saving and loading games from the GMM 2015-12-27 23:22:54 +02:00
Filippos Karapetis c5f5fbc208 LAB: Refactor the music code 2015-12-27 21:16:43 +02:00
Filippos Karapetis 3215d14e82 LAB: Rename TilePuzzle to SpecialLocks, to better reflect its purpose
This class handles two different special locks, the tile puzzle and
the combination door
2015-12-27 01:42:45 +02:00
Willem Jan Palenstijn 33ed5af212 LAB: Remove type ConstDataPtr, add consts 2015-12-26 15:14:37 +01:00
Willem Jan Palenstijn 01d99d213d LAB: Reduce passing around of pointers to the near-global _closeDataPtr 2015-12-26 14:18:44 +01:00
Willem Jan Palenstijn f72de724e9 LAB: Reduce passing around of pointers to the near-global _closeDataPtr 2015-12-26 14:07:46 +01:00
Willem Jan Palenstijn e3ce65cce8 LAB: Reduce passing around of pointers to the near-global _closeDataPtr 2015-12-26 14:04:39 +01:00
Willem Jan Palenstijn 6daf92cbf4 LAB: Reduce passing around of pointers to the near-global _closeDataPtr 2015-12-26 13:58:07 +01:00
Filippos Karapetis 7f2b69b75c LAB: Rename fromCrumbs() to processEvent() and simplify it a bit 2015-12-25 14:12:06 +02:00
Filippos Karapetis c9b103b2db LAB: Use friendlier names for lists 2015-12-25 14:12:05 +02:00
Willem Jan Palenstijn f2194d595d Merge branch 'master' of github.com:scummvm/scummvm 2015-12-24 20:29:58 +01:00
Willem Jan Palenstijn 0d97d1af82 LAB: Avoid manual memory management of CloseData 2015-12-24 20:28:57 +01:00
Strangerke c191efa623 LAB: Remove the 3rd parameter of drawMap (always false) 2015-12-24 18:55:10 +01:00
Filippos Karapetis a5553b3197 Use Common::Keycode and enums in interface buttons 2015-12-24 19:12:02 +02:00
Willem Jan Palenstijn b614ccc2e8 LAB: Avoid manual memory management in Action lists 2015-12-24 17:42:40 +01:00
Filippos Karapetis 8b45875e24 LAB: Get rid of _screenImage
Thanks to wjp for finding this
2015-12-24 13:00:10 +02:00
Filippos Karapetis 70ec11d260 LAB: Change the direction and map door defines into enums 2015-12-23 22:59:59 +02:00
Willem Jan Palenstijn 10d9d8dee5 LAB: Fix warnings by adding consts 2015-12-23 21:51:39 +01:00
Filippos Karapetis 333d553716 LAB: Add a console, with two new commands (scene and scene_resources) 2015-12-23 21:43:16 +01:00
Strangerke be4c436dca LAB: Move event update functions out of updateMusic 2015-12-23 21:35:34 +01:00
Strangerke 7380ddf400 LAB: Change RuleList to a Common::List<Rule> as suggested by wjp 2015-12-23 21:35:34 +01:00
Strangerke 46f792d82d LAB: Delete some more variables in LabEngine destructor 2015-12-23 21:35:33 +01:00
Strangerke 6aad3aebd9 LAB: Move some more comments to header files 2015-12-23 21:35:33 +01:00
Strangerke b53735ba06 LAB: Constify some parameters 2015-12-23 21:35:32 +01:00
Strangerke 28c74aed05 LAB: More work on the comments 2015-12-23 21:35:30 +01:00
Filippos Karapetis 11d16bb34f LAB: Remove some leftover MSVC memory leak tester code 2015-12-23 21:35:29 +01:00
Filippos Karapetis 3e8eaa2c35 LAB: Use Common::String for strings, removing a ton of memory leaks
Also, add a method to properly free room views
2015-12-23 21:35:27 +01:00
Strangerke b3b3c0cfd5 LAB: Remove parameters from processMainButton and performAction 2015-12-23 21:34:09 +01:00
Filippos Karapetis 0004488441 LAB: Simplify decIncInv() and move action handling out of fromCrumbs() 2015-12-23 21:34:09 +01:00
Strangerke 054a7a1e19 LAB: Use Common::Rect in functions related to flowText (WIP) 2015-12-23 21:34:07 +01:00
Filippos Karapetis 005e077551 LAB: Some renames 2015-12-23 21:34:07 +01:00
Strangerke 9c7e372a21 LAB: make takeItem use Common::Point, some refactoring 2015-12-23 21:34:06 +01:00
Filippos Karapetis 521652e436 LAB: Move some code from fromCrumbs() into separate functions
This makes this huge function a bit easier to read and understand
2015-12-23 21:34:05 +01:00
Strangerke 21e6f40301 LAB: Fix a regression related to random number generation, some renaming 2015-12-23 21:34:04 +01:00
Strangerke a784e2bd5c LAB: Finally get rid of g_lab 2015-12-23 21:34:03 +01:00
Strangerke 974740d307 LAB: Some renaming in LabEngine 2015-12-23 21:34:03 +01:00
Strangerke ad54a75b85 LAB: Add _vm to Image class 2015-12-23 21:34:03 +01:00
Filippos Karapetis 99e09b2ca2 LAB: Merge the different X image maps 2015-12-23 21:34:03 +01:00