Fixed some code formatting thanks to LordHoto
svn-id: r32275
This commit is contained in:
parent
6ef8e5238b
commit
2862a30dac
6 changed files with 18 additions and 18 deletions
|
@ -564,8 +564,8 @@ static void listGames() {
|
||||||
printf("Game ID Full Title \n"
|
printf("Game ID Full Title \n"
|
||||||
"-------------------- ------------------------------------------------------\n");
|
"-------------------- ------------------------------------------------------\n");
|
||||||
|
|
||||||
const EnginePlugin::list &plugins = EngineMan.getPlugins();
|
const EnginePlugin::List &plugins = EngineMan.getPlugins();
|
||||||
EnginePlugin::list::const_iterator iter = plugins.begin();
|
EnginePlugin::List::const_iterator iter = plugins.begin();
|
||||||
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
|
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
|
||||||
GameList list = (**iter)->getSupportedGames();
|
GameList list = (**iter)->getSupportedGames();
|
||||||
for (GameList::iterator v = list.begin(); v != list.end(); ++v) {
|
for (GameList::iterator v = list.begin(); v != list.end(); ++v) {
|
||||||
|
|
|
@ -284,7 +284,7 @@ void PluginManager::loadPlugins() {
|
||||||
for (ProviderList::iterator pp = _providers.begin();
|
for (ProviderList::iterator pp = _providers.begin();
|
||||||
pp != _providers.end();
|
pp != _providers.end();
|
||||||
++pp) {
|
++pp) {
|
||||||
PluginList pl((**pp).getPlugins());
|
PluginList pl((*pp)->getPlugins());
|
||||||
for (PluginList::iterator plugin = pl.begin(); plugin != pl.end(); ++plugin) {
|
for (PluginList::iterator plugin = pl.begin(); plugin != pl.end(); ++plugin) {
|
||||||
tryLoadPlugin(*plugin);
|
tryLoadPlugin(*plugin);
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ void PluginManager::unloadPluginsExcept(PluginType type, const Plugin *plugin) {
|
||||||
if (*p == plugin) {
|
if (*p == plugin) {
|
||||||
found = *p;
|
found = *p;
|
||||||
} else {
|
} else {
|
||||||
(**p).unloadPlugin();
|
(*p)->unloadPlugin();
|
||||||
delete *p;
|
delete *p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -355,13 +355,13 @@ DECLARE_SINGLETON(EngineManager);
|
||||||
|
|
||||||
GameDescriptor EngineManager::findGame(const Common::String &gameName, const EnginePlugin **plugin) const {
|
GameDescriptor EngineManager::findGame(const Common::String &gameName, const EnginePlugin **plugin) const {
|
||||||
// Find the GameDescriptor for this target
|
// Find the GameDescriptor for this target
|
||||||
const EnginePlugin::list &plugins = getPlugins();
|
const EnginePlugin::List &plugins = getPlugins();
|
||||||
GameDescriptor result;
|
GameDescriptor result;
|
||||||
|
|
||||||
if (plugin)
|
if (plugin)
|
||||||
*plugin = 0;
|
*plugin = 0;
|
||||||
|
|
||||||
EnginePlugin::list::const_iterator iter = plugins.begin();
|
EnginePlugin::List::const_iterator iter = plugins.begin();
|
||||||
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
|
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
|
||||||
result = (**iter)->findGame(gameName.c_str());
|
result = (**iter)->findGame(gameName.c_str());
|
||||||
if (!result.gameid().empty()) {
|
if (!result.gameid().empty()) {
|
||||||
|
@ -376,11 +376,11 @@ GameDescriptor EngineManager::findGame(const Common::String &gameName, const Eng
|
||||||
GameList EngineManager::detectGames(const FSList &fslist) const {
|
GameList EngineManager::detectGames(const FSList &fslist) const {
|
||||||
GameList candidates;
|
GameList candidates;
|
||||||
|
|
||||||
const EnginePlugin::list &plugins = getPlugins();
|
const EnginePlugin::List &plugins = getPlugins();
|
||||||
|
|
||||||
// Iterate over all known games and for each check if it might be
|
// Iterate over all known games and for each check if it might be
|
||||||
// the game in the presented directory.
|
// the game in the presented directory.
|
||||||
EnginePlugin::list::const_iterator iter;
|
EnginePlugin::List::const_iterator iter;
|
||||||
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
|
for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
|
||||||
candidates.push_back((**iter)->detectGames(fslist));
|
candidates.push_back((**iter)->detectGames(fslist));
|
||||||
}
|
}
|
||||||
|
@ -388,8 +388,8 @@ GameList EngineManager::detectGames(const FSList &fslist) const {
|
||||||
return candidates;
|
return candidates;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EnginePlugin::list &EngineManager::getPlugins() const {
|
const EnginePlugin::List &EngineManager::getPlugins() const {
|
||||||
return (const EnginePlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE);
|
return (const EnginePlugin::List &)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -399,6 +399,6 @@ const EnginePlugin::list &EngineManager::getPlugins() const {
|
||||||
|
|
||||||
DECLARE_SINGLETON(MidiManager);
|
DECLARE_SINGLETON(MidiManager);
|
||||||
|
|
||||||
const MidiPlugin::list &MidiManager::getPlugins() const {
|
const MidiPlugin::List &MidiManager::getPlugins() const {
|
||||||
return (const MidiPlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_MIDI);
|
return (const MidiPlugin::List &)PluginManager::instance().getPlugins(PLUGIN_TYPE_MIDI);
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ public:
|
||||||
return (PO_t *)_pluginObject;
|
return (PO_t *)_pluginObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef Common::Array<PluginSubclass *> list;
|
typedef Common::Array<PluginSubclass *> List;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -246,7 +246,7 @@ protected:
|
||||||
* @param filename the name of the loadable code module
|
* @param filename the name of the loadable code module
|
||||||
* @return a pointer to a Plugin instance, or 0 if an error occurred.
|
* @return a pointer to a Plugin instance, or 0 if an error occurred.
|
||||||
*/
|
*/
|
||||||
virtual Plugin* createPlugin(const Common::String &filename) const = 0;
|
virtual Plugin *createPlugin(const Common::String &filename) const = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the supplied filename corresponds to a loadable plugin file in
|
* Check if the supplied filename corresponds to a loadable plugin file in
|
||||||
|
|
|
@ -108,7 +108,7 @@ private:
|
||||||
public:
|
public:
|
||||||
GameDescriptor findGame(const Common::String &gameName, const EnginePlugin **plugin = NULL) const;
|
GameDescriptor findGame(const Common::String &gameName, const EnginePlugin **plugin = NULL) const;
|
||||||
GameList detectGames(const FSList &fslist) const;
|
GameList detectGames(const FSList &fslist) const;
|
||||||
const EnginePlugin::list &getPlugins() const;
|
const EnginePlugin::List &getPlugins() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Convenience shortcut for accessing the engine manager. */
|
/** Convenience shortcut for accessing the engine manager. */
|
||||||
|
|
|
@ -128,8 +128,8 @@ AboutDialog::AboutDialog()
|
||||||
_lines.push_back("");
|
_lines.push_back("");
|
||||||
|
|
||||||
addLine("\\C\\c1""Available engines:");
|
addLine("\\C\\c1""Available engines:");
|
||||||
const EnginePlugin::list &plugins = EngineMan.getPlugins();
|
const EnginePlugin::List &plugins = EngineMan.getPlugins();
|
||||||
EnginePlugin::list::const_iterator iter = plugins.begin();
|
EnginePlugin::List::const_iterator iter = plugins.begin();
|
||||||
for (; iter != plugins.end(); ++iter) {
|
for (; iter != plugins.end(); ++iter) {
|
||||||
Common::String str;
|
Common::String str;
|
||||||
str = "\\C";
|
str = "\\C";
|
||||||
|
|
|
@ -84,7 +84,7 @@ private:
|
||||||
friend class Common::Singleton<SingletonBaseType>;
|
friend class Common::Singleton<SingletonBaseType>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const MidiPlugin::list &getPlugins() const;
|
const MidiPlugin::List &getPlugins() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Convenience shortcut for accessing the MIDI manager. */
|
/** Convenience shortcut for accessing the MIDI manager. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue