118 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
Strangerke
f4472d2f0a DM: Fix GCC warnings 2017-01-31 18:15:31 +01:00
Strangerke
7c138231e0 DM: Handle demo dungeon file 2016-10-11 21:44:01 +02:00
Strangerke
fd8082593e DM: Janitorial - remove trailing spaces 2016-09-20 22:31:28 +02:00
Strangerke
706b1b27a4 DM: Fix 2 GCC warnings, some renaming 2016-09-19 21:52:37 +02:00
Strangerke
67f95ce50d DM: Some more renaming 2016-09-19 07:58:42 +02:00
Strangerke
1670cb035f DM: Change the definition of setMapAndTime, move SoundIndex enum to SoundMan 2016-09-19 07:06:55 +02:00
Strangerke
8bdabc16bd DM: Rename some more enums 2016-09-18 22:16:52 +02:00
Strangerke
0750c20fe7 DM: rename members of DescriptionMask, PanelContent, CreatureSize, CreatureMask 2016-09-18 11:46:53 +02:00
Strangerke
421d47db85 DM: Fix some more non-MSVC warnings, remove a useless variable 2016-09-16 23:15:27 +02:00
Strangerke
f9d28464ea DM: Get rif od SquareType, rename SquareMask 2016-09-13 07:47:47 +02:00
Strangerke
2f311a800f DM: Get rid of getBoundedValue, replace it by CLIP 2016-09-11 11:10:22 +02:00
Strangerke
b17f3490f8 DM: Rework functions related to Directions in order to make them consistent and remove redundancy 2016-09-11 10:45:20 +02:00
Strangerke
f0a6f6b269 DM: Make some functions private, move 2 functions to more specific classes 2016-09-11 10:27:29 +02:00
Strangerke
f90bf31bea DM: Move some globals to DMEngine 2016-09-11 09:46:35 +02:00
Strangerke
34d636d72e DM Rename enum members in dm.h and dialog.h 2016-09-11 00:34:44 +02:00
Strangerke
fbe9c92ce1 DM: Fix the style used for some pointers and casts 2016-09-03 14:20:13 +02:00
Bendegúz Nagy
cb8fca46c5 DM: Fix include headers
Add DM_ prefix
Add missing include guards
2016-09-03 10:47:16 +02:00
Bendegúz Nagy
cd3b485952 DM: Clean up includes
Swap <> to "" with scummvm files
Add dm/ prefix to dm files
Reorder includes to system files, dm files
2016-09-03 10:38:43 +02:00
Strangerke
361722d459 DM: More renaming in DungeonMan, move some arrays 2016-08-27 23:10:13 +02:00
Strangerke
1e2fa9630f DM: Rework fuseSequence 2016-08-27 14:20:06 +02:00
Strangerke
5ca6975665 DM: Remove custom warning function 2016-08-27 11:07:49 +02:00
Bendegúz Nagy
36e6eac2f3 DM: Fix GCC errors in detection.cpp 2016-08-26 23:02:22 +02:00
Strangerke
e728cb706e DM: Rename functions of DMEngine and DialogMan 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
2bdabc3b7a DM: Add target and original platform to save files 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
2ee50eda35 DM: Add proper save header 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
d97a8905cc DM: Remove some warnings 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
ca267da97c DM: Add file error checking for save game 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
6aabe84bf6 DM: Complete f437_STARTEND_drawTittle 2016-08-26 23:02:22 +02:00
Strangerke
b4b76047ff DM: Fix some GCC warnings 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
efac7b5eb0 DM: Add loading from game 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
cefc231968 DM: Make ScummVM's save dialog open up when saving 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
fb14fea014 DM: Make thumbnail capture the dungeon 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
bcb067698e DM: Add support for loading from launcher 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
0eb61d0a7d DM: Pull sound handling into a separate class 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
3fffb08a40 DM: Add missing localization warnings and query function for language 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
fa0009fbb7 DM: Add entrance credits 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
37db95c336 DM: Add DMEngine::f446_STARTEND_fuseSequnce() 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
b46ade6b6c DM: Add DMEngine::f445_STARTEND_fuseSequenceUpdate 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
50453e02bf DM: Add gimme debug command spawning items 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
a5c0a32446 DM: Add debug command .pos 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
50c5b39887 DM: Add debugger console 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
6428110da8 DM: Fix dungon not drawn behind entrance doors 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
7570844f5e DM: Fill stub method f438_STARTEND_OpenEntranceDoors 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
233f93fefe DM: Swap some warnings to stub methods
Stub methods: f362_commandHighlightBoxEnable, f442_SARTEND_processCommand202_entranceDrawCredits, f437_STARTEND_drawTittle
2016-08-26 23:02:22 +02:00
Bendegúz Nagy
79c0a0adc9 DM: Add f064_SOUND_RequestPlay_CPSD, f65_playPendingSound, f505_soundGetVolume 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
a387f45d57 DM: Add f60_playSound 2016-08-26 23:02:22 +02:00
Strangerke
f0e037e305 DM: Some renaming, add a couple of STUBS 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
22d6973de5 DM: Add sound loading 2016-08-26 23:02:22 +02:00
Bendegúz Nagy
2b2a028332 DM: Add f444_endGame and checks for Common::EVENT_QUIT 2016-08-26 23:02:22 +02:00