diff options
Diffstat (limited to 'base')
| -rw-r--r-- | base/commandLine.cpp | 5 | ||||
| -rw-r--r-- | base/game.cpp | 4 | ||||
| -rw-r--r-- | base/game.h | 6 | ||||
| -rw-r--r-- | base/internal_version.h | 2 | ||||
| -rw-r--r-- | base/main.cpp | 39 | ||||
| -rw-r--r-- | base/plugins.cpp | 3 | ||||
| -rw-r--r-- | base/plugins.h | 10 | 
7 files changed, 22 insertions, 47 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index b9fd4ecfb7..ea0e1465b6 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -228,6 +228,7 @@ void registerDefaults() {  #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()); @@ -684,9 +685,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.cpp b/base/game.cpp index 9628543672..e65c891dc7 100644 --- a/base/game.cpp +++ b/base/game.cpp @@ -32,10 +32,10 @@ const PlainGameDescriptor *findPlainGameDescriptor(const char *gameid, const Pla  	const PlainGameDescriptor *g = list;  	while (g->gameid) {  		if (0 == scumm_stricmp(gameid, g->gameid)) -			break; +			return g;  		g++;  	} -	return g; +	return 0;  }  void GameDescriptor::updateDesc(const char *extra) { diff --git a/base/game.h b/base/game.h index 18d7967388..d81f2afb8a 100644 --- a/base/game.h +++ b/base/game.h @@ -48,7 +48,7 @@ struct PlainGameDescriptor {  /**   * 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 marked by a PlainGameDescriptor with gameid equal to 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); @@ -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/internal_version.h b/base/internal_version.h index 069c20b4c9..c867532dd9 100644 --- a/base/internal_version.h +++ b/base/internal_version.h @@ -1 +1 @@ -#define SCUMMVM_VERSION "0.12.0svn" +#define SCUMMVM_VERSION "0.13.0svn" diff --git a/base/main.cpp b/base/main.cpp index 219fa0cdc5..666d4fdfe3 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -112,35 +112,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; @@ -183,15 +156,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)); @@ -278,6 +250,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) {  	// Load the plugins.  	PluginManager::instance().loadPlugins(); +	EngineMan.getPlugins();  	// Process the remaining command line settings. Must be done after the  	// config file and the plugins have been loaded. 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 diff --git a/base/plugins.h b/base/plugins.h index 9d3ce97c3b..02116f6433 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -81,17 +81,11 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX];  #define STATIC_PLUGIN 1  #define DYNAMIC_PLUGIN 2 -// Note: The spaces around ENABLE_##ID have been added on purpose for -// MSVC. For some reason, MSVC tries to add the parenthesis after -// ENABLE_##ID to the check, thus making it false all the time. -// Please do NOT remove them, otherwise no engine plugins will be -// registered under MSVC -  #define PLUGIN_ENABLED_STATIC(ID) \ -	(defined( ENABLE_##ID ) && !PLUGIN_ENABLED_DYNAMIC(ID)) +	(ENABLE_##ID && !PLUGIN_ENABLED_DYNAMIC(ID))  #define PLUGIN_ENABLED_DYNAMIC(ID) \ -	(defined( ENABLE_##ID ) && (ENABLE_##ID == DYNAMIC_PLUGIN) && defined(DYNAMIC_MODULES)) +	(ENABLE_##ID && (ENABLE_##ID == DYNAMIC_PLUGIN) && DYNAMIC_MODULES)  /**   * REGISTER_PLUGIN_STATIC is a convenience macro which is used to declare  | 
