aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorathrxx2011-11-01 11:59:52 +0100
committerathrxx2011-11-01 20:29:53 +0100
commit731382ad516a5d5fd7891c9f88146561ff5860da (patch)
treec0b6dc1df4ef37c650f6c989fc24a25fc81dffd3 /engines/sci/engine
parentde5d3fc8e1faa5425b6c39831acd41571877d671 (diff)
downloadscummvm-rg350-731382ad516a5d5fd7891c9f88146561ff5860da.tar.gz
scummvm-rg350-731382ad516a5d5fd7891c9f88146561ff5860da.tar.bz2
scummvm-rg350-731382ad516a5d5fd7891c9f88146561ff5860da.zip
SCI: add Japanese detection entry for KQ5 FM-Towns and fix audio language handling
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/ksound.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 33bef58e52..c469f775f9 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -195,6 +195,13 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) {
return make_reg(0, 1);
} else {
int16 language = argv[1].toSint16();
+
+ // athrxx: It seems from disasm that the original KQ5 FM-Towns loads a default language (Japanese) audio map at the beginning
+ // right after loading the video and audio drivers. The -1 language argument in here simply means that the original will stick
+ // with Japanese. Instead of doing that we switch to the language selected in the launcher.
+ if (g_sci->getPlatform() == Common::kPlatformFMTowns && language == -1)
+ language = (g_sci->getLanguage() == Common::JA_JPN) ? K_LANG_JAPANESE : K_LANG_ENGLISH;
+
debugC(kDebugLevelSound, "kDoAudio: set language to %d", language);
if (language != -1)