Commit Graph
113 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 56569c84a1 GNAP: Change two variables to bool, remove two useless variables 2016-05-31 23:03:43 +02:00
Strangerke 52ee33dfa6 GNAP: Make 2 variables local to setDeviceHotspot 2016-05-30 07:15:43 +02:00
Strangerke 8b685a2b1e GNAP: Use an enum value in the declaration of setHotspot 2016-05-25 07:55:35 +02:00
Strangerke 58e77d693b GNAP: Remove original debug code 2016-05-23 00:44:00 +02:00
Strangerke f734291abb GNAP: Implement delayTicks functions, refactor them to share code 2016-05-20 07:47:16 +02:00
Strangerke 97ac77b5f1 GNAP: Compute the thumbnail when opening the device so that it doesn't show the large hand in savegames 2016-05-19 07:06:48 +02:00
Strangerke 3bf35331ab GNAP: Add thumbnails, rewrite partially querySaveMetaInfos.
Gnap's hand and device are in the middle of the screen, there's place for improvement
2016-05-19 00:13:01 +02:00
Strangerke 4faedcdfcb GNAP: Fix some spacing 2016-05-17 22:10:10 +02:00
Strangerke 4c37381a8e GNAP: Add missing stars in header, change include guard name in gnap.h 2016-05-17 22:05:35 +02:00
Strangerke 6358981201 GNAP: USe Common::Point for mouse position, initialize some more variables 2016-05-17 07:09:42 +02:00
Strangerke 52374bfe7b GNAP: Load TTF from the executable (optional) 2016-05-16 20:43:55 +02:00
Strangerke 9c0808237c GNAP: Remove _id from HotSpot structure 2016-05-12 07:59:20 +02:00
Strangerke af1cf151de GNAP: Use Common::Rect for hotspots 2016-05-12 07:53:06 +02:00
Strangerke f467db5ed2 GNAP: Add music when game is paused 2016-05-12 00:33:47 +02:00
Strangerke b21089f81c GNAP: Rename GetSequence enums 2016-05-11 12:12:02 +02:00
Strangerke 33ca09ae12 GNAP: Remove useless redirections, move two more functions 2016-05-10 12:14:54 +02:00
Strangerke a508936349 GNAP: Move Gnap action functions to PlayerGnap 2016-05-10 12:14:54 +02:00
Strangerke 8a725082a5 GNAP: Move more functions to PlayerGnap 2016-05-10 12:14:54 +02:00
Strangerke 951fab4853 GNAP: Move walkTo and walkStep to Character 2016-05-10 12:14:54 +02:00
Strangerke b3bf17a315 GNAP: Use Common::Point with platypusWalkTo 2016-05-10 12:14:53 +02:00
Strangerke 81074f4503 GNAP: use Common::Point for gnapWalkTo 2016-05-10 12:14:53 +02:00
Strangerke 9d2c537beb GNAP: Some more refactoring in Character, some renaming 2016-05-10 12:14:53 +02:00
Strangerke 38a83d1770 GNAP: More character refactoring (WIP) 2016-05-10 12:14:51 +02:00
Strangerke 45f27ea81c GNAP: Even more refactoring related to characters (WIP) 2016-05-10 12:14:50 +02:00
Strangerke 00c544f9f8 GNAP: More refactoring related to characters (WIP) 2016-05-10 12:14:50 +02:00
Strangerke 579ecdabd1 GNAP: More refactoring related to characters (WIP) 2016-05-10 12:14:50 +02:00
Strangerke dda4931ee9 GNAP: Move _actionStatus to the Character class 2016-05-10 12:14:50 +02:00
Strangerke 45bc40166f GNAP: Use a Character for Platypus (WIP) 2016-05-10 12:14:49 +02:00
Strangerke 2e50019c05 GNAP: Introduce Character class - WIP 2016-05-10 12:14:49 +02:00
Strangerke aee3842163 GNAP: Some renaming 2016-05-10 12:14:49 +02:00
Strangerke 25fc9c0a13 GNAP: Janitorial - Remove trailing spaces and tabs 2016-05-10 12:14:47 +02:00
Strangerke 02c8aeae20 GNAP: renaming and grouping of scenes in group 1 2016-05-10 12:14:46 +02:00
Strangerke 28d8a8be7c GNAP: Rename and move two fonctions to Scene 2016-05-10 09:54:21 +02:00
Strangerke ba0c3f2cc3 GNAP: Refactor scene 53 2016-05-10 09:54:21 +02:00
Strangerke 7a66d4b356 GNAP: Refactor scenes 51&52 2016-05-10 09:54:21 +02:00
Strangerke aca5984e2b GNAP: Refactor scene 50 2016-05-10 09:54:21 +02:00
Strangerke 5b0ff520b7 GNAP: Refactor scene 49 2016-05-10 09:54:21 +02:00
Strangerke f58874aa45 GNAP: Refactor scene 46 2016-05-10 09:54:21 +02:00
Strangerke 5246356d44 GNAP: Refactor scene 45 2016-05-10 09:54:21 +02:00
Strangerke 206a18dbfa GNAP: Refactor scene 44 2016-05-10 09:54:21 +02:00
Strangerke 598fb5d876 GNAP: Refactor scene 43 2016-05-10 09:54:21 +02:00
Strangerke 6043c7842b GNAP: Refactor scene 42 2016-05-10 09:54:21 +02:00
Strangerke ad06f53b62 GNAP: Refactor scene 41 2016-05-10 09:54:21 +02:00
Strangerke 01f8cfd8af GNAP: Refactor scene 40 2016-05-10 09:54:21 +02:00
Strangerke f7e7a45f12 GNAP: Refactor scene 39 2016-05-10 09:54:21 +02:00
Strangerke 1095af09a6 GNAP: Refactor scene 38 2016-05-10 09:54:21 +02:00
Strangerke a5d312b23f GNAP: Refactor scenes 32 & 33 2016-05-10 09:54:21 +02:00
Strangerke a8c1fb5727 GNAP: Refactor scene 31 2016-05-10 09:54:21 +02:00
Strangerke 294f1a6557 GNAP: Refactor scene 30 2016-05-10 09:54:21 +02:00