aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp44
-rw-r--r--base/game.h4
-rw-r--r--base/main.cpp38
-rw-r--r--base/plugins.cpp3
4 files changed, 14 insertions, 75 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index b9fd4ecfb7..84f2013ae9 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 {
@@ -181,9 +165,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);
@@ -216,27 +197,6 @@ void registerDefaults() {
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);
- 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");
ConfMan.registerDefault("record_temp_file_name", "record.tmp");
@@ -684,9 +644,9 @@ static void runDetectorTest() {
failure++;
} else if (candidates.size() > 1) {
if (gameidDiffers) {
- printf(" FAILURE: Multiple games detected, some/all with wrong gameid\n");
+ printf(" WARNING: Multiple games detected, some/all with wrong gameid\n");
} else {
- printf(" FAILURE: Multiple games detected, but all have the same gameid\n");
+ printf(" WARNING: Multiple games detected, but all have the same gameid\n");
}
failure++;
} else if (gameidDiffers) {
diff --git a/base/game.h b/base/game.h
index b068c300ce..d81f2afb8a 100644
--- a/base/game.h
+++ b/base/game.h
@@ -92,6 +92,10 @@ public:
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. */
diff --git a/base/main.cpp b/base/main.cpp
index bb7a17b901..4283b6cacf 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -111,35 +111,8 @@ static const EnginePlugin *detectPlugin() {
// TODO: specify the possible return values here
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() != '/'
-#if defined(__MORPHOS__) || defined(__amigaos4__)
- && gameDataPath.lastChar() != ':'
-#endif
- && gameDataPath.lastChar() != '\\') {
- gameDataPath += '/';
- ConfMan.set("path", gameDataPath, Common::ConfigManager::kTransientDomain);
- }
-
- // We add the game "path" to the file search path via File::addDefaultDirectory(),
- // so that MD5-based detection will be able to properly find files with mixed case
- // filenames.
- // FIXME/TODO: Fingolfin still doesn't like this; if those MD5-based detectors used
- // FSNodes instead of File::open, they wouldn't have to do this.
- Common::String path;
- if (ConfMan.hasKey("path")) {
- path = ConfMan.get("path");
- FilesystemNode dir(path);
- if (!dir.isDirectory()) {
- warning("Game directory does not exist (%s)", path.c_str());
- return 0;
- }
- } else {
- path = ".";
- warning("No path was provided. Assuming the data files are in the current directory");
- }
- Common::File::addDefaultDirectory(path);
+ // Query the game data path, for messages
+ Common::String path = ConfMan.hasKey("path") ? ConfMan.get("path") : ".";
// Create the game engine
Engine *engine = 0;
@@ -182,15 +155,14 @@ static int runGame(const EnginePlugin *plugin, OSystem &system, const Common::St
system.setWindowCaption(caption.c_str());
}
- if (ConfMan.hasKey("path"))
- Common::File::addDefaultDirectory(ConfMan.get("path"));
- else
- Common::File::addDefaultDirectory(".");
+ // Add the game path to the directory search list
+ Common::File::addDefaultDirectory(path);
// Add extrapath (if any) to the directory search list
if (ConfMan.hasKey("extrapath"))
Common::File::addDefaultDirectoryRecursive(ConfMan.get("extrapath"));
+ // If a second extrapath is specified on the app domain level, add that as well.
if (ConfMan.hasKey("extrapath", Common::ConfigManager::kApplicationDomain))
Common::File::addDefaultDirectoryRecursive(ConfMan.get("extrapath", Common::ConfigManager::kApplicationDomain));
diff --git a/base/plugins.cpp b/base/plugins.cpp
index dcd394495f..216c6ef1af 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -140,6 +140,9 @@ public:
#if PLUGIN_ENABLED_STATIC(SWORD2)
LINK_PLUGIN(SWORD2)
#endif
+ #if PLUGIN_ENABLED_STATIC(TINSEL)
+ LINK_PLUGIN(TINSEL)
+ #endif
#if PLUGIN_ENABLED_STATIC(TOUCHE)
LINK_PLUGIN(TOUCHE)
#endif