Open main menu

Difference between revisions of "Advanced Detector"

2,239 bytes added ,  00:45, 29 February 2012
More content.
(Even more content)
(More content.)
Line 207: Line 207:
};
};
</syntax>
</syntax>
== AdvancedMetaEngine ==
Is a generic MetaEngine wrapper aware of Advanced Detector. It should be used whenever AD is used.
=== Engine constructor ===
<syntax type="C++">
AdvancedMetaEngine(const void *descs, uint descItemSize, const PlainGameDescriptor *gameids);
</code>
'''descs''' is pointed to list ''ADGameDescription'' structures, or their supersets.
'''descItemSize''' is sizeof of the '''descs''' element used for iterating over it.
'''gameids''' is pointed to list of ''PlainGameDescriptor'' structures defining supported gameids.
=== Additional Advanced MetaEngine parameters ===
'''_md5bytes''' -- number of bytes used to compute md5. If set to 0 then whole file will be used. Beware of long files though since that can dramatically slow down the detection. Typically sane value is 5000 bytes, but often experiment is required for many game variants with subtle differences.
'''_singleid''' -- Used to override gameid. A recommended setting to prevent global gameid pollution. With this option set, the gameid effectively turns into engineid.
In the past we started to have clashes in game names, thus the option was introduced. Also it was mentioned that in the ideal world it should be enough to point just the game directory and ScummVM correctly detects and runs the game. This is a step towards this direction, however there are several cases when it is not possible to identify the game to run, particularly in those cases when there are more than single game stored in a directory.
'''_flags''' -- same as individual game flags but user for engine-wide settings. For instance, we know for sure that all games in the engine are unstable, so instead of modifying every game entry, we specify it here.
'''_guioptions''' -- same as individual GUI options, but applied engine-wide. For example, when none of the games have speech, we may specify it in this spot.
'''_maxScanDepth''' -- Maximum traversal depth for directories. Default is 1, that is do not go inside of subdirectories for detection.
'''_directoryGlobs''' -- Case-insesitive list of nested directoriy globs AD will search games in. Null-terminated. Must be set if detection should go into subdirectories.
=== AdvancedMetaEngine usage ===
TODO