38 Commits

Author SHA1 Message Date
Paul Gilbert
9f175c4053 ENGINES: Cleanup of savegame filenames generation
This removes filename methods when it matched the Engine method.
Secondly, ensuring there was an overriden getSaveStateName method
for engines that didn't do the standard target.00x save filenames
2020-02-16 15:44:28 -08: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
Paul Gilbert
13f74027e8 TSAGE: Fix loading savegames with unreferenced dynamic objects 2017-11-21 21:05:40 -05:00
Paul Gilbert
077250acfb TSAGE: Changed engine to use Graphics::ManagedSurface 2016-03-14 20:56:28 -04: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
56cd7d4962 TSAGE: Fix CID 1002371, 1002372, 1002373. Remove useless variable and associated code. 2013-10-27 00:44:28 +02:00
Paul Gilbert
9df846afc3 TSAGE: Bugfixes for R2R space scenes to be full screen 2013-10-09 20:38:04 -04:00
Johannes Schickel
9d8939f42d TSAGE: Take advantage of Surface::getPixels. 2013-08-03 04:02:53 +02:00
Johannes Schickel
ae7bc4dcf0 TSAGE: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:34 +02:00
D G Turner
b704e40bae TSAGE: Close memory leak in savegame thumbnail. 2011-12-31 00:28:27 +00:00
Paul Gilbert
e8aa812608 TSAGE: Added explicit freeing of thumbnail surface pixels 2011-11-21 19:38:32 +11:00
Paul Gilbert
3a372991ee TSAGE: Show an explicit error message when saving or loading savegames fails 2011-10-13 22:01:58 +11:00
Paul Gilbert
f99e904f9a TSAGE: Added 'g' prefix to global variables 2011-10-02 19:59:13 +11: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
Christoph Mallon
e35b4f20c1 GRAPHICS: Simplify the interface of Graphics::loadThumbnail().
Now it returns the Surface, so the caller does not need to create one and pass it.
2011-08-07 15:19:09 +02: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
eb89240370 TSAGE: Add extra event manager fields to savegames
This should correctly handle re-enabling the cursor when restoring savegames.
2011-06-04 22:40:51 +10:00
Max Horn
7e5113b423 TSAGE: Silence another (incorrect but still annoying) uninitialized var warning 2011-05-25 16:35:09 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Paul Gilbert
82dd68093a TSAGE: Don't show cursor after restoring a game if a cut-scene is now active 2011-05-11 23:06:10 +10:00
Paul Gilbert
bfc9414487 TSAGE: Bugfix to show cursor after restoring a savegame 2011-05-11 21:58:11 +10: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
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Paul Gilbert
1651ac8ca2 TSAGE: Proper bugfix for problem saving/restoring game in Scene #5000 and others 2011-04-28 20:41:00 +10:00
md5
a38377c226 TSAGE: Fixed assert after loading a game in scene 5000 and changing scene 2011-04-28 00:20:01 +03:00
md5
c76502fe11 TSAGE: Added temporary fix for some saved games (e.g. scenes 4050 and 5000) 2011-04-27 23:52:20 +03:00
Johannes Schickel
10b0294c94 TSAGE: Suppress empty format string warning of g++. 2011-04-19 17:04:05 +02:00
Paul Gilbert
b7c9bf4b33 TSAGE: Simplified the new Saver::getObjectCount method 2011-04-19 21:33:56 +10: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
Paul Gilbert
cec59bd124 TSAGE: Fix palette corruption in savegame files. 2011-04-18 20:45:42 +10: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
7042d95cfe TSAGE: Added the engine in a separate branch 2011-02-14 20:37:27 +11:00