23 #ifndef ENGINES_ADVANCED_DETECTOR_H 24 #define ENGINES_ADVANCED_DETECTOR_H 26 #include "engines/metaengine.h" 27 #include "engines/engine.h" 29 #include "common/hash-str.h" 31 #include "common/gui_options.h" 62 #define AD_LISTEND {NULL, 0, NULL, 0} 68 #define AD_ENTRY1(f, x) {{ f, 0, x, -1}, AD_LISTEND} 74 #define AD_ENTRY1s(f, x, s) {{ f, 0, x, s}, AD_LISTEND} 177 #define AD_TABLE_END_MARKER \ 178 { NULL, NULL, { { NULL, 0, NULL, 0 } }, Common::UNK_LANG, Common::kPlatformUnknown, ADGF_NO_FLAGS, GUIO0() } 191 const char *filenames[10];
219 #define AD_EXTRA_GUI_OPTIONS_TERMINATOR { 0, { 0, 0, 0, 0 } } 337 DetectedGames detectGames(
const Common::FSList &fslist)
const override;
345 Common::Error createInstance(OSystem *syst,
Engine **engine)
const;
361 virtual const ExtraGuiOptions getExtraGuiOptions(
const Common::String &target)
const override;
367 typedef Common::HashMap<Common::String, Common::FSNode, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo>
FileMap;
395 virtual ADDetectedGames detectGame(
const Common::FSNode &parent,
const FileMap &allFiles, Common::Language language, Common::Platform platform,
const Common::String &extra)
const;
415 void composeFileHashMap(FileMap &allFiles,
const Common::FSList &fslist,
int depth,
const Common::String &parentName = Common::String())
const;
424 friend class FileMapArchive;
440 virtual Common::Error createInstance(OSystem *syst,
Engine **engine)
const override;
455 virtual const char *getName()
const override = 0;
461 typedef Common::HashMap<Common::String, Common::FSNode, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo>
FileMap;
485 bool getFilePropertiesExtern(uint md5Bytes,
const FileMap &allFiles,
const ADGameDescription &game,
const Common::String fname,
FileProperties &fileProps)
const;
Add "-remastered' to gameid.
Definition: advancedDetector.h:81
const char * md5
MD5 of (the beginning of) the described file. Optional. Set to NULL to ignore.
Definition: advancedDetector.h:54
Common::Array< ADDetectedGame > ADDetectedGames
Definition: advancedDetector.h:171
const char * extra
Definition: advancedDetector.h:117
Definition: advancedDetector.h:100
int32 fileSize
Size of the described file. Set to -1 to ignore.
Definition: advancedDetector.h:55
const ADGameDescription * desc
Definition: advancedDetector.h:161
const char * fileName
Name of the described file.
Definition: advancedDetector.h:52
const ADGameDescription * desc
Definition: advancedDetector.h:185
const char * gameId
Definition: advancedDetector.h:106
Flag to designate not yet officially supported games that are fit for public testing.
Definition: advancedDetector.h:84
ADDetectedGame(const ADGameDescription *d)
Definition: advancedDetector.h:167
Do not add platform to gameid.
Definition: advancedDetector.h:92
uint16 fileType
Optional. Not used during detection, only by engines.
Definition: advancedDetector.h:53
bool hasUnknownFiles
Definition: advancedDetector.h:159
uint32 flags
Definition: advancedDetector.h:143
ADFlags
Definition: advancedDetector.h:195
Add "-demo" to gameid.
Definition: advancedDetector.h:94
Calculate the MD5 for this entry from the resource fork.
Definition: advancedDetector.h:89
Common::Language language
Definition: advancedDetector.h:130
Flag to designate not yet officially supported games that are not fit for public testing.
Definition: advancedDetector.h:83
Definition: advancedDetector.h:33
Do not add language to gameid.
Definition: advancedDetector.h:91
const char * guiOptions
Definition: advancedDetector.h:152
Add "-cd" to gameid.
Definition: advancedDetector.h:93
Definition: advancedDetector.h:158
Common::Array< DetectedGame > DetectedGames
Definition: game.h:203
Flag to designate well-known pirated versions with cracks.
Definition: advancedDetector.h:85
Definition: advancedDetector.h:180
Definition: advancedDetector.h:86
No flags.
Definition: advancedDetector.h:80
Automatically generate gameid from ADGameDescription::extra.
Definition: advancedDetector.h:82
Common::HashMap< Common::String, FileProperties, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo > FilePropertiesMap
Definition: game.h:115
Use ADGameDescription::extra as the main game title, not gameid.
Definition: advancedDetector.h:90
FilePropertiesMap matchedFiles
Definition: advancedDetector.h:160
Common::Platform platform
Definition: advancedDetector.h:135
Definition: advancedDetector.h:206
ADGameFlags
Definition: advancedDetector.h:79
Always add English as a language option.
Definition: advancedDetector.h:88
Definition: advancedDetector.h:51