diff options
author | Max Horn | 2006-04-08 23:43:18 +0000 |
---|---|---|
committer | Max Horn | 2006-04-08 23:43:18 +0000 |
commit | 85c9dc7de8822821c8f29e8958af1b39cc77b7b8 (patch) | |
tree | 1ea937ade3c4280bb0c79833ff48ca27ab11b05b /engines/scumm | |
parent | c09fef73c021a7ca434c807685116e9c340455ad (diff) | |
download | scummvm-rg350-85c9dc7de8822821c8f29e8958af1b39cc77b7b8.tar.gz scummvm-rg350-85c9dc7de8822821c8f29e8958af1b39cc77b7b8.tar.bz2 scummvm-rg350-85c9dc7de8822821c8f29e8958af1b39cc77b7b8.zip |
Properly translate Common::Language values for COMI
svn-id: r21704
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/scumm.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/vars.cpp | 35 |
2 files changed, 35 insertions, 5 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 7ee72bae50..3b6f8dece8 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -879,11 +879,8 @@ int ScummEngine::init(GameDetector &detector) { // Setup the music engine setupMusic(_game.midi); - // TODO: We shouldn't rely on the global Language values matching those COMI etc. expect. - // Rather we should explicitly translate them. - _language = Common::parseLanguage(ConfMan.get("language")); - // Load localization data, if present + _language = Common::parseLanguage(ConfMan.get("language")); loadLanguageBundle(); // Load CJK font, if present diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp index da713d72f5..0ae5b1f6cc 100644 --- a/engines/scumm/vars.cpp +++ b/engines/scumm/vars.cpp @@ -574,7 +574,40 @@ void ScummEngine_v7::initScummVars() { if (_game.version == 8) { // FIXME: How do we deal with non-cd installs? VAR(VAR_CURRENTDISK) = 1; - VAR(VAR_LANGUAGE) = _language; + + switch (_language) { + case Common::EN_ANY: + case Common::EN_USA: + case Common::EN_GRB: + VAR(VAR_LANGUAGE) = 0; + break; + case Common::DE_DEU: + VAR(VAR_LANGUAGE) = 1; + break; + case Common::FR_FRA: + VAR(VAR_LANGUAGE) = 2; + break; + case Common::IT_ITA: + VAR(VAR_LANGUAGE) = 3; + break; + case Common::PT_BRA: + VAR(VAR_LANGUAGE) = 4; + break; + case Common::ES_ESP: + VAR(VAR_LANGUAGE) = 5; + break; + case Common::JA_JPN: + VAR(VAR_LANGUAGE) = 6; + break; + case Common::ZH_TWN: + VAR(VAR_LANGUAGE) = 7; + break; + case Common::KO_KOR: + VAR(VAR_LANGUAGE) = 8; + break; + default: + VAR(VAR_LANGUAGE) = 0; // Default to english + } } else { VAR(VAR_V6_EMSSPACE) = 10000; VAR(VAR_NUM_GLOBAL_OBJS) = _numGlobalObjects - 1; |