Improved the game entry sanity check for entries with
archive scanning so it no longer assumes an A: prefix in the
md5 sum is unaccompanied by other prefixes.
Cleaned up the functions md5PropToGameFile() and
md5PropToCachePrefix() so they no longer work through
a tree of switches. Both functions have also been changed to
return a Common::String.
AdvancedMetaEngineDetection::detectClashes() now
performs a sanity check for entries with archive members,
making sure their filename schema contains exactly three
elements.
InstallShield V3 archives are a completely different format
and have their own Archive subclass; this commit allows
AdvancedDetector to look inside them. Also moved around
some of the relevant logic and added more comments to
make the code more readable.
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.
Added the A: prefix to detection md5 sums, which is used to
signify that the desired file is embedded within an archive.
Added support for similar prefixes in filenames, which should
look like the following example:
is:data1.cab:file.dat
Where "is" is the identifier for InstallShield archives,
"data1.cab" is the name of the archive container file, and
"file.dat" is the name of the file whose md5 sum will actually
be calculated.
[v]snprintf() / [v]fprintf() used in String::format() gets called
roughly a million times (!) when adding a game.
Reducing the number of calls into libc leads to about 10% speed
improvement on the atari backend (which is counting in seconds!)
- Add title, extra, platform and language to
differentiate b/w different variants of a game
- Create escapeString() func to add backslashes
to strings containing certain special chars
- 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
flags are already out of bit and it makes little sense to polute
it regardless, so this commit is in preparation on having separate flags
on extra ways to hash file.
Files named "PPC" are relatively common for mac games around
the mid-90s (when Apple transitionned from x86 to PPC cpus).
This for example prevent detecting the mac versions of Broken
Sword 1 as unknown director games.