168 Commits

Author SHA1 Message Date
sluicebox
c1256d2fc3 ENGINES: Update Advanced Detector comments 2024-08-17 17:54:12 -07:00
Paul Gilbert
dc21927538 DETECTION: Fix minus on unsigned type warnings 2024-06-30 11:48:29 -07:00
Cameron Cawley
441b02d057 DETECTION: Use uint32 for ADGameFileDescription file size 2024-06-30 19:13:41 +02:00
Le Philousophe
34108724ed ENGINES: Factorize sizing and writing functions for dynamic descriptions 2024-06-30 18:39:06 +02:00
Le Philousophe
37de547ec1 ENGINES: Make AdvancedMetaEngine use ADDynamicGameDescription
This will allow to unload AdvancedMetaEngineDetection plugin as
soon as identifyGame is done and before loading the AdvancedMetaEngine.
2024-06-30 18:39:06 +02:00
Le Philousophe
7e0048b4a3 ENGINES: Add ADDynamicGameDescription class
This class manages a buffer where all data usually stored in detection
plugin will get copied before unloading the plugin and starting the
game.

This class expects that two functions are present in every
GameDescription: sizeBuffer which calculates how many bytes we will need
to store the entry in RAM and toBuffer which copies the data in the
buffer and fix the pointers in the class.
At the end, it is expected that an ADDynamicGameDescription doesn't
depend anymore on data stored in the detection plugin.

The AD_GAME_DESCRIPTION_HELPERS macro allow to implement these functions
in all GameDescription which don't have any pointer except those in
ADGameDescription.
2024-06-30 18:39:06 +02:00
Le Philousophe
b61bd3ff85 ENGINES: Create a type aware advanced meta engine 2024-06-30 18:39:06 +02:00
Le Philousophe
90b886097f ENGINES: Create a type aware advanced detector 2024-06-30 18:39:06 +02:00
Le Philousophe
98d6f155d2 ENGINES: Split Engine::createInstance in two
This brings a cleaner separation between AdvancedMetaEngineDetection and
AdvancedMetaEngine.
2024-06-30 18:39:06 +02:00
Le Philousophe
645a35c05b ENGINES: Migrate to Path class 2023-12-24 13:19:25 +01:00
Kaloyan Chehlarski
f77eca7c80 AD: Implement archive caching during detection
Renamed MD5CacheManager to AdvancedDetectorCacheManager,
and added facilities for storing open archives inside it. This
way an archive that was opened by an AdvancedDetector
will be kept in memory until the end of the detection, so
other entries/engines that will look inside it won't have
to reopen it and reread its data every time.
2023-11-02 18:20:44 +01:00
Abhinav Chennubhotla
bb20579bee BASE: Add dumpAllDetectionEntries() to commandLine
- Add virtual function dumpDetectionEntries() to
   MetaEngine
 - Glk, Sky and SCUMM do not have proper
   definitions for dumpDetectionEntries()
 - Add md5PropToGameFile() to extract prefixes for
   md5s
 - AdvancedDetector writes content of DAT file to
   STDOUT
2023-07-03 13:54:50 +03:00
Thierry Crozat
ede44360b7 ENGINES: Add function in MetaEngineDection to get the number of game variants 2023-06-09 18:21:47 +02:00
Eugene Sandulenko
b04a432c7b
AD: Added AD_ENTRY5s and 6s 2023-03-02 00:07:01 +01:00
Eugene Sandulenko
d80de9511e
ENGNES: Reduced MASSIVE and unneeded dependency from gui_options.h header 2023-02-23 14:03:08 +01:00
Eugene Sandulenko
d1dcfb9508
AD: Set scan depth when adding globs generated from the entries. Default is 5 2023-02-02 18:23:55 +01:00
Eugene Sandulenko
d5cf875640
AD: Added AD_ENTRY4s() macro 2023-01-14 21:19:07 +01:00
Eugene Sandulenko
d3f9ddcb44
AD: Move canPlayUnknownVariants() override to a flag. 2023-01-09 18:56:50 +01:00
sluicebox
39b7925c84 AD: Allow engines to prefer fallback detection 2023-01-09 18:42:26 +01:00
Vladimir Serbinenko
275379c3d2 ENGINES: Change getFileProperties to receive MD5Properties as argument 2022-12-28 12:56:22 +01:00
Cameron Cawley
6506e59064 ENGINES: Add getMD5Bytes to the base MetaEngineDetection class 2022-11-30 23:29:37 +02:00
Donovan Watteau
97137c29f5 ENGINES: Fix MSVC C4309 enum sign warning 2022-11-29 01:37:55 +01:00
Paul Gilbert
b4be11f553 ENGINES: Added checkExtendedSaves method to AdvancedMetaEngine 2022-11-26 18:44:08 -08:00
Cameron Cawley
2c8a7d3900 ENGINES: Remove support for GUI options in MetaEngineDetection subclasses 2022-11-16 23:58:54 +01:00
Cameron Cawley
fd37e09acb ENGINES: Allow getExtraGuiOptions() to be implemented in MetaEngine subclasses 2022-11-16 23:58:54 +01:00
Eugene Sandulenko
a56c6c487a
AD: Implement sanity checks for detection tables 2022-11-03 21:37:05 +01:00
Orgad Shaneh
aa0c0f494f ENGINES: Pass const strings by reference in AdvancedMetaEngineDetection 2022-10-25 13:55:13 +03:00
Cameron Cawley
fbd379c26b ENGINES: Adjust ADGameFlags to fit the specified range 2022-09-19 01:04:37 +02:00
Donovan Watteau
27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
Cameron Cawley
381f97c516 ENGINES: Mark AdvancedMetaEngineDetection::getExtraGuiOptions as final 2022-07-07 23:46:04 +03:00
athrxx
54af166305 COMMON: (AD) - further reduce output of mass add detection
Follow-up to the feature that allows skipping certain ADGF flags.

This here now also allows skipping of incomplete file/md5/size matches. It is basically the same behavior as the graylist. For the mass add all files are treated as if they are on the list.
2022-06-12 10:12:39 +02:00
athrxx
e01416ef32 COMMON: (AD) - allow mass add to skip targets with certain ADGF flags
I added skipping for the ADGF_WARNING and ADGF_UNSUPPORTED flags.

For me, this is mostly about fixing bug no. 13282. We sometimes have bogus entries which only have the purpose of presenting the error message (reasons for being unsupported) contained in the extra field of the detection entry.
2022-06-12 10:12:39 +02:00
Torbjörn Andersson
e06f3c9a5a GUI: Allow game option checkboxes to be disabled
Depending on other game option checkboxes. This is used to
enable/disable the semi-smooth scrolling checkboxes for FM Towns Loom,
since it's only used when smooth scrolling is enabled.
2022-04-21 11:07:17 +02:00
Eugene Sandulenko
726f187442
JANITORIAL: Fix code formatting 2022-04-06 01:02:11 +02:00
Pragyansh Chaturvedi (r41k0u)
2e656c30d3 BASE: Add --md5-engine flag 2022-04-05 23:08:14 +01:00
trembyle
45a4fa0286 COMMON: Create detector flag for DVDs
This will be used to differentiate from CD releases.
2022-02-18 11:45:53 -05:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko
45b59aa96e
AD: Turn _matchFullPaths into kADFlagMatchFullPaths. Adapted Director and SCI 2021-11-30 23:59:23 +01:00
Eugene Sandulenko
0f3e1bfeb6
AD: Add full path entries' path components to globs
This lets us avoid adding globs to the engines when they're
used only for detection.
2021-11-30 23:59:23 +01:00
Eugene Sandulenko
2564ce272a
AD: Use hashmap for directory globs.
We truly were using quadratic computational complexity for no reason.
2021-11-29 01:50:03 +01:00
Eugene Sandulenko
ccfaf478ab
AD: Make sure that we initialize hashmaps. Unfortunately, this leads to less const'ness 2021-11-29 01:50:03 +01:00
Eugene Sandulenko
55dc78960b
AD: Refactor of graylist check code 2021-11-29 01:50:03 +01:00
Eugene Sandulenko
eef0c2d529
AD: Implement blacklist for detection file names
When only files from the black list are present, we skip
file-based fallback detection for such entries, thus, entries
with 'game.exe', 'install.exe' etc will not generate false
"unknown md5" warnings.

Also, -d0 will report all such entries present in the tables.

Currently, we have 19 entries in AGS, 5 in Director and all 3 entries in ICB
which are violating this rule.
2021-11-27 20:30:28 +01:00
Orgad Shaneh
ee57380de7 ENGINES: JANITORIAL: Remove 'virtual' when override is specified 2021-11-14 14:32:04 +02:00
Eugene Sandulenko
87012cbf21
AD: Added ADGF for calculating md5 from the file tail 2021-10-16 09:24:08 +03:00
Antoniou Athanasios
9fa924c09f
STARK: Detect TLJ Steam version to fix missing bg resource (#3318)
STARK: Detect TLJ Steam version to fix missing bg resource

An alternative fix for bug https://bugs.scummvm.org/ticket/12762 that replaces the previous fix.

This fix will set a flag at detection time (when adding the game to ScummVM)
so that the Steam version will skip trying to load a background image resource
from the exe file (game.exe), since that specific version is missing a valid version
of this resource which leads to an assertion fault.

It wont be necessary to re-add (redetect) the game, if it has already been added before this fix. The current AdvancedDetector implementation takes care of setting the flag at game launch. (As explained by sev) we run detection on every run and returning the relevant detection entry.

The previous fix was this commit which was based only on version info of the exe file:
565a0559ed

That one also works without having to re-add/re-detect the game, but perhaps just checking
version info is not the best approach.
2021-08-29 14:14:29 +03: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
ysj1173886760
7af3a3f84c ENGINES: introduce ADDectedGameExtraInfo to ADGameDetector, add extra info as parameter for fallback detect. 2021-06-13 14:15:45 +02:00