Commit graph

43 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
Adrian Frühwirth
8f6d8f7f68 MORTEVIELLE: Let listSaves return list sorted on slot numbers 2018-03-26 01:07:32 +02:00
Eugene Sandulenko
858a31102f MORTEVIELLE: Use ### as save file pattern 2016-06-08 10:15:06 +02:00
Johannes Schickel
9da7d86952 MORTEVIELLE: Make GPL headers consistent in themselves. 2014-02-18 02:39:36 +01:00
Strangerke
2bc174a3d0 MORTEVIELLE: Janitorial - Remove trailing spaces 2014-02-16 18:24:19 +01:00
Strangerke
b3c377aacd MORTEVIELLE: Get rid of setParent() 2014-01-10 01:46:38 +01:00
Strangerke
d8d4a2c3bb MORTEVIELLE: Get rid of setParent() in Menu and MouseHandler 2014-01-09 08:21:52 +01:00
Strangerke
972cdf0e12 MORTEVIELLE: Avoid erroring out when the user tries to load a missing save game 2013-08-21 08:37:55 +02:00
Johannes Schickel
0c0f99eb96 MORTEVIELLE: Take advantage of Surface::getPixels. 2013-08-03 04:02:51 +02:00
Johannes Schickel
2117feaeec MORTEVIELLE: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:33 +02:00
D G Turner
ffef92a134 MORTEVIELLE: Fix two GCC compiler warnings.
The first is due to a variable set but never used i.e. destSurface, but
I think this call is still needed to lock the area being copied, hence
have removed the variable, but not the call.

The second was a real bug in the type of the print format string used
for savegame naming. slot is a number, not a string and can vary from 0
to 999, hence the 3 digit fixed size with zero padded prefix.
2013-07-31 03:36:16 +01:00
Strangerke
67f900ed33 MORTEVIELLE: Reorder includes 2013-07-19 11:51:10 +02:00
Paul Gilbert
e14278eb58 MORTEVIELLE: Changed savegames to use the game target to generate filenames 2013-07-13 19:10:03 -04:00
Strangerke
3f60cd79fe MORTEVIELLE: More renaming 2012-10-14 21:59:27 +02:00
Strangerke
ad3c7febd7 MORTEVIELLE: Some more renaming 2012-10-14 10:28:03 +02:00
Strangerke
b27b77b354 MORTEVIELLE: Modify copyright string to include 1987. 2012-04-06 08:24:07 +02:00
Strangerke
1619441215 MORTEVIELLE: Remove var_mor 2012-04-06 08:24:00 +02:00
Strangerke
cdea613e51 MORTEVIELLE: Remove trailing spaces 2012-04-06 08:23:56 +02:00
Strangerke
7b94de6408 MORTEVIELLE: Get rid of mor.cpp 2012-04-06 08:23:48 +02:00
Strangerke
a87b992e8d MORTEVIELLE: Move functions out of mor.cpp 2012-04-06 08:23:46 +02:00
Strangerke
09e8c82e8f MORTEVIELLE: More renaming 2012-04-06 08:23:42 +02:00
Strangerke
1a9183e0ba MORTEVIELLE: More renaming 2012-04-06 08:23:40 +02:00
Strangerke
c1e8ff3ada MORTEVIELLE: Rename more globals and move functions to MortevielleEngine. Remove ovd1 files. 2012-04-06 08:23:38 +02:00
Strangerke
76f7858096 MORTEVIELLE: More renaming 2012-04-06 08:23:36 +02:00
Strangerke
1c283507ee MORTEVIELLE: Some more renaming, introduce MouseHandler 2012-04-06 08:23:30 +02:00
Strangerke
fc14ffbcb5 MORTEVIELLE: Some more renaming 2012-04-06 08:23:28 +02:00
Strangerke
fb096b135b MORTEVIELLE: Some more renaming 2012-04-06 08:23:25 +02:00
Strangerke
01e899b965 MORTEVIELLE: Remove some useless g_vm uses, some more renaming 2012-04-06 08:23:23 +02:00
Strangerke
0919546917 MORTEVIELLE: Some more renaming 2012-04-06 08:23:21 +02:00
Strangerke
0f37695385 MORTEVIELLE: More renaming and moving 2012-04-06 08:23:17 +02:00
Strangerke
b5d2fa7e5f MORTEVIELLE: Merge prog and mor files 2012-04-06 08:23:08 +02:00
Strangerke
79dd918033 MORTEVIELLE: regroup several files 2012-04-06 08:23:06 +02:00
Strangerke
6217fa5e3e MORTEVIELLE: some more renaming, match menu item size in setText() 2012-04-06 08:22:54 +02:00
Strangerke
1ee4429601 MORTEVIELLE: Rename some more functions and globals 2012-04-06 08:22:40 +02:00
Strangerke
5739256412 MORTEVIELLE: rename several globals 2012-04-06 08:22:39 +02:00
Strangerke
e92369be21 MORTEVIELLE: Rename some variables and functions related to 'Search' action 2012-04-06 08:22:32 +02:00
Strangerke
b2b16cefce MORTEVIELLE: rename more globals and constants, remove t_nhom usage 2012-04-06 08:22:26 +02:00
Strangerke
1a70cee6a6 MORTEVIELLE: Silent a bunch of GCC warnings and errors 2012-04-06 08:22:23 +02:00
Strangerke
a54dfa4845 MORTEVIELLE: Some more code formatting, rename sonoff 2012-04-06 08:21:40 +02:00
Strangerke
d868681976 MORTEVIELLE: Rename mouse functions, various formatting fixes 2012-04-06 08:21:32 +02:00
Paul Gilbert
d738576f1c MORTEVIELLE: Convert f3/f8 dialog, alert dialog, and ques dialogs into classes 2012-04-06 08:21:23 +02:00
Paul Gilbert
231315420b MORTEVIELLE: Renamed main loop methods, along with quit/end/lose variables 2012-04-06 08:20:56 +02:00
Paul Gilbert
bae25fc2aa MORTEVIELLE: Implemented ScummVM savegame functionality with metadata 2012-04-06 08:20:55 +02:00