JANITORIAL: Remove obselete references to MetaEngineConnect
At some point when splitting the MetaEngine to a detection plugin and a static meta engine, the former was called MetaEngine while the latter was called MetaEngineConnect. Thus was then later change to MetaEngineDetection and MetaEngine. But some references were left to the former names in comments and documentation.
This commit is contained in:
parent
5e55ff8f0d
commit
67720ef658
6 changed files with 30 additions and 32 deletions
|
@ -181,17 +181,17 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
|
|||
err = Common::kPathNotDirectory;
|
||||
}
|
||||
|
||||
// Create the game's MetaEngine.
|
||||
const MetaEngineDetection &metaEngine = plugin->get<MetaEngineDetection>();
|
||||
// Create the game's MetaEngineDetection.
|
||||
const MetaEngineDetection &metaEngineDetection = plugin->get<MetaEngineDetection>();
|
||||
if (err.getCode() == Common::kNoError) {
|
||||
// Set default values for all of the custom engine options
|
||||
// Apparently some engines query them in their constructor, thus we
|
||||
// need to set this up before instance creation.
|
||||
metaEngine.registerDefaultSettings(target);
|
||||
metaEngineDetection.registerDefaultSettings(target);
|
||||
}
|
||||
|
||||
// Right now we have a MetaEngine plugin. We must find the matching engine plugin to
|
||||
// call createInstance and other connecting functions.
|
||||
// Right now we have a MetaEngineDetection plugin. We must find the matching
|
||||
// engine plugin to call createInstance and other connecting functions.
|
||||
Plugin *enginePluginToLaunchGame = PluginMan.getEngineFromMetaEngine(plugin);
|
||||
|
||||
if (!enginePluginToLaunchGame) {
|
||||
|
@ -199,9 +199,9 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
|
|||
return err;
|
||||
}
|
||||
|
||||
// Create the game's MetaEngineConnect.
|
||||
const MetaEngine &metaEngineConnect = enginePluginToLaunchGame->get<MetaEngine>();
|
||||
err = metaEngineConnect.createInstance(&system, &engine);
|
||||
// Create the game's MetaEngine.
|
||||
const MetaEngine &metaEngine = enginePluginToLaunchGame->get<MetaEngine>();
|
||||
err = metaEngine.createInstance(&system, &engine);
|
||||
|
||||
// Check for errors
|
||||
if (!engine || err.getCode() != Common::kNoError) {
|
||||
|
@ -229,7 +229,7 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
|
|||
Common::String caption(ConfMan.get("description"));
|
||||
|
||||
if (caption.empty()) {
|
||||
PlainGameDescriptor game = metaEngine.findGame(ConfMan.get("gameid").c_str());
|
||||
PlainGameDescriptor game = metaEngineDetection.findGame(ConfMan.get("gameid").c_str());
|
||||
if (game.description) {
|
||||
caption = game.description;
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
|
|||
#endif // USE_TRANSLATION
|
||||
|
||||
// Initialize any game-specific keymaps
|
||||
Common::KeymapArray gameKeymaps = metaEngineConnect.initKeymaps(target.c_str());
|
||||
Common::KeymapArray gameKeymaps = metaEngine.initKeymaps(target.c_str());
|
||||
Common::Keymapper *keymapper = system.getEventManager()->getKeymapper();
|
||||
for (uint i = 0; i < gameKeymaps.size(); i++) {
|
||||
keymapper->addGameKeymap(gameKeymaps[i]);
|
||||
|
|
|
@ -455,7 +455,7 @@ public:
|
|||
*
|
||||
* The the engineID must match the one from MetaEngine.
|
||||
*
|
||||
* @see MetaEngineConnect::getName().
|
||||
* @see MetaEngine::getName().
|
||||
*/
|
||||
virtual const char *getName() const override = 0;
|
||||
|
||||
|
@ -471,9 +471,9 @@ public:
|
|||
|
||||
* @note This is only meant to be used if fallback detection heavily depends on engine resources.
|
||||
*
|
||||
* To use this, implement the intended fallbackDetectExtern inside the relevant MetaEngineConnect class.
|
||||
* 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 MetaEngineConnect class and then use the original detection
|
||||
* 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.
|
||||
|
|
|
@ -261,7 +261,7 @@ WARN_UNUSED_RESULT bool MetaEngine::readSavegameHeader(Common::InSaveFile *in, E
|
|||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// MetaEngineConnect default implementations
|
||||
// MetaEngine default implementations
|
||||
//////////////////////////////////////////////
|
||||
|
||||
SaveStateList MetaEngine::listSaves(const char *target) const {
|
||||
|
|
|
@ -117,8 +117,7 @@ struct ExtendedSavegameHeader {
|
|||
*
|
||||
* Every engine "plugin" provides a hook to get an instance of a MetaEngineDetection
|
||||
* subclass for that "engine plugin". For example, SCUMM provides ScummMetaEngineDetection.
|
||||
* This is then in turn used by the frontend code to detect games,
|
||||
* and other useful functionality.
|
||||
* This is then in turn used by the frontend code to detect games, and other useful functionality.
|
||||
*
|
||||
* To instantiate actual Engine objects, see the class @ref MetaEngine.
|
||||
*/
|
||||
|
@ -189,8 +188,7 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* A MetaEngine is another factory for Engine instances, and is very
|
||||
* similar to meta engines.
|
||||
* A MetaEngine is another factory for Engine instances, and is very similar to MetaEngineDetection.
|
||||
*
|
||||
* This class, however, is made of of bridged functionalities that can be used to connect
|
||||
* an actual Engine with a MetaEngine. Every engine "plugin" provides a hook to get an instance
|
||||
|
@ -213,12 +211,12 @@ public:
|
|||
/**
|
||||
* Name of the engine plugin.
|
||||
*
|
||||
* Classes inheriting a MetaEngineConnect must provide an engineID here,
|
||||
* Classes inheriting a MetaEngine must provide an engineID here,
|
||||
* which can then be used to match an Engine with MetaEngine.
|
||||
*
|
||||
* For example, ScummMetaEngine inherits MetaEngine and provides a engineID of "Scumm".
|
||||
* ScummMetaEngineConnect inherits MetaEngineConnect and provides the name "Scumm".
|
||||
* This way, an Engine can be easily matched with a MetaEngine.
|
||||
* For example, ScummMetaEngineDetection inherits MetaEngineDetection and provides a
|
||||
* engineID of "scumm". ScummMetaEngine inherits MetaEngine and provides the name
|
||||
* "Scumm". This way, an Engine can be easily matched with a MetaEngine.
|
||||
*/
|
||||
virtual const char *getName() const = 0;
|
||||
|
||||
|
@ -356,8 +354,8 @@ public:
|
|||
* Engines can build custom option dialogs from here, but by default a simple widget
|
||||
* allowing to configure the extra GUI options is used.
|
||||
*
|
||||
* The engine that builds the Engines tab in the Edit Game dialog uses a MetaEngine.
|
||||
* The engine that specifies a custom dialog when a game is running uses a MetaEngineConnect.
|
||||
* The engine that builds the Engines tab in the Edit Game dialog uses a MetaEngineDetection.
|
||||
* The engine that specifies a custom dialog when a game is running uses a MetaEngine.
|
||||
*
|
||||
* Engines are not supposed to have an Engine tab in the Edit Game dialog
|
||||
* can return nullptr.
|
||||
|
|
|
@ -185,9 +185,9 @@ EditGameDialog::EditGameDialog(const String &domain)
|
|||
if (metaEnginePlugin) {
|
||||
int tabId = tab->addTab(_("Engine"), "GameOptions_Engine");
|
||||
|
||||
const MetaEngineDetection &metaEngine = metaEnginePlugin->get<MetaEngineDetection>();
|
||||
metaEngine.registerDefaultSettings(_domain);
|
||||
_engineOptions = metaEngine.buildEngineOptionsWidgetStatic(tab, "GameOptions_Engine.Container", _domain);
|
||||
const MetaEngineDetection &metaEngineDetection = metaEnginePlugin->get<MetaEngineDetection>();
|
||||
metaEngineDetection.registerDefaultSettings(_domain);
|
||||
_engineOptions = metaEngineDetection.buildEngineOptionsWidgetStatic(tab, "GameOptions_Engine.Container", _domain);
|
||||
|
||||
if (_engineOptions) {
|
||||
_engineOptions->setParentDialog(this);
|
||||
|
@ -354,8 +354,8 @@ EditGameDialog::EditGameDialog(const String &domain)
|
|||
// 9) The Achievements tab
|
||||
//
|
||||
if (enginePlugin) {
|
||||
const MetaEngine &metaEngineConnect = enginePlugin->get<MetaEngine>();
|
||||
Common::AchievementsInfo achievementsInfo = metaEngineConnect.getAchievementsInfo(domain);
|
||||
const MetaEngine &metaEngine = enginePlugin->get<MetaEngine>();
|
||||
Common::AchievementsInfo achievementsInfo = metaEngine.getAchievementsInfo(domain);
|
||||
if (achievementsInfo.descriptions.size() > 0) {
|
||||
tab->addTab(_("Achievements"), "GameOptions_Achievements");
|
||||
addAchievementsControls(tab, "GameOptions_Achievements.", achievementsInfo);
|
||||
|
|
|
@ -495,9 +495,9 @@ void LauncherDialog::loadGame(int item) {
|
|||
}
|
||||
|
||||
if (enginePlugin) {
|
||||
const MetaEngine &metaEngineConnect = enginePlugin->get<MetaEngine>();
|
||||
if (metaEngineConnect.hasFeature(MetaEngine::kSupportsListSaves) &&
|
||||
metaEngineConnect.hasFeature(MetaEngine::kSupportsLoadingDuringStartup)) {
|
||||
const MetaEngine &metaEngine = enginePlugin->get<MetaEngine>();
|
||||
if (metaEngine.hasFeature(MetaEngine::kSupportsListSaves) &&
|
||||
metaEngine.hasFeature(MetaEngine::kSupportsLoadingDuringStartup)) {
|
||||
int slot = _loadDialog->runModalWithPluginAndTarget(enginePlugin, target);
|
||||
if (slot >= 0) {
|
||||
ConfMan.setActiveDomain(_domains[item]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue