- Set language to Common::UNK_LANG for multilanguage games (kyra2cd and kyra3) in detection code

- Save language changes done in menu in HoF to the config file

svn-id: r31454
This commit is contained in:
Johannes Schickel 2008-04-08 18:52:27 +00:00
parent e4ddd5d5f1
commit 50c3732478
3 changed files with 29 additions and 46 deletions

View File

@ -301,29 +301,7 @@ const KYRAGameDescription adGameDescs[] = {
"kyra2",
"CD",
AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"),
Common::EN_ANY,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
},
KYRA2_CD_FLAGS
},
{
{
"kyra2",
"CD",
AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"),
Common::DE_DEU,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
},
KYRA2_CD_FLAGS
},
{
{
"kyra2",
"CD",
AD_ENTRY1("FATE.PAK", "28cbad1c5bf06b2d3825ae57d760d032"),
Common::FR_FRA,
Common::UNK_LANG,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
},
@ -382,29 +360,7 @@ const KYRAGameDescription adGameDescs[] = {
"kyra3",
0,
AD_ENTRY1("ONETIME.PAK", "3833ff312757b8e6147f464cca0a6587"),
Common::EN_ANY,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
},
KYRA3_CD_FLAGS
},
{
{
"kyra3",
0,
AD_ENTRY1("ONETIME.PAK", "3833ff312757b8e6147f464cca0a6587"),
Common::DE_DEU,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
},
KYRA3_CD_FLAGS
},
{
{
"kyra3",
0,
AD_ENTRY1("ONETIME.PAK", "3833ff312757b8e6147f464cca0a6587"),
Common::FR_FRA,
Common::UNK_LANG,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
},
@ -480,6 +436,9 @@ bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common
flags.lang = Common::EN_ANY;
}
if (flags.lang == Common::EN_USA || flags.lang == Common::EN_GRB)
flags.lang = Common::EN_ANY;
switch (flags.gameID) {
case Kyra::GI_KYRA1:
*engine = new Kyra::KyraEngine_v1(syst, flags);

View File

@ -205,6 +205,8 @@ protected:
GameFlags _flags;
int _lang;
void updateLanguage();
// opcode
virtual void setupOpcodeTable() = 0;
Common::Array<const Opcode*> _opcodes;

View File

@ -2261,6 +2261,28 @@ void KyraEngine_v2::registerDefaultSettings() {
void KyraEngine_v2::writeSettings() {
ConfMan.setInt("talkspeed", ((_configTextspeed-2) * 255) / 95);
switch (_lang) {
case 1:
_flags.lang = Common::FR_FRA;
break;
case 2:
_flags.lang = Common::DE_DEU;
break;
case 3:
_flags.lang = Common::JA_JPN;
break;
case 0:
default:
_flags.lang = Common::EN_ANY;
break;
}
ConfMan.set("language", Common::getLanguageCode(_flags.lang));
KyraEngine::writeSettings();
}