ScummVM API documentation
TwpMetaEngine Class Reference
Inheritance diagram for TwpMetaEngine:
AdvancedMetaEngine< Twp::TwpGameDescription > AdvancedMetaEngineBase MetaEngine PluginObject

Public Member Functions

const char * getName () const override
 
Common::Error createInstance (OSystem *syst, Engine **engine, const Twp::TwpGameDescription *desc) const override
 
bool hasFeature (MetaEngineFeature f) const override
 
int getMaximumSaveSlot () const override
 
SaveStateDescriptor querySaveMetaInfos (const char *target, int slot) const override
 
void registerDefaultSettings (const Common::String &) const override
 
Common::AchievementsPlatform getAchievementsPlatform (const Common::String &target) const override
 
const Common::AchievementDescriptionListgetAchievementDescriptionList () const override
 
GUI::OptionsContainerWidgetbuildEngineOptionsWidget (GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override
 
Common::Array< Common::Keymap * > initKeymaps (const char *target) const override
 
void getSavegameThumbnail (Graphics::Surface &thumb) override
 
- Public Member Functions inherited from AdvancedMetaEngineBase
Common::Error createInstance (OSystem *syst, Engine **engine, const DetectedGame &gameDescriptor, const void *metaEngineDescriptor) override
 
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 SaveStateList listSaves (const char *target) const
 
SaveStateList listSaves (const char *target, bool saveMode) const
 
virtual int getAutosaveSlot () const
 
virtual bool removeSaveState (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 const Common::AchievementsInfo getAchievementsInfo (const Common::String &target) 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)
 

Additional Inherited Members

- Public Types inherited from AdvancedMetaEngineBase
typedef Common::HashMap< Common::Path, Common::FSNode, Common::Path::IgnoreCase_Hash, Common::Path::IgnoreCase_EqualToFileMap
 
- Public Types inherited from MetaEngine
enum  MetaEngineFeature {
  kSupportsListSaves, kSupportsLoadingDuringStartup, kSupportsDeleteSave, kSavesSupportMetaInfo,
  kSavesSupportThumbnail, kSavesSupportCreationDate, kSavesSupportPlayTime, kSimpleSavesNames,
  kSavesUseExtendedFormat
}
 
- 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)
 
- Protected Member Functions inherited from AdvancedMetaEngine< Twp::TwpGameDescription >
Common::Error createInstance (OSystem *syst, Engine **engine, const void *desc) const override final
 
void deleteInstance (Engine *engine, const DetectedGame &gameDescriptor, const void *meDescriptor) override
 
- Protected Member Functions inherited from AdvancedMetaEngineBase
const ExtraGuiOptions getExtraGuiOptions (const Common::String &target) const override final
 
virtual const ADExtraGuiOptionsMapgetAdvancedExtraGuiOptions () const
 
bool checkExtendedSaves (MetaEngineFeature f) const
 
- Protected Member Functions inherited from MetaEngine
int findEmptySaveSlot (const char *target)
 

Member Function Documentation

◆ getName()

const char* TwpMetaEngine::getName ( ) const
overridevirtual

Return the name of the engine plugin based on the engineID.

The engineID must match the one from MetaEngine.

See also
MetaEngine::getName().

Implements AdvancedMetaEngineBase.

◆ hasFeature()

bool TwpMetaEngine::hasFeature ( MetaEngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified MetaEngine feature.

Used by e.g. the launcher to determine whether to enable the Load button.

Reimplemented from MetaEngine.

◆ getMaximumSaveSlot()

int TwpMetaEngine::getMaximumSaveSlot ( ) const
overridevirtual

Return the maximum number of save slots that the engine supports.

Note
MetaEngines must indicate that this function has been implemented via the kSupportsListSaves feature flag.

The default implementation limits the save slots to zero (0).

Returns
Maximum save slot number supported.

Reimplemented from MetaEngine.

◆ querySaveMetaInfos()

SaveStateDescriptor TwpMetaEngine::querySaveMetaInfos ( const char *  target,
int  slot 
) const
overridevirtual

Return meta information from the specified save state.

Depending on the MetaEngineFeatures set, this can include thumbnails, save date and time, play time.

Parameters
targetName of a config manager target.
slotSlot number of the save state.

Reimplemented from MetaEngine.

◆ registerDefaultSettings()

void TwpMetaEngine::registerDefaultSettings ( const Common::String target) const
overridevirtual

Register the default values for the settings that the engine uses into the configuration manager.

Parameters
targetName of a config manager target.

Reimplemented from MetaEngine.

◆ getAchievementsPlatform()

Common::AchievementsPlatform TwpMetaEngine::getAchievementsPlatform ( const Common::String target) const
overridevirtual

Return the achievements platform to use for the specified target.

Parameters
targetName of a config manager target.
Returns
The achievements platform to use for an engine plugin and target.

Reimplemented from MetaEngine.

◆ getAchievementDescriptionList()

const Common::AchievementDescriptionList* TwpMetaEngine::getAchievementDescriptionList ( ) const
overridevirtual

Return the achievement descriptions.

Note
The default implementation returns nullptr
Returns
a list of achievement descriptions for an engine.

Reimplemented from MetaEngine.

◆ buildEngineOptionsWidget()

GUI::OptionsContainerWidget* TwpMetaEngine::buildEngineOptionsWidget ( GUI::GuiObject boss,
const Common::String name,
const Common::String target 
) const
overridevirtual

Return a GUI widget container for configuring the specified target options.

Engines can build custom option dialogs from here.

Engines that don't have an Engine tab in the Edit Game dialog, or that use ExtraGuiOptions in MetaEngineDetection can return nullptr.

Parameters
bossThe widget or dialog that the returned widget is a child of.
nameThe name that the returned widget must use.
targetName of a config manager target.

Reimplemented from MetaEngine.

◆ initKeymaps()

Common::Array<Common::Keymap *> TwpMetaEngine::initKeymaps ( const char *  target) const
overridevirtual

Return the keymap used by the target.

Reimplemented from MetaEngine.

◆ getSavegameThumbnail()

void TwpMetaEngine::getSavegameThumbnail ( Graphics::Surface thumb)
overridevirtual

Convert the current screen contents to a thumbnail. Can be overriden by individual engine meta engines to provide their own thumb, such as hiding any on-screen save dialog so that it won't appear in the thumbnail.

Reimplemented from MetaEngine.


The documentation for this class was generated from the following file: