aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorTony Puccinelli2010-08-10 23:21:08 +0000
committerTony Puccinelli2010-08-10 23:21:08 +0000
commit682807f0e916b189c69b60765418ee1ccc327cbf (patch)
treee8b220b934f6b14d4dac290181fce0c1b209579a /base
parent83f1531cb8fa5ba43c246143ecdde2cb1d140a8e (diff)
parentfffec23a02cc88ed8daba0a3b50007b7e220c075 (diff)
downloadscummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.tar.gz
scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.tar.bz2
scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.zip
merged trunk into branch, reverted Cruise Singleton changes
svn-id: r51961
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp10
-rw-r--r--base/internal_version.h5
-rw-r--r--base/internal_version.h.in5
-rw-r--r--base/main.cpp38
-rw-r--r--base/plugins.cpp14
-rw-r--r--base/version.cpp4
6 files changed, 48 insertions, 28 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 8fa2f54b03..e36ddfca54 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -32,8 +32,6 @@
#include "common/system.h"
#include "common/fs.h"
-#include "sound/mididrv.h"
-
#include "gui/ThemeEngine.h"
#define DETECTOR_TESTING_HACK
@@ -51,7 +49,7 @@ static const char USAGE_STRING[] =
;
// DONT FIXME: DO NOT ORDER ALPHABETICALLY, THIS IS ORDERED BY IMPORTANCE/CATEGORY! :)
-#if defined(PALMOS_MODE) || defined(__SYMBIAN32__) || defined(__GP32__)
+#if defined(__SYMBIAN32__) || defined(__GP32__) || defined(ANDROID)
static const char HELP_STRING[] = "NoUsageString"; // save more data segment space
#else
static const char HELP_STRING[] =
@@ -61,7 +59,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"
+ " --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"
@@ -364,8 +362,6 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
END_OPTION
DO_OPTION('e', "music-driver")
- if (MidiDriver::findMusicDriver(option) == 0)
- usage("Unrecognized music driver '%s'", option);
END_OPTION
DO_LONG_OPTION_INT("output-rate")
@@ -941,7 +937,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings) {
// environment variable. This is weaker than a --savepath on the
// command line, but overrides the default savepath, hence it is
// handled here, just before the command line gets parsed.
-#if !defined(MACOS_CARBON) && !defined(_WIN32_WCE) && !defined(PALMOS_MODE) && !defined(__GP32__)
+#if !defined(_WIN32_WCE) && !defined(__GP32__) && !defined(ANDROID)
if (!settings.contains("savepath")) {
const char *dir = getenv("SCUMMVM_SAVEPATH");
if (dir && *dir && strlen(dir) < MAXPATHLEN) {
diff --git a/base/internal_version.h b/base/internal_version.h
index bdd0474c2b..2e6b7a24ad 100644
--- a/base/internal_version.h
+++ b/base/internal_version.h
@@ -2,4 +2,9 @@
#define SCUMMVM_SVN_REVISION
#endif
+#ifdef RELEASE_BUILD
+#undef SCUMMVM_SVN_REVISION
+#define SCUMMVM_SVN_REVISION
+#endif
+
#define SCUMMVM_VERSION "1.2.0svn" SCUMMVM_SVN_REVISION
diff --git a/base/internal_version.h.in b/base/internal_version.h.in
index 1b7e5ed147..4eecf90d87 100644
--- a/base/internal_version.h.in
+++ b/base/internal_version.h.in
@@ -2,4 +2,9 @@
#define SCUMMVM_SVN_REVISION
#endif
+#ifdef RELEASE_BUILD
+#undef SCUMMVM_SVN_REVISION
+#define SCUMMVM_SVN_REVISION
+#endif
+
#define SCUMMVM_VERSION "@VERSION@" SCUMMVM_SVN_REVISION
diff --git a/base/main.cpp b/base/main.cpp
index 8067bd0a26..08d59aafab 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -47,12 +47,14 @@
#include "common/fs.h"
#include "common/system.h"
#include "common/tokenizer.h"
+#include "common/translation.h"
#include "gui/GuiManager.h"
#include "gui/message.h"
#include "gui/error.h"
#include "sound/audiocd.h"
+#include "sound/mididrv.h"
#include "backends/keymapper/keymapper.h"
@@ -102,7 +104,7 @@ static const EnginePlugin *detectPlugin() {
// Query the plugins and find one that will handle the specified gameid
printf("User picked target '%s' (gameid '%s')...\n", ConfMan.getActiveDomainName().c_str(), gameid.c_str());
- printf(" Looking for a plugin supporting this gameid... ");
+ printf("%s", " Looking for a plugin supporting this gameid... ");
#if defined(NEW_PLUGIN_DESIGN_FIRST_REFINEMENT) && defined(DYNAMIC_MODULES)
GameDescriptor game = EngineMan.findGameOnePlugAtATime(gameid, &plugin);
@@ -146,7 +148,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
// Is a separate dialog here still required?
//GUI::displayErrorDialog("ScummVM could not find any game in the specified directory!");
- const char *errMsg = Common::errorToString(err);
+ const char *errMsg = _(Common::errorToString(err));
warning("%s failed to instantiate engine: %s (target '%s', path '%s')",
plugin->getName(),
@@ -205,7 +207,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
while (!tokenizer.empty()) {
Common::String token = tokenizer.nextToken();
if (!DebugMan.enableDebugChannel(token))
- warning("Engine does not support debug level '%s'", token.c_str());
+ warning(_("Engine does not support debug level '%s'"), token.c_str());
}
// Inform backend that the engine is about to be run
@@ -273,22 +275,22 @@ static void setupKeymapper(OSystem &system) {
mapper->registerHardwareKeySet(keySet);
// Now create the global keymap
- act = new Action(globalMap, "MENU", "Menu", kGenericActionType, kSelectKeyType);
+ act = new Action(globalMap, "MENU", _("Menu"), kGenericActionType, kSelectKeyType);
act->addKeyEvent(KeyState(KEYCODE_F5, ASCII_F5, 0));
- act = new Action(globalMap, "SKCT", "Skip", kGenericActionType, kActionKeyType);
+ act = new Action(globalMap, "SKCT", _("Skip"), kGenericActionType, kActionKeyType);
act->addKeyEvent(KeyState(KEYCODE_ESCAPE, ASCII_ESCAPE, 0));
- act = new Action(globalMap, "PAUS", "Pause", kGenericActionType, kStartKeyType);
+ act = new Action(globalMap, "PAUS", _("Pause"), kGenericActionType, kStartKeyType);
act->addKeyEvent(KeyState(KEYCODE_SPACE, ' ', 0));
- act = new Action(globalMap, "SKLI", "Skip line", kGenericActionType, kActionKeyType);
+ act = new Action(globalMap, "SKLI", _("Skip line"), kGenericActionType, kActionKeyType);
act->addKeyEvent(KeyState(KEYCODE_PERIOD, '.', 0));
- act = new Action(globalMap, "VIRT", "Display keyboard", kVirtualKeyboardActionType);
+ act = new Action(globalMap, "VIRT", _("Display keyboard"), kVirtualKeyboardActionType);
act->addKeyEvent(KeyState(KEYCODE_F7, ASCII_F7, 0));
- act = new Action(globalMap, "REMP", "Remap keys", kKeyRemapActionType);
+ act = new Action(globalMap, "REMP", _("Remap keys"), kKeyRemapActionType);
act->addKeyEvent(KeyState(KEYCODE_F8, ASCII_F8, 0));
mapper->addGlobalKeymap(globalMap);
@@ -324,6 +326,8 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
// Update the config file
ConfMan.set("versioninfo", gScummVMVersion, Common::ConfigManager::kApplicationDomain);
+ // Enable translation
+ TransMan.setLanguage(ConfMan.get("gui_language").c_str());
// Load and setup the debuglevel and the debug flags. We do this at the
// soonest possible moment to ensure debug output starts early on, if
@@ -347,6 +351,16 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
PluginManager::instance().loadPlugins();
#endif
+ // If we received an invalid music parameter via command line we check this here.
+ // We can't check this before loading the music plugins.
+ // On the other hand we cannot load the plugins before we know the file paths (in case of external plugins).
+ if (settings.contains("music-driver")) {
+ if (MidiDriver::getMusicType(MidiDriver::getDeviceHandle(settings["music-driver"])) == MT_INVALID) {
+ warning("Unrecognized music driver '%s'. Switching to default device", settings["music-driver"].c_str());
+ settings["music-driver"] = "auto";
+ }
+ }
+
// Process the remaining command line settings. Must be done after the
// config file and the plugins have been loaded.
if (!Base::processSettings(command, settings))
@@ -394,7 +408,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
// Did an error occur ?
if (result != Common::kNoError) {
// Shows an informative error dialog if starting the selected game failed.
- GUI::displayErrorDialog(result, "Error running game:");
+ GUI::displayErrorDialog(result, _("Error running game:"));
}
// Quit unless an error occurred, or Return to launcher was requested
@@ -420,8 +434,8 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
} else {
// A dialog would be nicer, but we don't have any
// screen to draw on yet.
- warning("Could not find any engine capable of running the selected game");
- GUI::displayErrorDialog("Could not find any engine capable of running the selected game");
+ warning("%s", _("Could not find any engine capable of running the selected game"));
+ GUI::displayErrorDialog(_("Could not find any engine capable of running the selected game"));
}
// We will destroy the AudioCDManager singleton here to save some memory.
diff --git a/base/plugins.cpp b/base/plugins.cpp
index 6d9df6a812..61cc747a41 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -167,14 +167,15 @@ public:
// Music plugins
// TODO: Use defines to disable or enable each MIDI driver as a
// static/dynamic plugin, like it's done for the engines
+ LINK_PLUGIN(AUTO)
LINK_PLUGIN(NULL)
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
LINK_PLUGIN(WINDOWS)
#endif
- #if defined(UNIX) && defined(USE_ALSA)
+ #if defined(USE_ALSA)
LINK_PLUGIN(ALSA)
#endif
- #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) && !defined(__MINT__)
+ #if defined(USE_SEQ_MIDI)
LINK_PLUGIN(SEQ)
#endif
#if defined(__MINT__)
@@ -190,13 +191,6 @@ public:
LINK_PLUGIN(COREAUDIO)
LINK_PLUGIN(COREMIDI)
#endif
- #if defined(PALMOS_MODE)
- # if defined(COMPILE_CLIE)
- LINK_PLUGIN(YPA1)
- # elif defined(COMPILE_ZODIAC) && (!defined(ENABLE_SCUMM) || !defined(PALMOS_ARM))
- LINK_PLUGIN(ZODIAC)
- # endif
- #endif
#ifdef USE_FLUIDSYNTH
LINK_PLUGIN(FLUIDSYNTH)
#endif
@@ -204,6 +198,8 @@ public:
LINK_PLUGIN(MT32)
#endif
LINK_PLUGIN(ADLIB)
+ LINK_PLUGIN(PCSPK)
+ LINK_PLUGIN(PCJR)
LINK_PLUGIN(TOWNS)
#if defined (UNIX)
LINK_PLUGIN(TIMIDITY)
diff --git a/base/version.cpp b/base/version.cpp
index ad74c64265..17058d4a03 100644
--- a/base/version.cpp
+++ b/base/version.cpp
@@ -86,6 +86,10 @@ const char *gScummVMFeatures = ""
"ALSA "
#endif
+#ifdef USE_SEQ_MIDI
+ "SEQ "
+#endif
+
#ifdef USE_RGB_COLOR
"RGB "
#endif