Commit Graph

493 Commits

Author SHA1 Message Date
sluicebox
674ed112aa JANITORIAL: Update more old bug tracker numbers
I missed the six digit ones and a few others in:
93eeffc84d
2021-06-09 14:28:52 -06:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Thierry Crozat
20fb33a668 SWORD1: Fix use of uninitialized variables in PSX demo music
The music tab file in the PSX demo seems to be truncated and we
were seeking beyond the end of the file for some music (such as
the one for the menu), and then trying to read without any checks
that either the seek or read succeeded. This caused the code to
then use uninitialized variables causing random issues (such as
getting some noise). We now ignore the music id that are beyond
the end of the broken tab file.
2020-10-19 01:14:21 +01:00
Eugene Sandulenko
7ff34bc9ec PLUGINS: MetaEngineStatic -> MetaEngineDetection 2020-10-11 23:14:39 +02:00
Eugene Sandulenko
7ea6781043 PLUGINS: PLUGIN_TYPE_METAENGINE -> PLUGIN_TYPE_ENGINE_DETECTION 2020-10-11 23:12:32 +02:00
aryanrawlani28
d26bbe521c ENGINES: ALL: Finish renaming ME & AME classes
- ME -> MetaEngineStatic (static parts)
- MEC -> MetaEngine (dynamic parts)
2020-10-03 14:56:36 +02:00
aryanrawlani28
29ceb07959 ENGINES: ALL: Revert detection submodule to be directly present in the engine directory
- DETECT_OBJS are present and added inside an engine's modules.mk file.
2020-10-03 14:56:36 +02:00
aryanrawlani28
8189a05316 ENGINES: ALL: Adapt to changes for new plugins by defining a new detection module
For each engine:
- Make a new folder detection
- Move detection-related files inside the folder
- Add a new module "enginename/detection"
- Add DETECT_OBJS here
- Adjust the normal engine module to remove detect_objs
- Adjust every file for the new changes.
2020-10-03 14:56:36 +02:00
aryanrawlani28
467ca35a37 SWORD1: Split detection code & adapt to new plugins. 2020-10-03 14:56:36 +02:00
Bastien Bouclet
0eb3fea404 SWORD1: Change detection to query the name of the parent folder only once
All the files passed to the detector are in the same folder. They all
have the same parent. No need to check each one individually.

This saves 2500 ms on the 3DS.
2020-09-13 09:31:07 +02:00
Eugene Sandulenko
49e8b52a7e SWORD1: Added detection and support for Spanish demo. Fixes #11397
This demo uses normal interpreter with less differences than
the English demo.
2020-09-01 19:22:27 +02:00
Eugene Sandulenko
a619827ffa SWORD1: Improved detection for demos. Now Spanish demo is detected properly 2020-09-01 16:37:36 +02:00
aryanrawlani28
e22b32abfe GUI: U32: Use Common::U32String::format where necessary and GUIError to u32
- Where necessary as in, where translated messages are used.
- GUIErrorMessage now takes in U32String
- error messages across some engines use U32Strings. they are changed because they show a message dialog.
2020-08-30 14:43:41 +02:00
aryanrawlani28
bed05ea134 GUI: U32: Fix compilation errors across entire project
After the initial changes just to scummvm/gui for u32, this commit includes the whole project

- Widget creations now always have u32 descriptions, labels, or tooltips
- Message dialogs make use of default arguments instead of providing the same argument explicitly
- encode String::format properly before passing on as argument where necessary
- Modify hugo utils (yesNoBox and notify box) to use u32
- Also provide fake constructors for the above which redirect to the u32 constructor
- Convert all keymap descriptions to u32 across all engines
- showConfirmationDialog in mohawk now uses u32
- showScummVMDialog also uses u32
- Scumm engine has dialogs now which use u32
- General fixes and wrapping convertToU32String for setLabels and related functions
- Add a fake constructor to MesssageDialog which redirects to the u32 constructor
2020-08-30 14:43:41 +02:00
Thierry Crozat
d07c009d7e SWORD1: Fix detection code for Mac demo
It was using the wrong file count define when iterating on the files.
Fortunately the one being used has currently the same value as the
one that should have been used. So it was working correctly despite
the bug.

Also reorder the defines to match the order of the files in the
g_filesToCheck array.
2020-08-26 21:35:45 +01:00
mataniko
581a6ec7d6 JANITORIAL: Rename kSupportsRTL to kSupportsReturnToLauncher 2020-05-12 10:36:38 +02:00
Eugene Sandulenko
4a6c0fb35e SWORD1: Fix mismatching malloc/delete[] 2020-04-27 22:52:13 +02:00
Cameron Cawley
371da82d13 SWORD1: Fix cutscene playbck when entering the sewer in the PSX demo 2020-04-19 12:27:07 +01:00
Thanasis Antoniou
1cb608ef54 SWORD1: Fix blank in-game control panel menu 2020-02-20 03:58:30 +02:00
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
Paul Gilbert
a00e44ba6c ENGINES: Merge saveGameState virtual methods into a single one 2020-02-16 15:44:28 -08:00
Paul Gilbert
46a1f92ef6 SWORD1: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
Bastien Bouclet
9d1447113d SWORD1: Add override keywords 2020-02-09 12:43:16 +01:00
Eugene Sandulenko
5fde10383d SWORD1: Added override keywords 2020-02-05 16:18:32 +01:00
Paul Gilbert
5b80320525 ENGINES: Adding override keyword to hasFeature methods 2020-02-04 20:04:11 -08:00
Eugene Sandulenko
9801396f9f SWORD1: Added override keywords 2020-01-31 14:26:23 +01:00
Eugene Sandulenko
452874d48b SWORD1: Support for external translated menu in Russian Sword1 2020-01-27 23:35:29 +01:00
Bastien Bouclet
bb813719b5 ENGINES: Change targets to have an 'engine ID'
The engine ID identifies which engine should be used to launch the target.
Also remove the 'single ID' system. Different games from engines that used
that system now have different game IDs.

Also-By: Matthew Hoops <clone2727@gmail.com>
2019-11-03 11:43:00 +01:00
Bastien Bouclet
4b42112721 ENGINES: Add an engine ID to all the engines 2019-11-03 11:43:00 +01:00
D G Turner
28a7ebc48d SWORD1: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-20 15:39:58 +01:00
D G Turner
9467bf7faa SWORD1: Remove Fixed Sized Buffer Usage from Savegame Name Code 2019-09-15 00:28:28 +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
Bastien Bouclet
1dcb8076db ENGINES: Remove usage of C++11 extended initializer lists 2018-05-10 09:26:26 +02:00
Bastien Bouclet
90b78c5446 ENGINES: Merge GameDescriptor and DetectedGame 2018-05-10 09:04:23 +02:00
Bastien Bouclet
1de5aca585 ENGINES: Set the GameDescriptor decription in the constructor 2018-05-10 09:04:23 +02:00
Bastien Bouclet
643c24db75 ENGINES: Change MetaEngine::listSupportedGames to return plain game descriptors 2018-05-10 09:04:23 +02:00
Bastien Bouclet
8fb149e3c7 ENGINES: Change MetaEngine::findGame to return a plain game descriptor 2018-05-10 09:04:23 +02:00
Bastien Bouclet
cf1ebf2951 ENGINES: Add unknown game variants to the game detector results 2018-05-10 09:04:23 +02:00
Lothar Serra Mari
451cf2304f ENGINES: Show the unknown Game dialog only when the detector is launched by the Add Game feature 2018-04-29 21:47:10 +01: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
925c9416db SWORD1: Fix use of deallocated stack memory
FSNode::getName returns a String object, not a reference, so the
pointer from c_str is valid only until the end of the statement.
2017-11-10 23:22:26 -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
Bastien Bouclet
c3bff7f25a SWORD1: Fix leaking the save thumbnail MemoryWriteStreamDynamic buffer 2017-09-22 07:06:20 +02:00
Eugene Sandulenko
e3d720f09b JANITORIAL: Fix GCC7 fall through warnings 2017-08-11 20:46:56 +02:00
Torbjörn Andersson
a70767503e SWORD1: Silence GCC warning about potential overflow
Probably doesn't ever happen, but now 'fileName' is as large as it
needs to be if 'label' is as long as it can be.
2017-08-06 16:38:03 +02:00
Thierry Crozat
34969d50b8 SWORD1: Specify list of available languages in detection code
This way only those languages are listed in the language selector
for the game settings.
2017-07-12 21:44:10 +01:00
Thierry Crozat
56757592bd SWORD1: Only write config in in-game menu when they are changed
The in-game menu contains not only subtitles and volume settings,
but also load and save game options. Every time the menu was opened
it would write the subtitles and audio volumes to the ConfMan
resulting in toggling on overriding global options for this game, which
was a but strange when it was previously using global options and we
only wanted to load a game. So now the settings are written to ConfMan
from the in-game menu only when they are actually changed.
2017-07-08 12:55:12 +01:00
Thierry Crozat
6ff927bff7 SWORD1: Use booleans for _systemVars speech and subtitles flags
The were defined as uint8 and the code was inconsistent in the
way they were handled, for example setting them to 1 in some
places and to true in others. It was working but relying on implicit
conversions both ways between 1 and true.
2017-07-08 12:55:11 +01:00
Thierry Crozat
6f5ccb8f43 SWORD1: Add thumbnail when saving from game panel
This fixes bug #9908 SWORD1: Picture previews black when
saving in game
2017-07-08 00:38:28 +01:00