aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorathrxx2011-11-01 11:59:52 +0100
committerathrxx2011-11-01 20:29:53 +0100
commit731382ad516a5d5fd7891c9f88146561ff5860da (patch)
treec0b6dc1df4ef37c650f6c989fc24a25fc81dffd3 /engines/sci
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')
-rw-r--r--engines/sci/detection_tables.h10
-rw-r--r--engines/sci/engine/ksound.cpp7
2 files changed, 15 insertions, 2 deletions
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 5da12d6695..21324ef92e 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -1382,7 +1382,13 @@ static const struct ADGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "71afd220d46bde1109c58e6acc0f3a01", 469094},
{"resource.001", 0, "72a569f46f1abf2d9d2b1526ad3799c3", 12808839},
AD_LISTEND},
- Common::EN_ANY, Common::kPlatformFMTowns, 0, GUIO1(GUIO_NOASPECT) },
+ Common::EN_ANY, Common::kPlatformFMTowns, 0, GUIO2(GUIO_NOASPECT, GUIO_MIDITOWNS) },
+ {"kq5", "", {
+ {"resource.map", 0, "20c7cd248ff1a349ed354568eebd972b", 12733},
+ {"resource.000", 0, "71afd220d46bde1109c58e6acc0f3a01", 469094},
+ {"resource.001", 0, "72a569f46f1abf2d9d2b1526ad3799c3", 12808839},
+ AD_LISTEND},
+ Common::JA_JPN, Common::kPlatformFMTowns, 0, GUIO2(GUIO_NOASPECT, GUIO_MIDITOWNS) },
// King's Quest 5 - Japanese PC-98 Floppy 0.000.015 (supplied by omer_mor in bug report #3073583)
{"kq5", "", {
@@ -3786,4 +3792,4 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_TABLE_END_MARKER
};
-} // End of namespace Sci
+} // End of namespace Sci \ No newline at end of file
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)