Commit Graph
43 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
Johannes Schickel 0b6befdcc5 ENGINES: Make variable names of AdvancedMetaEngine conform to our guidelines.
_singleid   -> _singleId
_gameids    -> _gameIds
_guioptions -> _guiOptions
2016-03-08 19:01:13 +01:00
Johannes Schickel 525e5edd30 TEENAGENT: Let listSaves return list sorted on slot numbers. 2016-02-25 21:39:45 +01:00
Johannes Schickel 73286d94c1 TEENAGENT: Only request actual save slots in listSaves. 2016-01-26 16:35:30 +01:00
Johannes Schickel 47b6111033 TEENAGENT: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Johannes Schickel 859536dd3a TEENAGENT: Indent REGISTER_PLUGIN_* for consistency. 2014-02-17 23:02:38 +01:00
Matthew Hoops 0031c41db8 COMMON: Change kPlatformPC to kPlatformDOS
"PC" was very ambiguous and now it matches what we show in the GUI.

This also corrects sword2's platform to Windows.
2013-05-02 18:43:10 -04:00
D G Turner d7dcbb2c2d TEENAGENT: Further symbol migration associated with saveStates. 2012-07-16 15:09:34 +01:00
D G Turner efb1d96d98 TEENAGENT: Fix erroneous files in savegame listing.
This was achieved by making the detection pattern stricter to avoid
matching the dat file or other extraneous files in the savegame path.

This fixes bug #3539774 "TEENAGENT : teenagent.dat considered as a
savegame".

Also did some minor formatting and string function usage cleanup.
2012-07-04 02:13:40 +01:00
Johannes Schickel 72e1e5a31c TEENAGENT: Slight cleanup in querySaveMetaInfos. 2012-07-03 18:39:50 +02:00
Strangerke bab4b6f729 LAUNCHER: Introduce GUIO0() in order to replace GUIO1(GUIO_NONE) 2011-11-16 22:38:58 +01:00
Eugene Sandulenko 32972a5ffb AD: Switched rest of the engines to new GUIO 2011-10-23 17:53:13 +01:00
Johannes Schickel 8a7f3e69ff TEENAGENT: Improve code formatting.
I used astyle and fixed some incorrect changes from it manually.
2011-10-23 02:07:23 +02: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
Max Horn 879c3c7817 DETECTOR: Pass allFiles to AdvancedMetaEngine::fallbackDetect()
Also reorder the parameters of composeFileHashMap, placing the "return value"
first.
2011-06-14 18:52:11 +02:00
Max Horn 7c992d6598 DETECTOR: Merge ADParams into AdvancedMetaEngine 2011-06-14 18:17:01 +02:00
Max Horn fc555635cf TEENAGENT: Switch to alternate AdvancedMetaEngine, avoid ADParams 2011-06-10 22:15:45 +02:00
Max Horn 4827cc914a ENGINES: Change incorrect use of 'target' to 'gameid' 2011-06-10 22:15:40 +02:00
Thierry Crozat d2a55b42c9 ENGINES: Further unify engine names 2011-05-22 12:47:35 +01:00
Thierry Crozat 3c59e37035 ENGINES: Unify engine names
This unifies the engine names in MetaEngine::getName() and the
credits. In particular drop "Engine" or "engine" from the names when
it was present and use expanded names in credits when the
MetaEngine uses it (e.g. "Beneath a Steel Sky" instead of "BASS").
2011-05-16 00:11:32 +01:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn 18d40017e8 ENGINES: Unify code layout of all ADParams instances
svn-id: r54105
2010-11-07 01:01:18 +00:00
Max Horn e27b05ef35 COMMON: Rename String::printf() to String::format()
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.

The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.

svn-id: r54004
2010-11-01 16:02:28 +00:00
Eugene Sandulenko 44a39ffbc6 AdvancedDetector: Add new parameter directoryGlobs.
Without this parameter mass detection gave tons of false alarms.
Use globbing for narrowing down the depth search.

svn-id: r49788
2010-06-15 10:59:23 +00:00
Eugene Sandulenko 4d517ed0e9 Extended advancedDetector with depth parameter.
Now AD can search nested directories. By default it is turned off,
but there is new parameter to ADParameters struct. Usually value
of 2 is good enough for all purposes.

svn-id: r49653
2010-06-14 14:50:23 +00:00
Vladimir Menshakov cb17e00f0d added cd-version detection and cdlogo.res support
svn-id: r48831
2010-04-28 19:50:28 +00:00
Vladimir Menshakov 6e628f59dc removed local scopedptr
svn-id: r48335
2010-03-20 20:03:58 +00:00
Vladimir Menshakov 3c884abfa6 textual cleanups
svn-id: r48333
2010-03-20 19:48:21 +00:00
Vladimir Menshakov 7666cac789 removed auto_ptr semantics in a favor of boost's scoped_ptr
svn-id: r48329
2010-03-20 17:06:18 +00:00
Vladimir Menshakov f122762309 fixed file leak, cleanups
svn-id: r48319
2010-03-20 14:53:46 +00:00
Max Horn cac0ac66e2 COMMON: Get rid of Common::StringList
svn-id: r48287
2010-03-18 15:54:40 +00:00
Johannes Schickel aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Vladimir Menshakov 09a197d125 added unlogic logo
svn-id: r46903
2010-01-02 22:30:43 +00:00
Johannes Schickel c439937d46 Consistency change: Use uniform copyright strings in getOriginalCopyright.
svn-id: r46543
2009-12-25 03:31:19 +00:00
Vladimir Menshakov 343bd3fb4d added thumbnails for the save states. removed snprintf's.
svn-id: r45219
2009-10-18 12:13:58 +00:00
Vladimir Menshakov 28e09b9292 capitalized game title
svn-id: r44102
2009-09-15 10:36:50 +00:00
Max Horn a8e5df433f TEEN: More code formatting & whitespace changes (automatically generated with astyle)
svn-id: r44101
2009-09-15 08:54:06 +00:00
Vladimir Menshakov 622c4684fe removed magic exe offsets, added teenagent.dat support.
svn-id: r43954
2009-09-05 08:16:35 +00:00
Max Horn 088c5dada3 TEEN:
* don't use "using namespace", instead put stuff into its correct namespace
* when using #include, always prefix engine header files with the engine name
* some cleanup

svn-id: r43945
2009-09-04 20:08:33 +00:00
Vladimir Menshakov 7923fdbe3f fixed invalid hash sum
svn-id: r43930
2009-09-03 22:45:55 +00:00
Vladimir Menshakov 39e3c2c096 added detection structures with exe offsets.
svn-id: r43929
2009-09-03 22:42:12 +00:00
Vladimir Menshakov 3c8cdcae2f fixed engines order, added svn:keywords properties.
svn-id: r43925
2009-09-03 21:20:13 +00:00
Vladimir Menshakov ebe1b94eb1 imported teenagent engine sources.
svn-id: r43922
2009-09-03 20:59:17 +00:00