Commit graph

152 commits

Author SHA1 Message Date
Eugene Sandulenko
9be82ea2f4 AD: Better automatic generation of game targer
- Passing numbers
- Skipping short words
- Skipping articles
- Fitting whole words
2020-10-21 22:12:16 +02:00
Eugene Sandulenko
1c830bc068 AD: Restrict length of autogenerated targets 2020-10-21 19:13:12 +02:00
Eugene Sandulenko
7ff34bc9ec PLUGINS: MetaEngineStatic -> MetaEngineDetection 2020-10-11 23:14:39 +02:00
Paweł Kołodziejski
35b9cccbde ALL: Merge ResidualVM 2020-10-09 19:44:13 +02:00
Pawel Kolodziejski
3d74c3dd4d GRIM: Post branch merge fixes. 2020-10-07 19:50:27 +02:00
Pawel Kolodziejski
4631c0e2ed ALL: Sync with ScummVM rev: a4002bdeee 2020-10-04 23:59:26 +02:00
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
Pawel Kolodziejski
bfe58d3c77 ALL: Synced with ScummVM - rev: d4db631f9b 2020-09-23 21:52:10 +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
Pawel Kolodziejski
8f4e1c6cf3 Sync with ScummVM rev. 654b8208b8 2020-06-22 08:14:16 +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
Pawel Kolodziejski
b586571900 ALL: synced with ScummVM commit 09bf38c120 2020-05-09 20:05:54 +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
feaf9dc365 ALL: Sync with ScummVM rev. 55dba55056 2019-12-08 17:06:42 +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
3333aea405 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.

Fixes #1516.
2019-01-31 09:01:14 +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
Bastien Bouclet
66654cb376 ALL: Sync with ScummVM - rev. cd37d510f9 2019-01-26 20:47:55 +01:00
D G Turner
5a29aa8812 ENGINES: Fix Crash in Fallback Detector Game Title Naming.
This is a regression from 90b78c5446

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
53759fe53a ALL: Sync with ScummVM - rev. 2586ca2345 2018-07-31 21:09:37 +02: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 8cb9eebd8a.
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
Bastien Bouclet
3ec01653c3 ALL: Merge from ScummVM rev 3a933138ce 2017-12-06 21:41:03 +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
Bastien Bouclet
84e62b6c8d ALL: Sync with ScummVM - rev. 87ebc7140c 2017-09-02 15:04:07 +02: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
Pawel Kolodziejski
9ba9c69b3f ALL: Sync with ScummVM - rev. 823c2f899b 2016-11-12 08:49:29 +01:00