#include <advancedDetector.h>
Public Types | |
typedef Common::HashMap< Common::String, Common::FSNode, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo > | FileMap |
Public Types inherited from MetaEngine | |
enum | MetaEngineFeature { kSupportsListSaves, kSupportsLoadingDuringStartup, kSupportsDeleteSave, kSavesSupportMetaInfo, kSavesSupportThumbnail, kSavesSupportCreationDate, kSavesSupportPlayTime, kSimpleSavesNames, kSavesUseExtendedFormat } |
Public Member Functions | |
virtual Common::Error | createInstance (OSystem *syst, Engine **engine) const override |
virtual bool | createInstance (OSystem *syst, Engine **engine, const ADGameDescription *desc) const =0 |
virtual const char * | getName () const override=0 |
virtual ADDetectedGame | fallbackDetectExtern (uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist) const |
bool | getFilePropertiesExtern (uint md5Bytes, const FileMap &allFiles, const ADGameDescription &game, const Common::String fname, FileProperties &fileProps) const |
Public Member Functions inherited from MetaEngine | |
virtual SaveStateList | listSaves (const char *target) const |
SaveStateList | listSaves (const char *target, bool saveMode) const |
virtual int | getAutosaveSlot () const |
virtual int | getMaximumSaveSlot () const |
virtual void | removeSaveState (const char *target, int slot) const |
virtual SaveStateDescriptor | querySaveMetaInfos (const char *target, int slot) const |
virtual Common::String | getSavegameFile (int saveGameIdx, const char *target=nullptr) const |
Common::String | getSavegameFilePattern (const char *target=nullptr) const |
virtual Common::Array< Common::Keymap * > | initKeymaps (const char *target) const |
virtual const ExtraGuiOptions | getExtraGuiOptions (const Common::String &target) const |
virtual GUI::OptionsContainerWidget * | buildEngineOptionsWidgetDynamic (GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const |
virtual const Common::AchievementsInfo | getAchievementsInfo (const Common::String &target) const |
virtual bool | hasFeature (MetaEngineFeature f) const |
Additional Inherited Members | |
Static Public Member Functions inherited from MetaEngine | |
static void | appendExtendedSave (Common::OutSaveFile *saveFile, uint32 playtime, Common::String desc, bool isAutosave) |
static void | parseSavegameHeader (ExtendedSavegameHeader *header, SaveStateDescriptor *desc) |
static void | fillDummyHeader (ExtendedSavegameHeader *header) |
static WARN_UNUSED_RESULT bool | readSavegameHeader (Common::InSaveFile *in, ExtendedSavegameHeader *header, bool skipThumbnail=true) |
A MetaEngine implementation of AdvancedMetaEngine.
typedef Common::HashMap<Common::String, Common::FSNode, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> AdvancedMetaEngine::FileMap |
A hashmap of files and their MD5 checksums.
|
overridevirtual |
Base createInstance for AdvancedMetaEngine.
The AdvancedMetaEngine provides a default createInstance that is called first, so this should be invoked first. By the time this is called, it is assumed that there is only one plugin engine loaded in memory.
Implements MetaEngine.
|
pure virtual |
A createInstance implementation for subclasses. To be called after the base createInstance function above is called.
|
overridepure virtual |
Return the name of the engine plugin based on the engineID.
The the engineID must match the one from MetaEngine.
Implements MetaEngine.
|
inlinevirtual |
An (optional) generic fallback detection function that is invoked if the regular MD5-based detection failed to detect anything.
To use this, implement the intended fallbackDetectExtern inside the relevant MetaEngineConnect class. Then, override the method "fallbackDetect" inside your MetaEngine class. Finally, provide a "hook" to fetch the relevant MetaEngineConnect class and then use the original detection method.
An example of how this is implemented can be found in the Wintermute Engine.
bool AdvancedMetaEngine::getFilePropertiesExtern | ( | uint | md5Bytes, |
const FileMap & | allFiles, | ||
const ADGameDescription & | game, | ||
const Common::String | fname, | ||
FileProperties & | fileProps | ||
) | const |
Get the properties (size and MD5) of this file.
Based on MetaEngine::getFileProperties.