diff options
author | Jordi Vilalta Prat | 2008-05-12 00:26:29 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2008-05-12 00:26:29 +0000 |
commit | 2c9968fe80c4ba78f895c9bac757dd6b1604ccce (patch) | |
tree | 863d7b8e84b7ba511b2880ba95e0e8010db79841 /base/main.cpp | |
parent | bb035967442df0f9cb7de3e3da3d73ce2f4ce5d2 (diff) | |
download | scummvm-rg350-2c9968fe80c4ba78f895c9bac757dd6b1604ccce.tar.gz scummvm-rg350-2c9968fe80c4ba78f895c9bac757dd6b1604ccce.tar.bz2 scummvm-rg350-2c9968fe80c4ba78f895c9bac757dd6b1604ccce.zip |
- Added an engine plugin manager and moved engine specific functionality into it
- base/plugins.* reorganization
svn-id: r32045
Diffstat (limited to 'base/main.cpp')
-rw-r--r-- | base/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/main.cpp b/base/main.cpp index 9129fcc7e1..80f77f89ab 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -77,8 +77,8 @@ static bool launcherDialog(OSystem &system) { return (dlg.runModal() != -1); } -static const Plugin *detectPlugin() { - const Plugin *plugin = 0; +static const EnginePlugin *detectPlugin() { + const EnginePlugin *plugin = 0; // Make sure the gameid is set in the config manager, and that it is lowercase. Common::String gameid(ConfMan.getActiveDomainName()); @@ -90,7 +90,7 @@ static const Plugin *detectPlugin() { // Query the plugins and find one that will handle the specified gameid printf("Looking for %s\n", gameid.c_str()); - GameDescriptor game = Base::findGame(gameid, &plugin); + GameDescriptor game = EngineMan.findGame(gameid, &plugin); if (plugin == 0) { printf("Failed game detection\n"); @@ -105,7 +105,7 @@ static const Plugin *detectPlugin() { } // TODO: specify the possible return values here -static int runGame(const Plugin *plugin, OSystem &system, const Common::String &edebuglevels) { +static int runGame(const EnginePlugin *plugin, OSystem &system, const Common::String &edebuglevels) { Common::String gameDataPath(ConfMan.get("path")); if (gameDataPath.empty()) { } else if (gameDataPath.lastChar() != '/' @@ -168,7 +168,7 @@ static int runGame(const Plugin *plugin, OSystem &system, const Common::String & // Set the window caption to the game name Common::String caption(ConfMan.get("description")); - Common::String desc = Base::findGame(ConfMan.get("gameid")).description(); + Common::String desc = EngineMan.findGame(ConfMan.get("gameid")).description(); if (caption.empty() && !desc.empty()) caption = desc; if (caption.empty()) @@ -298,7 +298,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) { // cleanly, so this is now enabled to encourage people to fix bits :) while (0 != ConfMan.getActiveDomain()) { // Try to find a plugin which feels responsible for the specified game. - const Plugin *plugin = detectPlugin(); + const EnginePlugin *plugin = detectPlugin(); if (plugin) { // Unload all plugins not needed for this game, // to save memory |