Commit Graph
31 Commits
Author SHA1 Message Date
Adrian Frühwirth 03312fba61 CGE2: Add play time metadata to savegames 2018-05-05 22:19:03 +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
Ori Avtalion 3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Filippos Karapetis c76c72c799 CGE2: Remove trailing whitespace 2014-10-28 16:06:07 +02:00
unknown 5c8129a1dd CGE2: Refactor _startupMode. 2014-09-07 11:01:23 +02:00
uruk 854849f57a CGE2: Get rid of detection.h, move things to detection.cpp. 2014-08-11 15:28:43 +02:00
uruk 0ea1268940 CGE2: Fix canSaveGameStateCurrently(). 2014-08-09 17:22:19 +02:00
uruk 010a806a19 CGE2: Rework canSaveGameStateCurrently(). 2014-08-03 22:50:16 +02:00
uruk 11d2cf66b6 CGE2: Rework the handling of the sound buttons on the toolbar.
Also keep in sync the volume settings and the audio mode of the game and the settings in the Launcher.
2014-08-03 22:23:55 +02:00
uruk 7dfb2b01f1 CGE2: Rearrange content of saveload.cpp and cge2.h a bit. 2014-08-03 15:04:00 +02:00
uruk 60a77ae6d7 CGE2: Add autosave functionality. 2014-08-03 14:46:11 +02:00
uruk 06144cee4b CGE2: Remove dummies from save header and change save checksum.
The old saves are broken by our new FXP implementation anyway.
2014-07-30 09:05:07 +02:00
uruk e5139cdd9c CGE2: Fix loading during gameplay. 2014-07-29 20:59:29 +02:00
uruk 0b8a727a0e CGE2: Repair computation of save checksum. 2014-07-29 18:42:00 +02:00
uruk 4e32736e44 CGE2: Prevent the engine from entering an endless loop when loading.
Also remove CommandHandler::reset(), since it's not useful anymore.
2014-07-29 16:41:56 +02:00
uruk b33653000d CGE2: Fix saving of moving heroes. 2014-07-29 16:13:29 +02:00
uruk 6e00d80b4b CGE2: Implement Vga::rotate(). 2014-07-29 11:52:57 +02:00
uruk 5016e09acf CGE2: Don't bother with saving/loading sound options.
We always get them for the setting of the Launcher.
2014-07-29 09:06:14 +02:00
uruk d95a4c5f72 CGE2: Get rid of _flag. 2014-07-29 09:05:41 +02:00
uruk db6cab7a6f CGE2: Repair loading from savestate. 2014-07-28 20:40:42 +02:00
uruk 3c0665edfa CGE2: Rework loadUser().
Now initToolbar() works as intended both when starting a new game or when loading an old gamestate.
2014-07-25 19:20:50 +02:00
uruk 24cc8a8762 CGE2: Implement checkSaySwitch() and add/fix connected code. 2014-07-24 18:11:10 +02:00
uruk 755fedcceb CGE2: Set speech only/text only/both modes according to Launcher options. 2014-07-24 16:50:36 +02:00
uruk 6e26422468 CGE2: Rework loading of sprites from file.
Now it satisfies the needs described in the last commit's TODO comment.
2014-07-21 19:57:33 +02:00
uruk e15f40978a CGE2: Implement loading from the Launcher. 2014-07-04 19:07:38 +02:00
uruk 8b8216bf2c CGE2: Fully implement the save/load system.
Now the toolbar is working too after loading.
2014-07-04 18:39:03 +02:00
uruk ddf4f4598d CGE2: Rename saveHeroPos() to storeHeroPos(). 2014-07-04 13:01:29 +02:00
uruk 927be46c87 CGE2: Remove unnecessary parameter from Spare::sync(). 2014-07-04 13:01:28 +02:00
uruk f155546ecb CGE2: Partially working save/load system.
There's a mayor bug which blocks the toolbar from interaction after loading. To be investigated during the upcoming days.
2014-07-04 13:01:28 +02:00
uruk ade740de10 CGE2: Implement saving. 2014-06-29 22:52:03 +02:00
uruk 38a59bee3e CGE2: Add skeleton for save/load system.
Also rename loadGame() to loadHeroes().
2014-06-29 20:36:54 +02:00