Skip to content

Commit

Permalink
SCI: add Japanese detection entry for KQ5 FM-Towns and fix audio lang…
Browse files Browse the repository at this point in the history
…uage handling
  • Loading branch information
athrxx committed Nov 1, 2011
1 parent de5d3fc commit 731382a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions engines/sci/detection_tables.h
Expand Up @@ -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", "", {
Expand Down Expand Up @@ -3786,4 +3792,4 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_TABLE_END_MARKER
};

} // End of namespace Sci
} // End of namespace Sci
7 changes: 7 additions & 0 deletions engines/sci/engine/ksound.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 731382a

Please sign in to comment.