Commit Graph

19 Commits

Author SHA1 Message Date
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko
6fa8c6df62 PRINCE: Do not crash on non-existent save 2020-03-10 22:19:21 +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
Paul Gilbert
a00e44ba6c ENGINES: Merge saveGameState virtual methods into a single one 2020-02-16 15:44:28 -08:00
Adrian Frühwirth
589f0f8750 PRINCE: Use ScummVM save/load dialogs
The original option dialogs do not seem to be implemented yet so we
always show the ScummVM ones when using the save/load hotkeys for now.

This partly fixes Trac#9866.
2018-05-06 02:26:28 +02:00
Adrian Frühwirth
13a08a0bb0 PRINCE: Add play time metadata to savegames 2018-05-06 00:00:38 +02:00
Adrian Frühwirth
f5c45e5ca4 PRINCE: Removed unused kBadSVG 2018-05-06 00:00:38 +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
Eugene Sandulenko
c8dca57555 PRINCE: Refactored detection code into widely accepted schema 2016-10-21 10:32:48 +02:00
Eugene Sandulenko
fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
Eugene Sandulenko
044f8b2063 PRINCE: Use # as savefile matching pattern 2016-06-08 10:16:18 +02:00
lukaslw
cb01dd36b6 PRINCE: canLoadGameStateCurrently() - to check if loading is allowed
Also block saving during dialogbox and inventory drawing
2014-11-09 02:42:48 +01:00
lukaslw
d5938d2520 PRINCE: canSaveGameStateCurrently() - check conditions when you can't save the game state 2014-11-09 02:15:56 +01:00
Filippos Karapetis
0f0ca25e43 PRINCE: Remove trailing whitespace 2014-10-28 16:21:53 +02:00
lukaslw
d100597ce9 PRINCE: Inventory after swaping and loading fix 2014-08-04 21:56:36 +02:00
lukaslw
34c977574e PRINCE: Cursor after loading fix 2014-08-02 16:20:49 +02:00
lukaslw
3c29d61f67 PRINCE: Code clean-up 2014-08-01 17:38:04 +02:00
lukaslw
4a022e77f7 PRINCE: syncGame() fix 2014-07-29 04:10:19 +02:00
lukaslw
08d781b6ad PRINCE: Game saving - basic implementation 2014-07-29 02:25:42 +02:00