Commit Graph
53 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paul Gilbert 9f175c4053 ENGINES: Cleanup of savegame filenames generation
This removes filename methods when it matched the Engine method.
Secondly, ensuring there was an overriden getSaveStateName method
for engines that didn't do the standard target.00x save filenames
2020-02-16 15:44:28 -08: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 eb97c05ccc LAB: Merge all the different scene restoring code after saving/loading 2016-02-08 00:19:05 +02:00
Filippos Karapetis b61ade788e LAB: Call checkRoomMusic() when changing a room 2016-01-14 23:41:33 +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 4548cbddb5 LAB: Add support for loading games from the launcher 2015-12-27 23:07:41 +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 01d99d213d LAB: Reduce passing around of pointers to the near-global _closeDataPtr 2015-12-26 14:18:44 +01:00
Strangerke 3740560153 LAB: Use constant for breadcrumbs-related loops 2015-12-25 02:18:07 +01:00
Strangerke 9e048bc207 LAB: Stop adding useless garbage at the end of the savegames 2015-12-24 08:03:04 +01:00
Strangerke 0bf89c1eec LAB: Cleanup the way shouldQuit is called 2015-12-24 01:21:40 +01:00
Filippos Karapetis 29d85c8d50 LAB: Use int in for loops, instead of uint16 2015-12-23 21:43:17 +01:00
Strangerke 34b59256fc LAB: Replace g_system by _system 2015-12-23 21:43:16 +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 cff1f99b26 LAB: Set a default to the second parameter of readPict 2015-12-23 21:35:32 +01:00
D G Turner 9048d08a05 LAB: Correct compiler warning in savegame code. 2015-12-23 21:34:09 +01:00
Strangerke 691d9e7e2e LAB: Fix memory leaks in savegame code 2015-12-23 21:34:09 +01:00
Eugene Sandulenko 167d9c48a3 LAB: Reduced scope of a few more variables 2015-12-23 21:34:05 +01:00
Strangerke 1d027704e0 LAB: Fix mouse cursor after save/load 2015-12-23 21:34:05 +01:00
Strangerke a784e2bd5c LAB: Finally get rid of g_lab 2015-12-23 21:34:03 +01:00
Filippos Karapetis 4fb53ad170 LAB: Some renames, simplified saveGame() and loadGame() 2015-12-23 21:34:00 +01:00
Filippos Karapetis 8f5c91ee07 LAB: Move all the tile puzzle related functionality into its own class 2015-12-23 21:34:00 +01:00
Strangerke 199fa254f9 LAB: Rename CloseDataPtr pointers, some refactoring 2015-12-23 21:33:59 +01:00
Eugene Sandulenko 0af299d3c7 LAB: Move saveRestoreGame() to saveload.cpp 2015-12-23 21:33:58 +01:00
Eugene Sandulenko 66f2935a22 LAB: Reduced header dependency: dispman.h, eventman.h 2015-12-23 21:33:57 +01:00
Eugene Sandulenko 9a9b752c0e LAB: More header dependency redux 2015-12-23 21:33:57 +01:00
Eugene Sandulenko 5fad5cece3 LAB: Reduced header dependency: labsets.h, utils.h 2015-12-23 21:33:57 +01:00
Eugene Sandulenko b1585b2c62 LAB: Reduced header dependency: savegame.h 2015-12-23 21:33:57 +01:00
Eugene Sandulenko eccb852749 LAB: Removed unnecessary includes 2015-12-23 21:33:56 +01:00
Strangerke 2d0fab7f4c LAB: Use // for comments 2015-12-23 21:33:55 +01:00
Strangerke ae056a767b LAB: Use doxygen format for function comments 2015-12-23 21:33:55 +01:00
Strangerke 3a1ee64761 LAB: Review spacing 2015-12-23 21:33:55 +01:00
Strangerke dcefb696ed LAB: Remove more extern variables 2015-12-23 21:33:54 +01:00
Strangerke 2611b62d5e LAB: Rename parse types 2015-12-23 21:33:52 +01:00
Strangerke 785772e86f LAB: Move fade functions to DisplayMan, some renaming 2015-12-23 21:33:52 +01:00
Strangerke f48cf343c2 LAB: Move doNotes and doWestPaper to LabEngine, remove some useless defines 2015-12-23 21:33:51 +01:00
Strangerke f7321fa278 LAB: Make more functions member of LabEngine class 2015-12-23 21:33:50 +01:00
Strangerke 733fbe4c62 LAB: Start working on a separate DisplayMan class 2015-12-23 21:33:50 +01:00
Eugene Sandulenko 646c29d5a3 LAB: Renames and moved vars to classes 2015-12-23 21:33:48 +01:00
Strangerke 8fa64824a2 LAB: Some renaming, move a couple of variables to game engine 2015-12-23 21:33:47 +01:00
Strangerke f817c1de2e LAB: Get rid of stddefines 2015-12-23 21:33:45 +01:00
Strangerke 6395095b83 LAB: Move crumb variables to main class 2015-12-23 21:33:44 +01:00
Strangerke 6cee2eb2be LAB: Move RoomNum to main engine class 2015-12-23 21:33:44 +01:00
Filippos Karapetis b1eb345f80 LAB: Move some static variables to the top. Some cleanup 2015-12-15 00:05:02 +01:00
Filippos Karapetis 5bc37fd878 LAB: Fix loading of saved games 2015-12-15 00:05:02 +01:00