Commit Graph
231 Commits
Author SHA1 Message Date
Eugene Sandulenko 7ccce1d97b AD: Compute tail or mac resfork when requested 2021-10-17 20:48:01 +03:00
Eugene Sandulenko d4443ed494 AD: Correctly process small files 2021-10-17 20:48:01 +03:00
Eugene Sandulenko a82de67a5d AD: Reduce code duplication 2021-10-17 20:48:01 +03:00
Eugene Sandulenko 87012cbf21 AD: Added ADGF for calculating md5 from the file tail 2021-10-16 09:24:08 +03:00
Eugene Sandulenko 0e48263e50 AD: Allow both MacResFork and non-resfork entries coexist 2021-10-14 13:55:44 +03:00
Die4Ever 123d4dae0b COMMON: logging hashes when starting a game (#3372)
I figure this would be helpful when people submit their log files, so we know what version of the game they're running.
2021-09-16 11:38:02 +03:00
Eugene Sandulenko 436e47292e BASE: Load engine plugins by name. Fixes bug #12342
This is a degradation from the split of detection plugins. All the
caching code which was present was left with detection plugins which
now make no sense: we always load all detection plugins as a whole.

This commit moves the caching logic over to the Engine plugins.

This opens a question now whether we should move all to UNCACHED_PLUGINS
2021-08-16 20:32:53 +02:00
djsrv 7eb4841065 ALL: Use Path type in Archive functions 2021-08-07 10:44:37 +02:00
Eugene Sandulenko 2760b9f737 AD: Allow punycode in the detection entries 2021-07-27 23:45:29 +02:00
Paul Gilbert 76e2a42240 ENGINES: Convert advanced detector file sizes to int64 2021-07-08 18:24:28 -07:00
ysj1173886760 65f36c33ff ENGINES: extend toDetectedGames to deal with ADDetectedGameExtraInfo. 2021-06-13 14:15:45 +02:00
ysj1173886760 8abdcf6600 ENGINES: dealing with ADDetectedGameExtraInfo after we using fallback detection 2021-06-13 14:15:45 +02:00
SupSuper edb6d99b53 DETECTION: Clear MD5 cache when starting games
This fixes the cache being preserved between different game starts
2021-06-01 19:14:45 +02:00
ysj1173886760 361c723e8a ENGINE: introduce kDebugGlobalDetection which is used for print debug messages of advancedDetector 2021-05-22 01:34:57 +02:00
Eugene Sandulenko 8acff5258a AD: Fix detection for Mac games after the cache was introduced 2021-05-15 17:17:23 +02:00
a/ eba9fa8f30 DETECTOR: Use Common::String::format for performance 2021-05-14 22:35:23 +02:00
a/ 45aa165b80 Modify getFileProperties to cache md5 results 2021-05-14 22:35:23 +02:00
Thierry Crozat 0622c9f8fb ENGINES: Allow engines to decide if unknown variants can be run 2021-04-21 23:11:28 +01:00
Thierry Crozat 6d2a62fe72 AGS: Improve detection
For unknown variants it now checks that the file is actually an
AGS game to avoid false positive due to generic names used by
some of the detection entries (such as 'game.exe'). Also unknown
variants can now be added.
2021-04-17 22:20:59 +01:00
Eugene Sandulenko 342f51b196 AD: Fix compilation 2021-04-16 14:42:55 +02:00
Eugene Sandulenko ec2a50b746 AD: Implemented AGDF_WARNING flag 2021-04-16 14:20:13 +02:00
Eugene Sandulenko 8339fbb9d9 AD: Fix type in constant name 2021-04-16 13:28:43 +02:00
D G Turner 37f2751006 AD: Fix Signed vs. Unsigned GCC Compiler Warning 2021-03-12 19:51:39 +00:00
Henrik "Henke37" Andersson 9b30f4a73d ENGIES: AdvDect needs getValOrDefault 2021-02-12 00:41:23 +01:00
Cameron Cawley 4ced49acd4 ENGINES: Changed AdvancedMetaEngine::createInstance to return a Common::Error 2020-12-04 20:57:14 +00:00
athrxx 3437beffab COMMON: add new flag ADGF_UNSUPPORTED to advanced detector
This will give an error dialog and not actually start the game. The dialog can be customized with a message from the ADGameDescription::extra field.

Some changes have been made to DetectedGame to prevent the string from the extras field to be appended to the game description.
2020-11-08 20:31:39 +01:00
Eugene Sandulenko 702c843e06 AD: Fix hang when autogen target is for a single word 2020-10-22 13:59:55 +02:00
Eugene Sandulenko 8350f283d0 AD: Process corner cases in name autogeneration
- When there are more than one non-alphanum at the end, like "Quest..."
- When there is no alphanum at all: "::::"
- Added error messages if anything else is not caught
2020-10-22 12:13:13 +02:00
Eugene Sandulenko cc2db8211a AD: Fix crash when fanmade game has only one word 2020-10-22 11:58:11 +02:00
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