Commit Graph

293 Commits

Author SHA1 Message Date
Bastien Bouclet
cf1ebf2951 ENGINES: Add unknown game variants to the game detector results 2018-05-10 09:04:23 +02:00
Adrian Frühwirth
4bf0eac94d TOON: Enforce code formatting guidelines 2018-05-07 20:06:29 +02:00
Adrian Frühwirth
a20f90cbb7 JANITORIAL: Fix formatting 2018-04-22 00:56:21 +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
Colin Snover
51329c0dc6 ALL: Fix misuse of comma operator 2017-11-10 09:57:03 -06:00
Colin Snover
432fd522d2 ENGINES: Remove default1x scaler flag
This flag is removed for a few reasons:

* Engines universally set this flag to true for widths > 320,
  which made it redundant everywhere;
* This flag functioned primarily as a "force 1x scaler" flag,
  since its behaviour was almost completely undocumented and users
  would need to figure out that they'd need an explicit non-default
  scaler set to get a scaler to operate at widths > 320;
* (Most importantly) engines should not be in the business of
  deciding how the backend may choose to render its virtual screen.
  The choice of rendering behaviour belongs to the user, and the
  backend, in that order.

A nearby future commit restores the default1x scaler behaviour in
the SDL backend code for the moment, but in the future it is my
hope that there will be a better configuration UI to allow users
to specify how they want scaling to work for high resolutions.
2017-10-07 12:30:29 -05:00
D G Turner
d2a7c296a2 COMMON: Migrate Various Endian Functions to Common from Engine Code.
Thanks to N.E.C <beholdnec@gmail.com> for this.
2017-07-30 22:03:29 +02:00
Ben Castricum
ebaab44cd1 ALL: Leave out instructions for engine data issues 2016-12-08 13:38:56 +01:00
Ben Castricum
55512414dd ALL: Change instructions for engine data file issues
The engine data files should be included in the package, so downloading
may not be the best suggestion. Instead refer to the README.
2016-12-06 14:16:37 +01:00
Ben Castricum
1cf3f50b74 ALL: Unify 'wrong version of engine data' message 2016-12-06 09:38:25 +01:00
Ben Castricum
eb7ffb1e2c ALL: Unify 'corrupted engine data' message 2016-12-06 09:38:19 +01:00
Ben Castricum
e1ec91b69a ALL: Unify 'missing engine data' message 2016-12-05 21:04:50 +01:00
Ben Castricum
38eb27212d ALL: savegame => saved game 2016-11-29 20:15:13 +01:00
rootfather
74d2992177 TOON: Enable translation for some strings 2016-11-26 14:54:08 +01:00
Eugene Sandulenko
dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Alexander Tkachev
b665fc933d ALL: Make simpleSaveNames() a MetaEngineFeature
Added it into hasFeature() of all engines which returned `true` in
simpleSaveNames() before.

As mentioned in #788, SCI is not always using simple names, so it
doesn't have such feature now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ab1d160ec8 ALL: Add MetaEngine::simpleSaveNames()
Engines with "simple" savenames would support "Run in background" in
save/load dialog and gradual save slots unlocking. Other engines
save/load feature would be locked until save sync is over.
2016-08-24 16:07:55 +06:00
Strangerke
010e676184 TOON: Fix uninitialized variable 2016-06-13 07:13:46 +02:00
Eugene Sandulenko
b53d8104b7 TOON: Plug memory leak 2016-05-31 17:12:18 +02:00
Eugene Sandulenko
29d6e9a754 JANITORIAL: Whitespace fixes 2016-05-31 17:12:18 +02:00
Ori Avtalion
253e18c440 JANITORIAL: Reduce GUI header dependencies 2016-04-14 13:30:14 +03: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
Eugene Sandulenko
23d74fddb4 CONFIGURE: Introduced new engine dependency: highres
Some backends like GCW0 do no support graphics >320x240 due to
the hardware limitation (downscaling is possible but it will ruin
the pixel hunting which is often part of the gameplay).

Instead of manually updating the list of engines, we now introduce
a new dependency.

I marked all relevant engines, but some, like tinsel, require more
work with putting their relevant high-res games under USE_HIGHRES
define.
2016-03-05 14:25:56 +01:00
Johannes Schickel
d7ae0df8e1 TOON: Let listSaves return list sorted on slot numbers. 2016-02-25 21:39:45 +01:00
Thierry Crozat
76e1f36ae9 TOON: Add missing POTFILES 2016-02-20 21:23:40 +00:00
Thierry Crozat
41ff2a9f02 TOON: Translate buttons in load and save dialogs. 2016-02-20 21:08:34 +00:00
Johannes Schickel
eaf590510b TOON: Only request actual save slots in listSaves. 2016-01-26 16:35:30 +01:00
Torbjörn Andersson
404839bda6 TOON: Check for quitting in runEventScript()
This keeps the game from hanging when trying to quit during Jim's
gym demonstration. Hopefully any other effect of it is also good.
2015-05-15 11:13:13 +02:00
sylvaintv
15a4371b2d TOON: Fix bad enum syntax 2015-03-19 22:40:29 +01:00
sylvaintv
e73faeee68 TOON: Add options menu
- Add options menu when pressing F1
- Add in-game font change
2015-03-19 21:42:08 +01:00
Filippos Karapetis
66abcb4829 TOON: Remove trailing whitespace 2014-10-28 16:14:08 +02:00
Strangerke
37b77168ec TOON: Remove some dead code 2014-08-06 20:57:30 +02:00
Strangerke
ac0a1b9357 TOON: Add a safeguard to avoid dereferencing a null pointer in playAnim() 2014-05-25 18:24:08 +02:00
Strangerke
c456b0e0e3 TOON: Reduce the scope of some more variables. 2014-02-28 23:39:35 +01:00
Strangerke
460645393e TOON: Reduce the scope of a couple of variables. 2014-02-28 23:33:39 +01:00
Strangerke
a8e17552ce TOON: Remove double identical check. 2014-02-28 23:33:19 +01:00
Johannes Schickel
1d65a915ba TOON: Make GPL headers consistent in themselves. 2014-02-18 02:39:39 +01:00
Johannes Schickel
4e290bf475 TOON: Use keycodes for hotkey handling. 2014-02-14 18:21:57 +01:00
Johannes Schickel
b91e96e26a TOON: Ignore hotkeys when *any* modifier is used.
This makes, for example, META+d also be ignored and not only CTRL+d etc.
2014-02-14 18:21:57 +01:00
Johannes Schickel
f5a77e1380 TOON: Do not use KeyState::hasFlags when only presence of any flag should be checked.
hasFlags has the semantics to check whether *all* of the supplied flags are
active. Toon looks like it rather wants to know whether any modifier is
active and thus not use hasFlags.
2014-02-14 18:21:57 +01:00
D G Turner
ef85456859 BUILD: Remove need for engine.mk in each engine directory.
Each engine now only has to provide a single configure.engine file
adding the engine into the configure script, which then produces the
required other files automatically.
2013-11-24 00:48:01 +00:00
D G Turner
1ac01d2333 BUILD: Remove need for engine-plugin.h in engines.
This is now generated automatically by the configure script from the
engine directory names.
2013-11-24 00:48:01 +00:00
D G Turner
00c27a28f9 BUILD: Split engines/plugins_table header down to a file per engine.
This is the third and final commit enabling fully pluggable engines.

Now providing an engine folder contains a configure.engine, engine.mk
and engine-plugin.h file, it will be picked up automatically by the
configure script.
2013-11-24 00:48:01 +00:00
D G Turner
d77cf95a18 BUILD: Split engines.mk down to a single file per engine.
This is the second part of allowing engines to be added dynamically.
Each folder in engines/ which must contain a file named "engine.mk"
containing the make definitions for that engine.
2013-11-24 00:48:01 +00:00
D G Turner
aa947c9474 BUILD: Split configure.engines down to a single file per engine.
This is the first part of allowing engines to be added dynamically.
They are placed into a folder in engines/ which must contain a file
named "configure.engine" to add the engine, which is pulled into the
top level configure script automatically.
2013-11-24 00:45:38 +00:00
Strangerke
1c0367d5a6 TOON: Fix unintialized variables. Fix CID 1002424 2013-11-09 18:20:29 +01:00
Strangerke
c177d45073 TOON: Fix uninitialized variable in audio. CID 1002729 2013-11-09 15:09:05 +01:00
Strangerke
5b086651ba TOON: For consistency, replace the remaining strncpy by strlcpy 2013-10-30 23:14:13 +01:00
Strangerke
22df279adc TOON: replace strncpy by strlcpy as suggested by LordHoto 2013-10-30 22:43:59 +01:00
Strangerke
3e6a1422e3 TOON: Fix CID 1002728, 1002729, 1003215, 1002731, 1002730 2013-10-30 08:31:14 +01:00