607 Commits

Author SHA1 Message Date
Adrian Frühwirth
dcd4785009 DRACI: Enforce code formatting guidelines 2018-05-07 20:06:30 +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
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
Torbjörn Andersson
462f1c9859 JANITORIAL: Silence more GCC 7 warnings
There were all flagged as intentional fall throughs. I simply changed
the comments to something GCC would recognize.
2017-08-06 12:26:05 +02:00
kmar
3980b9593a fix music in "Draci Historie" (use MIDI channel 16) 2017-07-30 22:09:19 +02:00
Eugene Sandulenko
795a628684 DRACI: Remove generic comment 2016-07-28 11:32:30 +03: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
Ori Avtalion
3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +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
Johannes Schickel
0170982a53 DRACI: Let listSaves return list sorted on slot numbers. 2016-02-25 21:39:45 +01:00
Johannes Schickel
d80e5e7f0c DRACI: Only request actual save slots in listSaves. 2016-01-26 16:35:30 +01:00
Strangerke
26d5c3507a DRACI: Initialize a variable, some rework on the initialization of pointers and booleans 2014-05-25 17:18:35 +02:00
D G Turner
fc8e00b17a DRACI: Add missing _isPositionLoaded initialization.
Fixes CID 1003405.
2014-05-20 16:17:25 +01:00
Matthew Hoops
159f2128bb DRACI: Silence warning 2014-05-03 14:47:04 -04:00
lukaslw
ad842e61da DRACI: Inventory opening after finished callback. 2014-04-28 21:49:34 +02:00
lukaslw
b3de0843a9 DRACI: Opening inventory during movements and actions. 2014-04-28 21:42:10 +02:00
lukaslw
43e3a58c2c DRACI: Hero postion in first new room after loading. 2014-03-11 16:42:53 +01:00
lukaslw
4128595360 DRACI: Fading out improvements. 2014-03-08 16:24:17 +01:00
lukaslw
579c343d13 DRACI: Saving improvements (item in hand and hero position). 2014-03-08 16:21:57 +01:00
Johannes Schickel
df777fee2a DRACI: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
Strangerke
c39f7d95c9 DRACI: Janitorial - Remove trailing spaces 2014-02-16 18:36:24 +01:00
Johannes Schickel
0e017f007a Merge pull request #375 from digitall/engineAutoPlug
RFC: Pluggable Engines #2 (No Python, just evolution of current configure shell and make code)
2013-11-26 02:27:11 -08:00
Strangerke
14cb73789e DRACI: Rework formatting of gplCommands 2013-11-24 02:40:38 +01:00
Strangerke
aa2371c3d8 DRACI: Janitorial - Fix spacing errors 2013-11-24 02:00:21 +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
Eugene Sandulenko
2a6a23e88a DRACI: Initialized class variables. CID 1003405 2013-10-18 15:59:22 +03:00
Eugene Sandulenko
834ff819df DRACI: Fix negative array index read. CID 1003548 2013-10-18 15:56:50 +03:00
Eugene Sandulenko
734abb5a53 DRACI: Fix potential sign extention. CID 1003514 2013-10-17 14:18:27 +03:00
Eugene Sandulenko
2a65976092 DRACI: Fix potential sign extention. CID 1003513 2013-10-17 14:16:23 +03:00
Eugene Sandulenko
78dc1c70d5 DRACI: Fix uninitialized variabled. CID 1003404 2013-10-17 14:14:19 +03:00
Eugene Sandulenko
ae38d943ae DRACI: Fix uninitalized variables. CID 1003406 2013-10-17 14:11:07 +03:00
Eugene Sandulenko
ae17206ce7 DRACI: Fix uninitalized variables. CID 1003405 2013-10-17 14:08:37 +03:00
Eugene Sandulenko
74172a7449 DRACI: Fix potential negative array index read. CID 1003548 2013-10-17 14:03:37 +03:00
Eugene Sandulenko
54ebfe7dde DRACI: Fix potential division by zero. CID 1003841 2013-10-17 14:01:49 +03:00
Johannes Schickel
f8ffe816d6 DRACI: Take advantage of Surface::getPixels. 2013-08-03 04:02:50 +02: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
Max Horn
cdfd5f85c8 ENGINES: Silence clang warning about unused private member _vm
This affects the Console / debugger classes of multiple engines.
An alternative solution would have been to remove the unused _vm
member vars. However, it seems likely that in the future, the _vm
member could be useful for methods added to the console. So instead,
we add a simple assert(_vm) to silence the clang warning.
2013-04-18 23:50:19 +02:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Johannes Schickel
a513585358 DRACI: Slight cleanup in querySaveMetaInfos. 2012-07-03 18:39:50 +02:00
Tarek Soliman
921f602ab8 JANITORIAL: Fix whitespace in pointer template arg 2012-02-15 10:07:08 -06:00
Torbjörn Andersson
16f2c5cdb6 DRACI: Move readByte() and readUint32LE() out of assert() 2012-01-15 00:04:28 +01:00
D G Turner
d3a187c298 DRACI: Replace usage of 'goto'. 2011-12-08 03:31:29 +00:00
Strangerke
bab4b6f729 LAUNCHER: Introduce GUIO0() in order to replace GUIO1(GUIO_NONE) 2011-11-16 22:38:58 +01:00
Johannes Schickel
012367312d DRACI: Update comment regarding SharedPtr/ScopedPtr. 2011-11-16 20:31:22 +01:00
Eugene Sandulenko
7e57a87479 DRACI: Fix warning 2011-11-02 23:08:23 +00:00
Eugene Sandulenko
32972a5ffb AD: Switched rest of the engines to new GUIO 2011-10-23 17:53:13 +01:00