diff options
author | Stephen Kennedy | 2008-09-26 21:53:08 +0000 |
---|---|---|
committer | Stephen Kennedy | 2008-09-26 21:53:08 +0000 |
commit | a7bb113e83c88fad3a23d408caa99f918fdb610a (patch) | |
tree | 698dd9d85abaa6a20957bfb9c0e006e9dd1dc8b3 /base | |
parent | 11c0a3bdedcdf5eb2618b9db67b559663fb93320 (diff) | |
parent | c1385076cbc57f1a4a52946a46b3ea06ecf37f37 (diff) | |
download | scummvm-rg350-a7bb113e83c88fad3a23d408caa99f918fdb610a.tar.gz scummvm-rg350-a7bb113e83c88fad3a23d408caa99f918fdb610a.tar.bz2 scummvm-rg350-a7bb113e83c88fad3a23d408caa99f918fdb610a.zip |
Merged revisions 33452-33453,33455-33459,33463-33464,33466-33471,33473-33474,33478,33490,33492,33495-33496,33509-33512,33518-33519,33522-33527,33529-33530,33537,33541,33544,33546,33550,33552-33554,33556,33558,33561-33562,33565,33568,33570,33574,33576,33578-33581,33584-33587,33590,33596,33604-33611,33614-33615,33617-33618,33620-33621,33623,33626-33627,33632-33633,33635,33637,33639-33640,33642-33645,33648,33654-33655,33664,33667-33670,33673-33674,33678,33682,33686-33691,33693,33696,33698,33700,33703,33708,33710,33712-33714,33716,33719,33721-33723,33725-33727,33729-33730,33733,33736,33742,33754,33756,33758,33761,33763,33766,33777,33781-33788,33790,33792-33793,33795,33797,33805,33807-33812,33815-33817,33819,33822,33826,33829,33837,33839,33844,33847,33858-33861,33864,33871-33873,33875,33877-33879,33886,33889-33892,33894,33896,33900,33902-33903,33919,33928,33930,33932-33936,33938-33940,33942-33943,33948,33950,33953,33967,33973,33976,33978,33980,33985,33991,33993,33999-34000,34006,34009,34011,34013,34015,34019,34021-34023,34025,34027-34028,34030,34032-34034,34036,34038-34039,34041,34046-34048,34050-34055,34057,34059-34065,34067,34072,34074,34076,34078-34081,34084,34086-34087,34089-34090,34093,34096-34102,34104,34107,34113,34116,34119,34122,34124,34126,34128,34131-34132,34135,34138,34141,34144,34146,34149,34152-34154,34156-34157,34160,34163-34164,34169,34173,34179-34194,34196-34198,34200-34201,34205-34206,34208-34217,34219-34225,34227-34228,34234-34237,34239-34249,34251-34279,34281-34284,34286-34288,34290-34320,34323-34324,34326,34328-34329,34332,34334,34336,34338-34340,34343-34353,34356-34357,34359-34371,34373,34375,34378,34381-34382,34384-34385,34389-34391,34393-34394,34396-34397,34399-34405,34407-34409,34411,34413,34415,34417-34420,34423-34426,34428-34438,34440-34454,34456-34458,34460,34462-34469,34472,34474,34479-34481,34483-34498,34501-34505,34508,34511-34518,34520-34524,34526-34563,34566-34569,34571-34590,34592,34595-34599,34602-34603,34605,34613-34615,34617,34619-34624,34627-34628,34630-34639,34642-34649 via svnmerge from
https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk
svn-id: r34654
Diffstat (limited to 'base')
-rw-r--r-- | base/commandLine.cpp | 63 | ||||
-rw-r--r-- | base/game.cpp | 77 | ||||
-rw-r--r-- | base/game.h | 186 | ||||
-rw-r--r-- | base/main.cpp | 54 | ||||
-rw-r--r-- | base/module.mk | 1 | ||||
-rw-r--r-- | base/plugins.cpp | 28 | ||||
-rw-r--r-- | base/plugins.h | 9 | ||||
-rw-r--r-- | base/version.cpp | 11 |
8 files changed, 76 insertions, 353 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index ea0e1465b6..410777209f 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -34,22 +34,6 @@ #include "sound/mididrv.h" -#ifdef IPHONE -#include "backends/platform/iphone/osys_iphone.h" -#endif - -#ifdef UNIX -#ifdef MACOSX -#define DEFAULT_SAVE_PATH "Documents/ScummVM Savegames" -#else -#define DEFAULT_SAVE_PATH ".scummvm" -#endif -#elif defined(__SYMBIAN32__) -#define DEFAULT_SAVE_PATH "Savegames" -#elif defined(PALMOS_MODE) -#define DEFAULT_SAVE_PATH "/PALM/Programs/ScummVM/Saved" -#endif - #define DETECTOR_TESTING_HACK namespace Base { @@ -72,6 +56,7 @@ static const char HELP_STRING[] = " -h, --help Display a brief help text and exit\n" " -z, --list-games Display list of supported games and exit\n" " -t, --list-targets Display list of configured targets and exit\n" + " --list-saves=TARGET Display a list of savegames for the game (TARGET) specified\n" "\n" " -c, --config=CONFIG Use alternate configuration file\n" " -p, --path=PATH Path to where the game is installed\n" @@ -181,9 +166,6 @@ void registerDefaults() { // Game specific ConfMan.registerDefault("path", ""); - ConfMan.registerDefault("savepath", ""); - -// ConfMan.registerDefault("amiga", false); ConfMan.registerDefault("platform", Common::kPlatformPC); ConfMan.registerDefault("language", "en"); ConfMan.registerDefault("subtitles", false); @@ -212,31 +194,6 @@ void registerDefaults() { ConfMan.registerDefault("joystick_num", -1); ConfMan.registerDefault("confirm_exit", false); ConfMan.registerDefault("disable_sdl_parachute", false); -#ifdef USE_ALSA - ConfMan.registerDefault("alsa_port", "65:0"); -#endif - - // Register default savepath -#ifdef DEFAULT_SAVE_PATH - char savePath[MAXPATHLEN]; -#if defined(UNIX) && !defined(IPHONE) - const char *home = getenv("HOME"); - if (home && *home && strlen(home) < MAXPATHLEN) { - snprintf(savePath, MAXPATHLEN, "%s/%s", home, DEFAULT_SAVE_PATH); - ConfMan.registerDefault("savepath", savePath); - } -#elif defined(__SYMBIAN32__) - strcpy(savePath, Symbian::GetExecutablePath()); - strcat(savePath, DEFAULT_SAVE_PATH); - strcat(savePath, "\\"); - ConfMan.registerDefault("savepath", savePath); -#elif defined (IPHONE) - ConfMan.registerDefault("savepath", OSystem_IPHONE::getSavePath()); - -#elif defined(PALMOS_MODE) - ConfMan.registerDefault("savepath", DEFAULT_SAVE_PATH); -#endif -#endif // #ifdef DEFAULT_SAVE_PATH ConfMan.registerDefault("record_mode", "none"); ConfMan.registerDefault("record_file_name", "record.bin"); @@ -408,7 +365,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_OPTION('p', "path") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent game path '%s'", option); } else if (!path.isReadable()) { @@ -451,7 +408,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_LONG_OPTION("soundfont") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent soundfont path '%s'", option); } else if (!path.isReadable()) { @@ -481,7 +438,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_LONG_OPTION("savepath") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent savegames path '%s'", option); } else if (!path.isWritable()) { @@ -490,7 +447,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_LONG_OPTION("extrapath") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent extra path '%s'", option); } else if (!path.isReadable()) { @@ -508,7 +465,7 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar END_OPTION DO_LONG_OPTION("themepath") - FilesystemNode path(option); + Common::FilesystemNode path(option); if (!path.exists()) { usage("Non-existent theme path '%s'", option); } else if (!path.isReadable()) { @@ -666,9 +623,9 @@ static void runDetectorTest() { gameid = name; } - FilesystemNode dir(path); - FSList files; - if (!dir.getChildren(files, FilesystemNode::kListAll)) { + Common::FilesystemNode dir(path); + Common::FSList files; + if (!dir.getChildren(files, Common::FilesystemNode::kListAll)) { printf(" ... invalid path, skipping\n"); continue; } @@ -779,7 +736,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings) { if (!settings.contains("savepath")) { const char *dir = getenv("SCUMMVM_SAVEPATH"); if (dir && *dir && strlen(dir) < MAXPATHLEN) { - FilesystemNode saveDir(dir); + Common::FilesystemNode saveDir(dir); if (!saveDir.exists()) { warning("Non-existent SCUMMVM_SAVEPATH save path. It will be ignored."); } else if (!saveDir.isWritable()) { diff --git a/base/game.cpp b/base/game.cpp deleted file mode 100644 index e65c891dc7..0000000000 --- a/base/game.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "base/game.h" -#include "base/plugins.h" -#include "graphics/surface.h" - - -const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list) { - const PlainGameDescriptor *g = list; - while (g->gameid) { - if (0 == scumm_stricmp(gameid, g->gameid)) - return g; - g++; - } - return 0; -} - -void GameDescriptor::updateDesc(const char *extra) { - // TODO: The format used here (LANG/PLATFORM/EXTRA) is not set in stone. - // We may want to change the order (PLATFORM/EXTRA/LANG, anybody?), or - // the seperator (instead of '/' use ', ' or ' '). - const bool hasCustomLanguage = (language() != Common::UNK_LANG); - const bool hasCustomPlatform = (platform() != Common::kPlatformUnknown); - const bool hasExtraDesc = (extra && extra[0]); - - // Adapt the description string if custom platform/language is set. - if (hasCustomLanguage || hasCustomPlatform || hasExtraDesc) { - Common::String descr = description(); - - descr += " ("; - if (hasExtraDesc) - descr += extra; - if (hasCustomPlatform) { - if (hasExtraDesc) - descr += "/"; - descr += Common::getPlatformDescription(platform()); - } - if (hasCustomLanguage) { - if (hasExtraDesc || hasCustomPlatform) - descr += "/"; - descr += Common::getLanguageDescription(language()); - } - descr += ")"; - setVal("description", descr); - } -} - -void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) { - if (_thumbnail && _thumbnail != t) { - _thumbnail->free(); - delete _thumbnail; - } - _thumbnail = t; -} diff --git a/base/game.h b/base/game.h deleted file mode 100644 index d81f2afb8a..0000000000 --- a/base/game.h +++ /dev/null @@ -1,186 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef BASE_GAME_H -#define BASE_GAME_H - -#include "common/str.h" -#include "common/array.h" -#include "common/hash-str.h" - -namespace Graphics { - struct Surface; -} - -/** - * A simple structure used to map gameids (like "monkey", "sword1", ...) to - * nice human readable and descriptive game titles (like "The Secret of Monkey Island"). - * This is a plain struct to make it possible to declare NULL-terminated C arrays - * consisting of PlainGameDescriptors. - */ -struct PlainGameDescriptor { - const char *gameid; - const char *description; -}; - -/** - * Given a list of PlainGameDescriptors, returns the first PlainGameDescriptor - * matching the given gameid. If not match is found return 0. - * The end of the list must marked by a PlainGameDescriptor with gameid equal to 0. - */ -const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const PlainGameDescriptor *list); - -/** - * A hashmap describing details about a given game. In a sense this is a refined - * version of PlainGameDescriptor, as it also contains a gameid and a description string. - * But in addition, platform and language settings, as well as arbitrary other settings, - * can be contained in a GameDescriptor. - * This is an essential part of the glue between the game engines and the launcher code. - */ -class GameDescriptor : public Common::StringMap { -public: - GameDescriptor() { - setVal("gameid", ""); - setVal("description", ""); - } - - GameDescriptor(const PlainGameDescriptor &pgd) { - setVal("gameid", pgd.gameid); - setVal("description", pgd.description); - } - - GameDescriptor(const Common::String &g, const Common::String &d, Common::Language l = Common::UNK_LANG, - Common::Platform p = Common::kPlatformUnknown) { - setVal("gameid", g); - setVal("description", d); - if (l != Common::UNK_LANG) - setVal("language", Common::getLanguageCode(l)); - if (p != Common::kPlatformUnknown) - setVal("platform", Common::getPlatformCode(p)); - } - - /** - * Update the description string by appending (LANG/PLATFORM/EXTRA) to it. - */ - void updateDesc(const char *extra = 0); - - Common::String &gameid() { return getVal("gameid"); } - Common::String &description() { return getVal("description"); } - const Common::String &gameid() const { return getVal("gameid"); } - const Common::String &description() const { return getVal("description"); } - Common::Language language() const { return contains("language") ? Common::parseLanguage(getVal("language")) : Common::UNK_LANG; } - Common::Platform platform() const { return contains("platform") ? Common::parsePlatform(getVal("platform")) : Common::kPlatformUnknown; } - - const Common::String &preferredtarget() const { - return contains("preferredtarget") ? getVal("preferredtarget") : getVal("gameid"); - } -}; - -/** List of games. */ -class GameList : public Common::Array<GameDescriptor> { -public: - GameList() {} - GameList(const GameList &list) : Common::Array<GameDescriptor>(list) {} - GameList(const PlainGameDescriptor *g) { - while (g->gameid) { - push_back(GameDescriptor(g->gameid, g->description)); - g++; - } - } -}; - -/** - * A hashmap describing details about a given save state. - * TODO - * Guaranteed to contain save_slot, filename and description values. - * Additional ideas: Playtime, creation date, thumbnail, ... - */ -class SaveStateDescriptor : public Common::StringMap { -protected: - Graphics::Surface *_thumbnail; // can be NULL -public: - SaveStateDescriptor() : _thumbnail(0) { - setVal("save_slot", "-1"); // FIXME: default to 0 (first slot) or to -1 (invalid slot) ? - setVal("description", ""); - setVal("filename", ""); - } - - SaveStateDescriptor(int s, const Common::String &d, const Common::String &f) : _thumbnail(0) { - char buf[16]; - sprintf(buf, "%d", s); - setVal("save_slot", buf); - setVal("description", d); - setVal("filename", f); - } - - SaveStateDescriptor(const Common::String &s, const Common::String &d, const Common::String &f) : _thumbnail(0) { - setVal("save_slot", s); - setVal("description", d); - setVal("filename", f); - } - - ~SaveStateDescriptor() { - setThumbnail(0); - } - - /** The saveslot id, as it would be passed to the "-x" command line switch. */ - Common::String &save_slot() { return getVal("save_slot"); } - - /** The saveslot id, as it would be passed to the "-x" command line switch (read-only variant). */ - const Common::String &save_slot() const { return getVal("save_slot"); } - - /** A human readable description of the save state. */ - Common::String &description() { return getVal("description"); } - - /** A human readable description of the save state (read-only variant). */ - const Common::String &description() const { return getVal("description"); } - - /** The filename of the savestate, for use with the SaveFileManager API. */ - Common::String &filename() { return getVal("filename"); } - - /** The filename of the savestate, for use with the SaveFileManager API (read-only variant). */ - const Common::String &filename() const { return getVal("filename"); } - - /** - * Return a thumbnail graphics surface representing the savestate visually - * This is usually a scaled down version of the game graphics. The size - * should be either 160x100 or 160x120 pixels, depending on the aspect - * ratio of the game. If another ratio is required, contact the core team. - * - * TODO: it is probably a bad idea to read this for *all* games at once, - * at least on low-end devices. So this info should probably normally only - * be included optionally. I.e. only upon a query for a specific savegame... - * To this end, add a getFullSaveStateInfo(target, slot) to the plugin API. - */ - const Graphics::Surface *getThumbnail() const { return _thumbnail; } - - - void setThumbnail(Graphics::Surface *t); -}; - -/** List of savestates. */ -typedef Common::Array<SaveStateDescriptor> SaveStateList; - -#endif diff --git a/base/main.cpp b/base/main.cpp index 0222d61764..b7179e7231 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -141,8 +141,16 @@ static int runGame(const EnginePlugin *plugin, OSystem &system, const Common::St system.setWindowCaption(caption.c_str()); } + // FIXME: at this moment, game path handling is being discussed in the mailing list, + // while Common::File is being reworked under the hood. After commit 34444, which + // changed the implementation of Common::File (specifically removing usage of fopen + // and fOpenNoCase, which implicitly supported backslashes in file names), some games + // stopped working. Example of this are the HE games which use subdirectories: Kirben + // found this issue on lost-win-demo at first. Thus, in commit 34450, searching the + // game path was made recursive as a temporary fix/workaround. + // Add the game path to the directory search list - Common::File::addDefaultDirectory(path); + Common::File::addDefaultDirectoryRecursive(path); // Add extrapath (if any) to the directory search list if (ConfMan.hasKey("extrapath")) @@ -187,17 +195,35 @@ static int runGame(const EnginePlugin *plugin, OSystem &system, const Common::St // Reset the file/directory mappings Common::File::resetDefaultDirectories(); - return 0; + // Return result (== 0 means no error) + return result; } static void setupGraphics(OSystem &system) { + system.beginGFXTransaction(); // Set the user specified graphics mode (if any). system.setGraphicsMode(ConfMan.get("gfx_mode").c_str()); system.initSize(320, 200); + + if (ConfMan.hasKey("aspect_ratio")) + system.setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio")); + if (ConfMan.hasKey("fullscreen")) + system.setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); system.endGFXTransaction(); + // When starting up launcher for the first time, the user might have specified + // a --gui-theme option, to allow that option to be working, we need to initialize + // GUI here. + // FIXME: Find a nicer way to allow --gui-theme to be working + GUI::NewGui::instance(); + + // Discard any command line options. Those that affect the graphics + // mode and the others (like bootparam etc.) should not + // blindly be passed to the first game launched from the launcher. + ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear(); + // Set initial window caption system.setWindowCaption(gScummVMFullVersion); @@ -268,16 +294,9 @@ extern "C" int scummvm_main(int argc, char *argv[]) { system.getEventManager()->init(); // Unless a game was specified, show the launcher dialog - if (0 == ConfMan.getActiveDomain()) { + if (0 == ConfMan.getActiveDomain()) launcherDialog(system); - // Discard any command line options. Those that affect the graphics - // mode etc. already have should have been handled by the backend at - // this point. And the others (like bootparam etc.) should not - // blindly be passed to the first game launched from the launcher. - ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear(); - } - // FIXME: We're now looping the launcher. This, of course, doesn't // work as well as it should. In theory everything should be destroyed // cleanly, so this is now enabled to encourage people to fix bits :) @@ -291,12 +310,19 @@ extern "C" int scummvm_main(int argc, char *argv[]) { // Try to run the game int result = runGame(plugin, system, specialDebug); - // TODO: We should keep running if starting the selected game failed - // (so instead of just quitting, show a nice error dialog to the - // user and let him pick another game). - if (result == 0) + + // Did an error occur ? + if (result != 0) { + // TODO: Show an informative error dialog if starting the selected game failed. + } + + // Quit unless an error occurred, or Return to launcher was requested + if (result == 0 && !g_system->getEventManager()->shouldRTL()) break; + // Reset RTL flag in case we want to load another engine + g_system->getEventManager()->resetRTL(); + // Discard any command line options. It's unlikely that the user // wanted to apply them to *all* games ever launched. ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear(); diff --git a/base/module.mk b/base/module.mk index dd89c5fb2d..f12a710920 100644 --- a/base/module.mk +++ b/base/module.mk @@ -3,7 +3,6 @@ MODULE := base MODULE_OBJS := \ main.o \ commandLine.o \ - game.o \ plugins.o \ version.o diff --git a/base/plugins.cpp b/base/plugins.cpp index 216c6ef1af..7b372587a1 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -29,6 +29,7 @@ #ifdef DYNAMIC_MODULES #include "common/config-manager.h" +#include "common/fs.h" #endif // Plugin versioning @@ -157,9 +158,12 @@ public: #if defined(UNIX) && defined(USE_ALSA) LINK_PLUGIN(ALSA) #endif - #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) + #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) && !defined(__MINT__) LINK_PLUGIN(SEQ) #endif + #if defined(__MINT__) + LINK_PLUGIN(STMIDI) + #endif #if defined(IRIX) LINK_PLUGIN(DMEDIA) #endif @@ -200,11 +204,11 @@ PluginList FilePluginProvider::getPlugins() { PluginList pl; // Prepare the list of directories to search - FSList pluginDirs; + Common::FSList pluginDirs; // Add the default directories - pluginDirs.push_back(FilesystemNode(".")); - pluginDirs.push_back(FilesystemNode("plugins")); + pluginDirs.push_back(Common::FilesystemNode(".")); + pluginDirs.push_back(Common::FilesystemNode("plugins")); // Add the provider's custom directories addCustomDirectories(pluginDirs); @@ -212,21 +216,21 @@ PluginList FilePluginProvider::getPlugins() { // Add the user specified directory Common::String pluginsPath(ConfMan.get("pluginspath")); if (!pluginsPath.empty()) - pluginDirs.push_back(FilesystemNode(pluginsPath)); + pluginDirs.push_back(Common::FilesystemNode(pluginsPath)); - FSList::const_iterator dir; + Common::FSList::const_iterator dir; for (dir = pluginDirs.begin(); dir != pluginDirs.end(); dir++) { // Load all plugins. // Scan for all plugins in this directory - FSList files; - if (!dir->getChildren(files, FilesystemNode::kListFilesOnly)) { + Common::FSList files; + if (!dir->getChildren(files, Common::FilesystemNode::kListFilesOnly)) { debug(1, "Couldn't open plugin directory '%s'", dir->getPath().c_str()); continue; } else { debug(1, "Reading plugins from plugin directory '%s'", dir->getPath().c_str()); } - for (FSList::const_iterator i = files.begin(); i != files.end(); ++i) { + for (Common::FSList::const_iterator i = files.begin(); i != files.end(); ++i) { if (isPluginFilename(i->getName())) { pl.push_back(createPlugin(i->getPath())); } @@ -252,9 +256,9 @@ bool FilePluginProvider::isPluginFilename(const Common::String &filename) const return true; } -void FilePluginProvider::addCustomDirectories(FSList &dirs) const { +void FilePluginProvider::addCustomDirectories(Common::FSList &dirs) const { #ifdef PLUGIN_DIRECTORY - dirs.push_back(FilesystemNode(PLUGIN_DIRECTORY)); + dirs.push_back(Common::FilesystemNode(PLUGIN_DIRECTORY)); #endif } @@ -376,7 +380,7 @@ GameDescriptor EngineManager::findGame(const Common::String &gameName, const Eng return result; } -GameList EngineManager::detectGames(const FSList &fslist) const { +GameList EngineManager::detectGames(const Common::FSList &fslist) const { GameList candidates; const EnginePlugin::List &plugins = getPlugins(); diff --git a/base/plugins.h b/base/plugins.h index 02116f6433..90c4469e4d 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -30,9 +30,10 @@ #include "common/singleton.h" #include "common/util.h" -#ifdef DYNAMIC_MODULES -#include "common/fs.h" -#endif +namespace Common { + class FSList; +} + /** * @page pagePlugins An overview of the ScummVM plugin system @@ -258,7 +259,7 @@ protected: * @param dirs the reference to the list of directories to be used when * searching for plugins. */ - virtual void addCustomDirectories(FSList &dirs) const; + virtual void addCustomDirectories(Common::FSList &dirs) const; }; #endif // DYNAMIC_MODULES diff --git a/base/version.cpp b/base/version.cpp index 8de96d0b78..eabafecc30 100644 --- a/base/version.cpp +++ b/base/version.cpp @@ -62,7 +62,12 @@ const char *gScummVMVersionDate = SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")" const char *gScummVMFullVersion = "ScummVM " SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")"; const char *gScummVMFeatures = "" #ifdef USE_TREMOR +#ifdef USE_TREMOLO + // libTremolo is used on WinCE for better ogg performance + "Tremolo " +#else "Tremor " +#endif #else #ifdef USE_VORBIS "Vorbis " @@ -92,11 +97,5 @@ const char *gScummVMFeatures = "" #ifdef USE_FLUIDSYNTH "FluidSynth " #endif - -#ifdef __SYMBIAN32__ -// we want a list of compiled in engines visible in the program, -// because we also release special builds with only one engine -#include "backends/platform/symbian/src/main_features.inl" -#endif ; |