aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/detection.cpp
diff options
context:
space:
mode:
authorThierry Crozat2016-03-09 00:02:45 +0000
committerThierry Crozat2016-03-09 00:02:45 +0000
commit90a86fd39cf47873b3ac122cc2869a19a6df8f5d (patch)
tree81979db35d1cce316d46bb0b858d80783b500411 /engines/sword25/detection.cpp
parentfd470e3584c11cbacf7a58d1a4f44641587a20ea (diff)
downloadscummvm-rg350-90a86fd39cf47873b3ac122cc2869a19a6df8f5d.tar.gz
scummvm-rg350-90a86fd39cf47873b3ac122cc2869a19a6df8f5d.tar.bz2
scummvm-rg350-90a86fd39cf47873b3ac122cc2869a19a6df8f5d.zip
SWORD25: Add engine option to use English speech instead of German
When selecting non-English language, the scripts default to using German voices. This commit edits the file path on the fly to use instead English voices for all languages other than German. This implements bug #6804 - SWORD25: add option to choose language speech. If the English voice pack is not present it falls back to using German voices. The way this is implemented here however does not allow to use German voices with English text or English voices with German text. This could be achieved with a slightly different implementation of the same idea.
Diffstat (limited to 'engines/sword25/detection.cpp')
-rw-r--r--engines/sword25/detection.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/sword25/detection.cpp b/engines/sword25/detection.cpp
index df68d11609..175261a89e 100644
--- a/engines/sword25/detection.cpp
+++ b/engines/sword25/detection.cpp
@@ -21,6 +21,7 @@
*/
#include "base/plugins.h"
+#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "sword25/sword25.h"
@@ -41,6 +42,13 @@ static const char *directoryGlobs[] = {
0
};
+static const ExtraGuiOption sword25ExtraGuiOption = {
+ _s("Use English speech"),
+ _s("Use English speech instead of German for every language other than German"),
+ "english_speech",
+ false
+};
+
class Sword25MetaEngine : public AdvancedMetaEngine {
public:
Sword25MetaEngine() : AdvancedMetaEngine(Sword25::gameDescriptions, sizeof(ADGameDescription), sword25Game) {
@@ -58,6 +66,7 @@ public:
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
virtual bool hasFeature(MetaEngineFeature f) const;
+ virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
virtual int getMaximumSaveSlot() const { return Sword25::PersistenceService::getSlotCount(); }
virtual SaveStateList listSaves(const char *target) const;
};
@@ -74,6 +83,12 @@ bool Sword25MetaEngine::hasFeature(MetaEngineFeature f) const {
(f == kSupportsListSaves);
}
+const ExtraGuiOptions Sword25MetaEngine::getExtraGuiOptions(const Common::String &target) const {
+ ExtraGuiOptions options;
+ options.push_back(sword25ExtraGuiOption);
+ return options;
+}
+
SaveStateList Sword25MetaEngine::listSaves(const char *target) const {
Common::String pattern = target;
pattern = pattern + ".???";