Commit Graph
72 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 76c227b2eb MADS: Refactor camera code 2015-11-24 21:47:53 +01:00
Strangerke 9dc814e03f MADS: Implement some more Camera code 2015-11-16 10:35:52 +01:00
Strangerke ec3a4b994a MADS: Some work on Camera 2015-11-16 00:31:09 +01:00
Strangerke 002a59c540 MADS: Implement syncTimers, add SyncType enum, modify all the calls to syncTimers 2015-11-12 00:52:21 +01:00
Strangerke af7a233d97 MADS: Phantom: Implement scene 310 2015-10-29 03:17:14 +01:00
Strangerke 8422142c74 MADS: Phantom: Implement scene 202 2015-10-25 00:26:05 +02:00
Strangerke 7a6bc4f8cf MADS: Phantom: Implement scene 109 2015-10-19 07:15:42 +02:00
Strangerke 79fbcb96c3 MADS: Add logic for scene 103, some rework on animations 2015-10-15 11:21:31 +02:00
Johannes Schickel 5dd69b4dd1 MADS: Make GPL header consistent with what we normally use. 2015-05-09 15:56:27 +02:00
Filippos Karapetis 19a9c068f9 MADS: Hook up all of the remaining options, and add custom game options 2015-03-15 04:05:06 +02:00
Paul Gilbert d31e602add MADS: Allow Escape key to close game options dialog 2015-02-14 16:54:47 -05:00
Paul Gilbert 92cc2a7bc8 MADS: Create savegame thumbnail from scenes before opening in-game dialogs 2014-06-28 22:40:25 -04:00
Paul Gilbert 17cc86d172 MADS: Refactoring and cleanup of the game startup code 2014-06-06 20:04:46 -04:00
Paul Gilbert 72e7d55d62 MADS: Fixes for recharging durafail batteries 2014-06-01 22:03:02 -04:00
Paul Gilbert c06e330ba8 MADS: Fix displaying multi-line messages in conversation with village girl 2014-05-26 21:25:18 -04:00
Johannes Schickel 6a7cc38c89 MADS: synchronise -> synchronize 2014-05-27 00:58:25 +02:00
Johannes Schickel 9099b36caa MADS: initialise -> initialize. 2014-05-27 00:58:25 +02:00
Strangerke 6d1fc8256f MADS: Some more British -> American English modifications 2014-05-19 20:56:03 +02:00
Strangerke e1a06ae543 MADS: Replace _ongoingGame by the use of quitGame() 2014-05-18 12:34:15 +02:00
Strangerke e7bef9019a MADS: Implement scene 803, add an ongoingGame global flag to exit the multiple game loops 2014-05-18 12:29:48 +02:00
Paul Gilbert 84159c59ef MADS: Savegames are now working 2014-05-03 11:09:28 -04:00
Paul Gilbert b5949010a6 MADS: Implemented more savegame synchronization 2014-05-01 22:36:36 -04:00
Filippos Karapetis 6c9075eb25 MADS: Implement the audio player
This is used for all digital samples, plus voices in talkie versions.
Currently, it's only hooked to the "play_audio" debugger command
2014-04-27 22:56:15 +03:00
Paul Gilbert bb5edf5426 MADS: Implemented more save/load logic 2014-04-26 11:01:21 -04:00
Paul Gilbert bae0a6590a MADS: Implemented savegame header read/writes 2014-04-26 09:08:46 -04:00
Paul Gilbert 0e9e6cda40 MADS: Beginnings of savegame synchronisation 2014-04-22 23:00:41 -04:00
Paul Gilbert 692af23f6f MADS: Create a Globals base class that the games will derive from 2014-04-21 20:50:05 -04:00
Paul Gilbert f0ce06f0e9 MADS: Implemented display of conversation topics 2014-04-20 21:32:29 -04:00
Paul Gilbert 8b2a7525cc MADS: Fix a bunch of GCC warnings 2014-04-12 12:09:29 -04:00
Paul Gilbert a30e78137e MADS: Added method stub for unhandled action method 2014-04-10 22:34:26 -04:00
Paul Gilbert 21a0e38f34 MADS: Resolve some old TODOs 2014-04-08 22:21:45 -04:00
Paul Gilbert 531ebab4da MADS: Added preliminary keyboard handling and keypress process stub 2014-04-08 22:04:43 -04:00
Strangerke 0f476c31ef MADS: Implement scene 210, some cleanup of some other 2xx scenes, add some stubs 2014-04-08 10:26:43 +02:00
Paul Gilbert 7e13f488ab MADS: Implement loading logic for UI background animations 2014-04-07 22:37:22 -04:00
Paul Gilbert 041773705b MADS: Fix/clean up ending of ScreenObjects::check 2014-04-02 20:28:57 -04:00
Paul Gilbert 0c1001fbf4 MADS: Minor variable renaming and remove incorrect variable set in scene loop 2014-04-01 22:50:03 -04:00
Paul Gilbert 89af9dde8c MADS: Implemented message loading/decoding 2014-03-29 22:28:22 -04:00
Paul Gilbert 71b1343adf MADS: Implemented NebularGame::step 2014-03-29 11:18:07 -04:00
Paul Gilbert 6c85572d76 MADS: Initial cleanup of action/player handling 2014-03-27 22:38:28 -04:00
Paul Gilbert 377cbbe77d MADS: Cleanup of game and player fields used during initialization 2014-03-27 21:04:27 -04:00
Paul Gilbert f9e2c1c71f MADS: Cleaned up game initialisation code to use more constants 2014-03-26 09:32:33 -04:00
Paul Gilbert 04cbbb5f0a MADS: Added enums for copy protection result and globals 2014-03-25 23:59:57 -04:00
Strangerke 633da299f6 MADS: Add scene 208 2014-03-25 22:01:25 +01:00
Paul Gilbert 7f4dbf7d48 MADS: Implemented more action handling methods 2014-03-23 18:48:00 -04:00
Paul Gilbert 2b141aaba6 MADS: Fixes for screen objects loading and checking 2014-03-21 09:27:22 -04:00
Paul Gilbert db017b746d MADS: Moved ScreenObjects into the Game class 2014-03-19 19:44:51 -04:00
Paul Gilbert acba8f9254 MADS: Implementing user interface text display methods 2014-03-16 23:40:21 -04:00
Paul Gilbert 10124f6806 MADS: Implemented scene 103 setup and needed support methods 2014-03-15 17:38:44 -04:00
Paul Gilbert 2d99f761f0 MADS: Implemented scene 804 step 2014-03-11 23:26:31 -04:00