Commit Graph

1043 Commits

Author SHA1 Message Date
Bastien Bouclet
c08bb9cb4a ENGINES: Use an uppercase C for the metaengine copyright strings 2018-12-10 18:39:26 +01:00
Bastien Bouclet
9a4c0ae281 ENGINES: Normalize the getName() result of metaengines
Also-By: Matthew Hoops <clone2727@gmail.com>
2018-12-10 06:47:27 +01:00
D G Turner
4f077f2b5a HOPKINS: Add Graphics Screen Update Debugging Code.
This is mainly to aid investigation of bug Trac #6310.
2018-10-18 23:40:35 +01: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
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
Paul Gilbert
b592873847 HOPKINS: Add missing break to switch statement 2017-08-06 22:14:36 -04: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
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
Hubert Maier
2715f47f88 Fix Hopkins copyright sign 2016-05-29 15:12:53 +03:00
Ori Avtalion
3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Ori Avtalion
253e18c440 JANITORIAL: Reduce GUI header dependencies 2016-04-14 13:30:14 +03: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
6452939b18 HOPKINS: Let listSaves return list sorted on slot numbers. 2016-02-25 21:39:45 +01:00
Johannes Schickel
e1a5cfaac6 HOPKINS: Only request actual save slots in listSaves. 2016-01-26 16:35:30 +01:00
Paul Gilbert
51e5baa4d1 HOPKINS: Fix malformed octal characters 2015-09-22 19:56:06 -04:00
Torbjörn Andersson
dfe04491c1 JANITORIAL: Remove unnecessary semicolons 2015-01-21 01:29:22 +01:00
Strangerke
14ab55e9ba HOPKINS: Add a check for another sound related to frames removed in the Polish version. Fix for bug #6591 2014-11-01 12:35:59 +01:00
Strangerke
75198ce17c HOPKINS: Fix a couple of comments 2014-10-29 17:13:16 +01:00
Strangerke
c2951e2594 HOPKINS: Add specific code to handle the butchered Polish version with sync sound 2014-10-29 16:46:33 +01:00
Strangerke
7126374b42 HOPKINS: Rename the parameter of PlayAnimSound to make it meaningful 2014-10-28 18:19:12 +01:00
Filippos Karapetis
176f8209c7 HOPKINS: Remove trailing whitespace 2014-10-28 16:06:48 +02:00
Strangerke
7661b8adfc HOPKINS: Fix the censorship flag (bug #6591) 2014-10-27 16:45:31 +01:00
Thierry Crozat
8774fe2ce0 HOPKINS: Add list of files that contain translatable strings 2014-10-04 01:02:28 +01:00
Johannes Schickel
30d64edac4 ALL: Make Debugger command function names conform to our guidelines. 2014-05-27 02:04:08 +02:00
Johannes Schickel
ae4ffe01f0 ALL: Rename Debugger::DCmd_Register to Debugger::registerCmd. 2014-05-27 02:04:08 +02:00
Johannes Schickel
daa8d57a86 ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. 2014-05-27 02:04:07 +02:00
D G Turner
bee54dc048 HOPKINS: Fix loading of variant COMPUTAN.TXT used by Polish version.
This is the final fix for bug #6590 - "HOPKINS-PL: Crash using computer
in office".
2014-05-17 20:22:19 +01:00
D G Turner
2126bef17a HOPKINS: Further cleanup in ComputerManager class.
Have simplified the parsing of the COMPUTAN.TXT file prior to looking at
supporting the Polish file format variant.

These change should have no functional difference, but improve the code
by removing a set-but-unused bool in the MenuItem structure, fixing a
number of repeated "magic" values to be explicit as various buffer sizes
and replacing usage of strcpy with the safer version from our Common
code etc.
2014-05-17 15:09:46 +01:00
D G Turner
16152cf1ea HOPKINS: Add sanity check to parsing of COMPUTAN.TXT file.
This previously crashed on the Polish version due to a variant file
format causing the parsing to make several invalid memory accesses.

This prevents this crash and any other in future, though it does not
fix the parsing of the variant file format.
2014-05-17 12:16:19 +01:00
D G Turner
71aab5ab1d HOPKINS: Add null termination to byte buffer returned by loadFile().
This shouldn't be a problem, as current client code either must find a
terminator when parsing the byte buffer or have preknowledge of the
buffer size from a file size or fixed call, so the appended null
termination will not cause issues. This change thus allows client code
to add sanity checks to prevent reading off the end of the buffer.
2014-05-17 12:12:19 +01:00
Matthew Hoops
740b6e8fbd IMAGE: Move all ImageDecoders to image/ 2014-02-28 00:27:28 -05:00
Johannes Schickel
d5b21c4036 HOPKINS: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Johannes Schickel
a1628bfa3f HOPKINS: Indent REGISTER_PLUGIN_* for consistency. 2014-02-17 23:02:07 +01:00
Torbjörn Andersson
2b40502503 HOPKINS: Fix bug that could cause the music to stop prematurely
The SoundManager filled the sound handles with zeroes, which made
the mixer confuse them with active sound handle zero. In my case,
this happened to be the intro music, and the music was stopped when
playWavSample() wrongly thought its sound handle was in use.
2014-02-13 00:38:04 +01:00
Strangerke
bd59c19fdf HOPKINS: Remove useless assignation 2014-02-09 20:10:26 +01:00
Strangerke
56664d036f HOPKINS: Reduce the scope of some more variables 2014-02-09 20:06:08 +01:00
Strangerke
c97ce839fd HOPKINS: Reduce the scope of some variables 2014-02-09 11:44:56 +01:00
Strangerke
6bcc8dfee6 HOPKINS: Initialize censorship based on per-engine GUI option instead of optional text flag 2014-02-02 16:20:17 +01:00
Strangerke
ea9fee35e8 HOPKINS: Fix censorship issue introduced in a11f579a3f 2014-02-02 16:16:29 +01:00
Strangerke
2817e38007 HOPKINS: Fix bug #6511 - Add detection to Polish full version of the game 2014-02-02 11:19:23 +01:00
Strangerke
761af0e4ab HOPKINS: Remove some unused constants 2014-01-06 22:14:52 +01:00
Strangerke
286613183c HOPKINS: Remove custom shouldQuit() as suggested by clone2727 2013-12-24 18:57:49 +01:00
Strangerke
28955963d4 HOPKINS: Fix bug #6456 - RTL not working. 2013-12-24 18:24:48 +01:00
D G Turner
05e07eed9c HOPKINS: Add missing getDebugger() for engine API. 2013-12-07 01:11:26 +00: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