109 Commits

Author SHA1 Message Date
aryanrawlani28
71a820caff ENGINES: Begin class renaming of ME & AME
- ME -> MetaEngineStatic (static parts)
- MEC -> MetaEngine (dynamic parts)
2020-10-03 14:56:36 +02:00
aryanrawlani28
c48719404a BASE: PLUGINS: Rename plugin matching helpers
- give*From* -> get*From*
2020-10-03 14:56:36 +02:00
aryanrawlani28
c9f2c50380 WINTERMUTE: Split detection features & adapt to new plugins.
- Update AMEC's getFileProps (changes related to MacResMan)
- This commit also includes a change from other engines.
- Fallback detection here depends upon many Engine resources.
- As such, it might not be suitable to add all of them to executable.
- Thus, shift fallback detection to the dynamic part.
- The static part gets the relevant Engine plugin & then tries to call it.
- This way, fallback detection for Wintermute will depend on the engine plugin.
- Normal detection will still work fine.
2020-10-03 14:56:36 +02:00
aryanrawlani28
395f590554 ENGINES: AMEC: Add some fallback detection-related functionality.
- Add fallbackDetectExtern, meant to be overriden by child classes, if fallbackdetection heavily depends on Engine code.
- Add getFileProperties helper.
- End function names with "extern" to distinguish from normal.
2020-10-03 14:56:36 +02:00
aryanrawlani28
e69d9c98a4 ENGINES: AME: Move the subclass implemented method createInstance out of AME into AMEConnect.
- We have a default createInstance method overridden from MetaEngine from before in AME.
- So, just leave that as-is, and call the child class's function from there.
- Lastly, in AMEC - the generic createInstance is called, so we redirect it to call the one in the MetaEngine.
- Then, games can be run normally.
2020-10-03 14:56:36 +02:00
Bastien Bouclet
0f2c6cd9ea ENGINES: Change mac resource fork file detection to use the file cache
Common::MacResMan is now able to open files from a specified
Common::Archive. This is a bit hacky as dynamic_cast is used to break
the Archive encapsulation to retreive the underlying FSNode. It should
however be more correct than the previous code that assumed files were
at the root of the currently running game's path.

AdvancedDetector constructs a Common::Archive from its FileMap based
filesystem cache and uses it to detect the mac resource fork files.

This cuts the time it takes to run the detection code with all the
engines enabled as dynamic plugins on the 3DS to 30 s from 280 s.
2020-09-20 16:33:45 +02:00
Bastien Bouclet
675776ffe9 ENGINES: Make AdvancedMetaEngine::toDetectedGame virtual
To allow subclasses to post-process the games detected by
AdvancedMetaEngine.
2020-06-07 07:40:27 +02:00
Bastien Bouclet
da36917767 ENGINES: Keep track of the unavailable files in AdvancedDetector
Checking whether a file exists is costly on the 3DS. Remembering which
files do not exist instead of repeatedly checking for them reduces the
time it takes to detect games from ~1 minute to ~10 seconds in some
cases.
2020-02-27 21:33:35 +01:00
Bastien Bouclet
c3e152b612 ENGINES: Mark the pirated game message as translatable 2020-02-03 08:33:52 +01:00
Zvika
de3011f788
ENGINES: Add GUI warning when encountering a pirated game 2020-02-03 09:10:52 +02: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
662791a961 COMMON: Include hidden files in directory listings by default
Hidden files are now only ignored in the GUI file browser when the user
has not checked 'show hidden files'.

Myst III has the hidden flag set for one of the directories containing
datafiles on the CD-ROM. When users copy the files to their hard drives
the hidden flag is kept. Detection worked previously because hidden
files were explicitly requested in the AD code. The engine would fail
to open the datafiles because SearchMan.addSubDirectoryMatching
ignored hidden directories.
2019-01-30 06:48:32 +01:00
D G Turner
5a29aa8812 ENGINES: Fix Crash in Fallback Detector Game Title Naming.
This is a regression from 90b78c544657bf0fc41d6b86276a0873060345b5

This commit restores the previous behaviour and avoids a null
pointer dereference induced crash.

This fixes the root cause of bug Trac #10515.
2018-11-11 08:16:11 +00:00
Bastien Bouclet
643ce81cf7 BASE: Remove temporary targets when they fail to launch
Prevents invalid targets created from the command line to show up in the
launcher.

Fixes Trac#2788.
2018-06-03 13:48:31 +02:00
Bastien Bouclet
1dcb8076db ENGINES: Remove usage of C++11 extended initializer lists 2018-05-10 09:26:26 +02:00
Bastien Bouclet
2fe060e5c9 ENGINES: Cleanup DetectedGame initialization in the AD 2018-05-10 09:04:23 +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
5aff87dc15 ENGINES: Turn GameDescriptor into a simple struct 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
Bastien Bouclet
9587dd5c21 ENGINES: Fix clang-tidy warnings 2018-05-10 07:50:44 +02:00
Lothar Serra Mari
570119eabf ENGINES: Mark reportCommon string as translateable 2018-05-01 10:34:02 +02:00
Adrian Frühwirth
82757deadd Revert "ENGINES: Improve update of the Unknown Game Dialog when the overlay size changes"
This reverts commit 8cb9eebd8a8f7cae2dbb68ad3398f444426929c1.
2018-04-30 15:01:44 +02:00
Thierry Crozat
8cb9eebd8a ENGINES: Improve update of the Unknown Game Dialog when the overlay size changes
Previously the dialog was not resized and was just recentered on the screen.
Now it is properly resized as well.
2018-04-29 21:47:10 +01: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
Lothar Serra Mari
4220e14522 ENGINES: Add a dialog for reporting unknown games
Thanks to the great help of @criezy, here's my implementation of an GUI
dialog that appears when an unknown game is detected.

Features:
 - Allows copying the data collected by game detector to the clipboard
 - Allows opening the bug tracker and pre-filling the form fiels

This closes https://bugs.scummvm.org/ticket/10435.
2018-04-29 21:47:10 +01:00
Colin Snover
a2bdff02d7 ENGINES: Improve output of unknown game variant detection
When a user tries to add a game expecting it to be a particular
game for a particular engine, but a detector from another engine
happens to match some files that exist in the game directory and
reports on those files instead, this can cause a lot of confusion
because the detector doesn't say what engine or game it thought it
matched.

This patch adds the name of the matching engine as well as any
matching game IDs (if applicable) to the detector's logged output.
It also provides more specific guidance about where to send the
detection information (to the bug tracker), and properly wraps the
first part of the report to 80 columns.

Refs Trac#10272.
2017-11-10 09:57:41 -06:00
Colin Snover
66826a8b9b ENGINES: Continue to check file presence after a hash/size mismatch
If an early file in the game's signature list has a hash/size
mismatch, it is still necessary to continue to check the rest of
the candidate files for existence, since the non-existence of
candidate files is supposed to disqualify a game description as
matching a game to an unknown variant.

By quitting the file check early, the detector had been allowing
descriptions to randomly match if there happened to be an early
file in the detection list with the right name but wrong hash/size,
even if some of the other signature files did not exist at all.
2017-11-10 09:57:41 -06:00
Colin Snover
159e5a97ce ENGINES: Allow detection entries to match on full paths
This allows an engine to match files that exist multiple times
in the same game directory with the same basename.

For example, different releases of Torin's Passage in SCI engine
come with zero or more GERMAN, FRENCH, ENGLISH, etc. directories,
all containing files with the same basenames but with different
contents per language. Because the allFiles map used only the
basename of a file as a key, it could not match more than one of
these localization directories, which made it impossible to select
from all the possible languages.

Refs Trac#9772.
2017-05-21 15:56:42 -05:00
Eugene Sandulenko
cadb29d83d ENGINES: AD: When file has no Mac Resource fork, compute its md5 normally 2017-01-13 22:20:51 +01:00
Ben Castricum
d3cd42e1d4 ALL: Fix usage of 'etc.' 2016-11-29 20:14:41 +01:00
rootfather
3ba06b40eb ENGINES: Simplify translation for advancedDetector.cpp
Until now, we had three separate strings for the message
about unsupported games. This commit merges them into
one single string.
2016-11-27 18:18:37 +01:00
Johannes Schickel
e515fc18db ENGINES: Make variable names of PlainGameDescriptor conform to our guidelines.
gameid -> gameId
2016-03-08 19:01:42 +01:00
Johannes Schickel
3aecd8ef2a ENGINES: Make variable names of ADGameDescription conform to our guidelines.
gameid     -> gameId
guioptions -> guiOptions
2016-03-08 19:01:38 +01: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
3ec225f127 ENGINES: Fix formatting. 2016-03-08 18:23:04 +01:00
Eugene Sandulenko
86592b82a5 AD: Remove leftover debug messages 2016-03-07 20:48:13 +01:00
Eugene Sandulenko
0463b787e1 AD: Added new flag for autogenerating game target from extra information 2016-03-07 19:00:37 +01:00
Filippos Karapetis
672a46b84f DETECTOR: Do not show the zero matched size for illegitimate copies 2014-08-06 15:08:57 +03:00
Johannes Schickel
53e83147be ENGINES: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
Eugene Sandulenko
6384cfdeaa AD: Introduce ADGF_DROPPLATFORM 2013-09-09 00:38:06 +03:00
Matthew Hoops
4a7e4e5b22 ALL: Don't use EventRecorder at all when not compiled in 2013-07-06 23:54:45 -04:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03: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
Sven Hesse
9e7ece4ebe DETECTOR: Make reportUnknown() available for AdvancedMetaEngine classes to use 2012-06-27 05:14:18 +02:00
Sven Hesse
2c760cb15e DETECTOR: Make detectGameFilebased() return a list of MD5s and file sizes
Since we need a FSNode parent for Mac resource forks, we need to change
signature of detectGameFilebased(), too.
2012-06-27 05:14:18 +02:00
Sven Hesse
63e13c5d2c DETECTOR: Move size reading and MD5 creating into a new method getFileProperties() 2012-06-27 05:14:18 +02:00
Sven Hesse
5ca480aa2e DETECTOR: Move ADFileProperties(Map) into advancedDetector.h 2012-06-27 05:14:18 +02:00