#include <advancedDetector.h>
Public Types | |
typedef Common::HashMap< Common::Path, Common::FSNode, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo > | FileMap |
Public Types inherited from MetaEngine | |
enum | MetaEngineFeature { kSupportsListSaves, kSupportsLoadingDuringStartup, kSupportsDeleteSave, kSavesSupportMetaInfo, kSavesSupportThumbnail, kSavesSupportCreationDate, kSavesSupportPlayTime, kSimpleSavesNames, kSavesUseExtendedFormat } |
Public Member Functions | |
Common::Error | createInstance (OSystem *syst, Engine **engine, const DetectedGame &gameDescriptor, const void *metaEngineDescriptor) override |
virtual Common::Error | createInstance (OSystem *syst, Engine **engine, const void *desc) const =0 |
const char * | getName () const override=0 |
virtual ADDetectedGame | fallbackDetectExtern (uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra=nullptr) const |
bool | getFilePropertiesExtern (uint md5Bytes, const FileMap &allFiles, MD5Properties md5prop, const Common::Path &fname, FileProperties &fileProps) const |
Public Member Functions inherited from MetaEngine | |
virtual void | deleteInstance (Engine *engine, const DetectedGame &gameDescriptor, const void *meDescriptor) |
virtual SaveStateList | listSaves (const char *target) const |
SaveStateList | listSaves (const char *target, bool saveMode) const |
virtual int | getAutosaveSlot () const |
virtual int | getMaximumSaveSlot () const |
virtual bool | 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 void | registerDefaultSettings (const Common::String &target) const |
virtual GUI::OptionsContainerWidget * | buildEngineOptionsWidget (GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const |
virtual Common::AchievementsPlatform | getAchievementsPlatform (const Common::String &target) const |
virtual const Common::AchievementsInfo | getAchievementsInfo (const Common::String &target) const |
virtual const Common::AchievementDescriptionList * | getAchievementDescriptionList () const |
virtual bool | hasFeature (MetaEngineFeature f) const |
void | appendExtendedSave (Common::OutSaveFile *saveFile, uint32 playtime, Common::String desc, bool isAutosave) |
void | appendExtendedSaveToStream (Common::WriteStream *saveFile, uint32 playtime, Common::String desc, bool isAutosave, uint32 offset=0) |
bool | copySaveFileToFreeSlot (const char *target, int slot) |
Protected Member Functions | |
const ExtraGuiOptions | getExtraGuiOptions (const Common::String &target) const override final |
virtual const ADExtraGuiOptionsMap * | getAdvancedExtraGuiOptions () const |
bool | checkExtendedSaves (MetaEngineFeature f) const |
Protected Member Functions inherited from MetaEngine | |
virtual void | getSavegameThumbnail (Graphics::Surface &thumb) |
int | findEmptySaveSlot (const char *target) |
Additional Inherited Members | |
Static Public Member Functions inherited from MetaEngine | |
static void | parseSavegameHeader (ExtendedSavegameHeader *header, SaveStateDescriptor *desc) |
static void | fillDummyHeader (ExtendedSavegameHeader *header) |
static void | decodeSavegameDate (const ExtendedSavegameHeader *header, uint16 &outYear, uint8 &outMonth, uint8 &outDay) |
static void | decodeSavegameTime (const ExtendedSavegameHeader *header, uint8 &outHour, uint8 &outMinute) |
static WARN_UNUSED_RESULT bool | readSavegameHeader (Common::InSaveFile *in, ExtendedSavegameHeader *header, bool skipThumbnail=true) |
A MetaEngine implementation of AdvancedMetaEngine.
typedef Common::HashMap<Common::Path, Common::FSNode, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualTo> AdvancedMetaEngineBase::FileMap |
A hashmap of file paths and their file system nodes.
|
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.
Implemented in AdvancedMetaEngine< Descriptor >, AdvancedMetaEngine< ADGameDescription >, AdvancedMetaEngine< Twp::TwpGameDescription >, AdvancedMetaEngine< M4::M4GameDescription >, AdvancedMetaEngine< Ultima::UltimaGameDescription >, and AdvancedMetaEngine< AGS::AGSGameDescription >.
|
overridepure virtual |
Return the name of the engine plugin based on the engineID.
The engineID must match the one from MetaEngine.
Implements MetaEngine.
Implemented in M4MetaEngine, UltimaMetaEngine, BagelMetaEngine, TetraedgeMetaEngine, AGSMetaEngine, ImmortalMetaEngine, CrabMetaEngine, QDEngineMetaEngine, DarkseedMetaEngine, Hpl1MetaEngine, and TwpMetaEngine.
|
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 MetaEngine class. Then, override the method "fallbackDetect" inside your MetaEngine class. Finally, provide a "hook" to fetch the relevant MetaEngine class and then use the original detection method.
An example of how this is implemented can be found in the Wintermute Engine.
bool AdvancedMetaEngineBase::getFilePropertiesExtern | ( | uint | md5Bytes, |
const FileMap & | allFiles, | ||
MD5Properties | md5prop, | ||
const Common::Path & | fname, | ||
FileProperties & | fileProps | ||
) | const |
Get the properties (size and MD5) of this file.
Based on MetaEngine::getFileProperties.
|
finaloverrideprotectedvirtual |
Return a list of extra GUI options for the specified target.
If no target is specified, all of the available custom GUI options are returned for the plugin (used to set default values).
Currently, this only supports options with checkboxes.
The default implementation returns an empty list.
target | Name of a config manager target. |
Reimplemented from MetaEngine.
|
inlineprotectedvirtual |
Returns a map containing all the extra game GUI options the engine supports.
Reimplemented in M4MetaEngine, BagelMetaEngine, CrabMetaEngine, DarkseedMetaEngine, TetraedgeMetaEngine, and UltimaMetaEngine.
|
protected |
Returns the set of features that need to be enabled for the extended save format to work