Commit Graph
80 Commits
Author SHA1 Message Date
Adrian Frühwirth 057fb9bc6e CGE: 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
Eugene Sandulenko 33abb6118f ALL: Change main engine header guard defines to <directory>_<engine>_H
Recently we started to use this as new semantics, although in the past
we used simly <engine>_H. Now these guard defines are consistent with
rest of the files which are used in the engines.
2016-05-17 18:21:30 +02:00
uruk b429e746a7 CGE2: Remove detection of Sfinx from CGE1. 2014-04-25 17:34:38 +02:00
Strangerke 8f41fc10b2 CGE: Remove a useless structure member, reduce a variable scope 2014-03-15 11:31:43 +01:00
Strangerke 0a9b8978ee CGE: Remove a useless variable, remove some associated dead code 2014-03-15 11:19:21 +01:00
Johannes Schickel ed40653105 CGE: Make GPL headers consistent in themselves. 2014-02-18 02:39:33 +01:00
Strangerke 5e0e672283 CGE: Fix warning in detection
Thanks clone2727 for reporting it
2013-05-26 22:39:18 +02:00
Strangerke 0d50c67a3e CGE: Introduce gametype 2013-05-19 22:52:09 +02:00
Strangerke d73ed91051 CGE: Remove unused Demo text id 2012-06-28 07:25:56 +02:00
Strangerke 647bc59f99 CGE: Rename variable 2012-06-28 07:19:54 +02:00
Strangerke ee14ef5348 CGE: Add ending message to tell the user he finished the game. Fix bug #3538396 2012-06-27 22:12:37 +02:00
Max Horn 4202d45fce CGE: Avoid including advancedDetector.h from cge.h 2012-02-22 18:25:37 +01:00
Strangerke f3884d1a98 CGE: Better handling of the wide 'space' character 2011-12-05 20:59:51 +01:00
Strangerke b3c9b51e46 CGE: Add to the console a function to display boundaries 2011-11-28 18:54:01 +01:00
Strangerke 3d59d9a137 CGE: Add RTL, hook Main Menu to right click on audio button 2011-11-16 00:00:07 +01:00
Strangerke 2d882fdf18 CGE: Rename Snail into CommandHandler, plus some associated renamings 2011-09-18 11:25:34 +02:00
Strangerke d574cfe272 CGE: Move _talk and _text to CGEEngine 2011-09-17 17:27:05 +02:00
Strangerke 3583c949f2 CGE: Move some more globals to CGEEngine 2011-09-17 17:17:22 +02:00
Strangerke 8491e557ce CGE: Remove duplicated forward declaration 2011-09-17 14:55:31 +02:00
Strangerke 38deee5a88 CGE: some more cleanup 2011-09-17 11:09:32 +02:00
Strangerke 4778ff720c CGE: Move some more globals to CGEEngine 2011-09-17 10:54:50 +02:00
Strangerke f5eca79658 CGE: Move 4 global to CGEEngine 2011-09-17 10:08:52 +02:00
Strangerke 0668a56f69 CGE: Move _vga to CGEEngine 2011-09-16 23:54:08 +02:00
Strangerke 938c08ae58 CGE: Get rid of some more global functions and static members 2011-09-16 20:31:39 +02:00
Strangerke 15bf8050b8 CGE: Move two globals functions to CGEEngine 2011-09-16 06:45:53 +02:00
Strangerke c993108207 CGE: Transform some static and globals into class members 2011-09-15 08:00:54 +02:00
Strangerke d28ac81a12 CGE: Rename cave into scene 2011-09-14 08:15:30 +02:00
Strangerke dd0e077bd7 CGE: Remove useless function 2011-09-14 00:21:10 +02:00
Strangerke 45de8747d5 CGE: Clean up and split snBarrier(), remove progName() 2011-09-07 22:37:03 +02:00
Strangerke 52f669c93c CGE: Replace Hxy by Common::Point 2011-09-06 23:14:49 +02:00
Strangerke 39d09d5865 CGE: Cleanup: remove residuals of the demo code
Thanks to fingolfin and LordHoto for pointing it out
2011-09-06 22:59:10 +02:00
Strangerke e46c613e9a CGE: Remove 'count' static variable from snail
Thanks LordHoto for pointing it out
2011-09-06 19:56:47 +02:00
Strangerke 5bad1a7c7f CGE: Take into account some of LordHoto's comments 2011-09-06 00:43:40 +02:00
Strangerke 56e57cf380 CGE: Remove two useless callback types 2011-09-04 11:23:01 +02:00
Strangerke 31d4173136 CGE: Fix thumbnails display when a game is loaded. 2011-09-01 00:22:20 +02:00
Strangerke 5e0c546aa9 CGE: Remove code related to demos, and tag demos as unsupported 2011-08-29 22:51:45 +02:00
Strangerke 4d059c0e62 CGE: Remove user first name input, used originally for savegame names 2011-08-27 14:05:04 +02:00
Strangerke 81ae309d5f CGE: Suppress some debug code present in the original 2011-08-20 01:35:56 +02:00
Alyssa Milburn f0889d3f54 CGE: Remove unused snSelect function, and broken config.cpp. 2011-08-19 16:02:50 +02:00
Paul Gilbert ef7a17a64a CGE: Fix for HLINE not being available for demo
The HorizLine class is really only used for on-screen debugging information anyway, so it's not a problem.
2011-08-13 16:44:48 +10:00
Paul Gilbert b76c0af2f4 CGE: Work on implementing MIDI music playback.
Music playback is now sort of working, but it seems like only a beat track of the MIDI is getting played
2011-08-12 21:33:45 +10:00
Paul Gilbert 0c33687de2 CGE: Further fixes to savegames. 2011-08-10 20:41:39 +10:00
Strangerke de40ab5e0a CGE: Remove JBW flag (useless) 2011-08-07 11:36:49 +02:00
Paul Gilbert 1208e7e5af CGE: Removed the _mini data block originally used to hold inventory shapes in high memory 2011-08-06 21:03:24 +10:00
Paul Gilbert 46e1f03585 CGE: Fixed up freeing of caveValues data 2011-08-06 20:03:42 +10:00
Strangerke 6f92cdd0d0 CGE: Rename some more defines 2011-08-02 21:47:56 +02:00
Strangerke 55df4d0635 CGE: Rename some class members, various clean up 2011-07-31 00:52:35 +02:00
Strangerke b53ffa8f2c CGE: Move some conditional defines to variables 2011-07-30 15:43:49 +02:00
Strangerke 5c7eb9a768 CGE: un-static-fy several variables, clean Heart class 2011-07-30 12:52:04 +02:00