Commit Graph
38 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
Paul Gilbert 13f74027e8 TSAGE: Fix loading savegames with unreferenced dynamic objects 2017-11-21 21:05:40 -05:00
Strangerke dc2094f7a6 TSAGE: Rename savegame header members 2014-03-07 14:21:46 +01:00
Johannes Schickel 6e715e186a TSAGE: Make GPL headers consistent with themselves. 2014-02-18 02:39:39 +01:00
Strangerke 5e35729ee8 TSAGE: Some renaming, remove some useless variables from Core, increase savegame version 2013-12-20 07:11:09 +01:00
Strangerke 0948d06845 TSAGE: Remove 3 useless variable from Scene, increment savegame version 2013-12-19 08:00:25 +01:00
Strangerke 33eb71a712 TSAGE: R2R - Renaming in scene 3600 2013-12-18 23:57:24 +01:00
Strangerke c211cede06 TSAGE: BF - Remove some useless variables, some renaming 2013-11-26 08:18:45 +01:00
Strangerke aee4004b1d TSAGE: Increase savegame version in order to properly skip the useless variables 2013-11-02 12:14:09 +01:00
Strangerke 56cd7d4962 TSAGE: Fix CID 1002371, 1002372, 1002373. Remove useless variable and associated code. 2013-10-27 00:44:28 +02:00
Paul Gilbert e17095df2e TSAGE: Bugfixes for R2R drive room, and work on scanner modal dialog 2013-07-16 09:19:19 -04:00
Strangerke b59b703f72 TSAGE: BF - Fix for bug #3467502, crash when loading in map scene 2011-12-31 11:27:14 +01:00
Strangerke e67ab21b5f TSAGE: BF - Cleanup: Remove _uselessVariable in scene 360 2011-11-09 08:30:52 +01:00
Paul Gilbert 44e4e16819 TSAGE: Implemented walk regions enabling/disabling for Blue Force 2011-10-27 19:32:27 +11:00
Paul Gilbert f99e904f9a TSAGE: Added 'g' prefix to global variables 2011-10-02 19:59:13 +11:00
Paul Gilbert 546eeb2c43 TSAGE: Moved the _bgSceneObjects list from SceneManager to Scene.
This fixes a problem with Blue Force savegames in that they were being
loaded too early, and being destroyed as the game scene was then loaded.
2011-09-25 09:59:24 +10:00
Paul Gilbert 21fd6a2e90 TSAGE: Further bugfix for SynchronizedList template changes 2011-08-26 19:42:22 +10:00
Paul Gilbert 31a7f64968 TSAGE: Hopeful bugfix for compilation errors on other systems 2011-08-26 19:19:29 +10:00
Paul Gilbert 734e4f628b TSAGE: Implemented lots more Blue Force functionality, and started on first in-game scene 2011-08-26 19:07:43 +10:00
Paul Gilbert 697230709b TSAGE: Corrected casing of tSage namespace to be TsAGE
This matches the casing of the original engine name.
2011-08-15 20:47:59 +10:00
Paul Gilbert 160a8d96d9 TSAGE: Fixed problem with saving double values 2011-07-02 13:49:27 +10:00
Paul Gilbert 97137e6b27 TSAGE: Added saving/restoring of playing sounds to savegames 2011-06-23 20:11:51 +10:00
Paul Gilbert dc6e60f516 TSAGE: Add support for saving in scene #6100 2011-06-04 20:40:09 +10:00
Strangerke d0f721b728 TSAGE: Add proper colors to buttons in the CD version of ringworld 2011-06-03 15:02:59 +02:00
Paul Gilbert 38d787676f TSAGE: Fixed saving problem and talking to Seeker in Scene #50 2011-05-15 21:56:07 +10:00
Max Horn aaf2c0e6eb TSAGE: Fix warning when compiling in release mode 2011-05-13 11:47:13 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5 340d08bc30 TSAGE: Some more conversions to US English 2011-05-04 11:47:12 +03:00
md5 3430a3f347 TSAGE: Switched to American English, after the relevant discussion on -devel:
serialiser -> serializer
synchronise -> synchronize
2011-05-04 11:41:47 +03:00
md5 5c3b564e0b TSAGE: Now initializing the save game version properly 2011-05-04 11:36:35 +03:00
md5 7b8f3021ac TSAGE: Bumped up savegame version, so that the old savegames are still usable
Savegames from revisions bf9b98f and 4f70162d are now version 2 savegames
2011-05-04 10:52:36 +03:00
Paul Gilbert 5dcfd1e32c TSAGE: Reworked the saving code to fix crashes
Note that this undoes the recent compilation fix for GCC, since it didn't work. For now, used an explicit void ** conversion as previously suggested.
2011-04-19 21:02:27 +10:00
dhewg 9363e19667 TSAGE: Suppress strict-alias warnings on older GCCs 2011-04-17 12:31:59 +02:00
strangerke 66b43f2312 TSAGE: "Cosmetic" cleanups 2011-04-13 21:27:46 +02:00
Johannes Schickel 6db40e0c6c TSAGE: Cleanup custom List usage.
This makes the code use Common::List for all cases where synchronization can
not be done with tSage::List::synchronise. Furthermore I renamed the custom
List class to SynchronisedList to stress its purpose.

I also removed clear2, contains and forEach and replaced them with algorithm
usage from Common:: or in the case of "contains" replaced them with a simple
inline function which uses Common::find.
2011-04-13 18:26:12 +02:00
Paul Gilbert 7a5b633bf9 TSAGE: Added proper cursor showing when the scene changes 2011-02-23 22:16:02 +11:00
Alex Bevilacqua 75c99ac175 TSAGE: fix tokenization issue in SYNC_ENUM in GCC
This needs to be tested in MSVC to ensure it doesn't now break Windows
builds with a different error ;)
2011-02-16 14:58:22 -05:00
Paul Gilbert 7042d95cfe TSAGE: Added the engine in a separate branch 2011-02-14 20:37:27 +11:00