diff options
author | Travis Howell | 2005-11-18 02:31:24 +0000 |
---|---|---|
committer | Travis Howell | 2005-11-18 02:31:24 +0000 |
commit | 6d76392b7f43948477c0fbd25cabe9be704e25b7 (patch) | |
tree | eaf80d635547f9ae3dcb8aa74af5d5a9cdeb4298 | |
parent | 2f8306aeb4601fccbb0c58becd29488b2db43dc7 (diff) | |
download | scummvm-rg350-6d76392b7f43948477c0fbd25cabe9be704e25b7.tar.gz scummvm-rg350-6d76392b7f43948477c0fbd25cabe9be704e25b7.tar.bz2 scummvm-rg350-6d76392b7f43948477c0fbd25cabe9be704e25b7.zip |
Remove hard coded language values.
svn-id: r19636
-rw-r--r-- | simon/items.cpp | 17 | ||||
-rw-r--r-- | simon/saveload.cpp | 6 | ||||
-rw-r--r-- | simon/simon.cpp | 8 | ||||
-rw-r--r-- | simon/verb.cpp | 56 | ||||
-rw-r--r-- | simon/vga.cpp | 2 |
5 files changed, 60 insertions, 29 deletions
diff --git a/simon/items.cpp b/simon/items.cpp index 74c741c3cb..70d1e332a4 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -1388,21 +1388,24 @@ void SimonEngine::o_confirmQuit() { byte keyNo = 'n'; switch (_language) { - case 21: // Russian + case Common::RU_RUS: break; - case 20: // Hebrew + case Common::PL_POL: + keyYes = 't'; + break; + case Common::HB_ISR: keyYes = 'f'; break; - case 5: // Spanish + case Common::ES_ESP: keyYes = 's'; break; - case 3: // Italian + case Common::IT_ITA: keyYes = 's'; break; - case 2: // French + case Common::FR_FRA: keyYes = 'o'; break; - case 1: // German + case Common::DE_DEU: keyYes = 'j'; break; default: @@ -1577,7 +1580,7 @@ void SimonEngine::o_clear_character(FillOrCopyStruct *fcs, int x, byte b) { old_text = fcs->text_color; fcs->text_color = fcs->fill_color; - if (_language == 20) { //Hebrew + if (_language == Common::HB_ISR) { //Hebrew x = 128; } else { x += 120; diff --git a/simon/saveload.cpp b/simon/saveload.cpp index c3e2fca004..87fd99d937 100644 --- a/simon/saveload.cpp +++ b/simon/saveload.cpp @@ -227,7 +227,7 @@ restart:; fcs->textRow = unk132_result; - if (_language == 20) { //Hebrew + if (_language == Common::HB_ISR) { //Hebrew // init x offset with a 2 character savegame number + a period (18 pix) fcs->textColumn = 3; fcs->textColumnOffset = 6; @@ -244,7 +244,7 @@ restart:; // now process entire savegame name to get correct x offset for cursor name_len = 0; while (name[name_len]) { - if (_language == 20) { //Hebrew + if (_language == Common::HB_ISR) { //Hebrew byte width = 6; if (name[name_len] >= 64 && name[name_len] < 91) width = _hebrew_char_widths [name[name_len] - 64]; @@ -309,7 +309,7 @@ restart:; name_len--; m = name[name_len]; - if (_language == 20) //Hebrew + if (_language == Common::HB_ISR) //Hebrew x = 8; else x = (name[name_len] == 'i' || name[name_len] == 'l') ? 1 : 8; diff --git a/simon/simon.cpp b/simon/simon.cpp index 8a424e13af..abfdf05e47 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -574,7 +574,7 @@ int SimonEngine::init(GameDetector &detector) { if ((getGameType() == GType_SIMON2) && ConfMan.hasKey("speech_mute") && ConfMan.getBool("speech_mute") == 1) _speech = 0; - if ((getGameType() == GType_SIMON1 && _language > 1) || ((getGameType() == GType_SIMON2) && _language == 20)) { + if ((getGameType() == GType_SIMON1 && _language > 1) || ((getGameType() == GType_SIMON2) && _language == Common::HB_ISR)) { if (ConfMan.hasKey("subtitles") && ConfMan.getBool("subtitles") == 0) _subtitles = 0; } else @@ -2636,7 +2636,7 @@ void SimonEngine::add_vga_timer(uint num, const byte *code_ptr, uint cur_sprite, // caused several glitches in this scene. // We work around the problem by correcting the code_ptr for sprite // 200 in this scene, if it is wrong. - if (getGameType() == GType_SIMON1 && _language == 2 && + if (getGameType() == GType_SIMON1 && _language == Common::FR_FRA && (code_ptr - _vgaBufferPointers[cur_file].vgaFile1 == 4) && (cur_sprite == 200) && (cur_file == 2)) code_ptr += 0x66; @@ -3444,7 +3444,7 @@ void SimonEngine::talk_with_speech(uint speech_id, uint vgaSpriteId) { } _skipVgaWait = true; } else { - if (_subtitles && _language != 20) { + if (_subtitles && _language != Common::HB_ISR) { _sound->playVoice(speech_id); return; } else if (_subtitles && _scriptVar2) { @@ -3990,7 +3990,7 @@ int SimonEngine::go() { if (getFeatures() & GF_TALKIE) { // English and German versions of Simon the Sorcerer 1 don't have full subtitles - if (getGameType() == GType_SIMON1 && _language < 2) + if (getGameType() == GType_SIMON1 && (_language == Common::EN_USA || _language == Common::DE_DEU)) _subtitles = false; } else { _subtitles = true; diff --git a/simon/verb.cpp b/simon/verb.cpp index 2a3be4b6eb..4ef8e669a1 100644 --- a/simon/verb.cpp +++ b/simon/verb.cpp @@ -221,25 +221,53 @@ void SimonEngine::focusVerb(uint hitarea_id) { if (_showPreposition) { switch (_language) { - case 21: verb_prep_names = russian_verb_prep_names; break; - case 20: verb_prep_names = hebrew_verb_prep_names; break; - case 5: verb_prep_names = spanish_verb_prep_names; break; - case 3: verb_prep_names = italian_verb_prep_names; break; - case 2: verb_prep_names = french_verb_prep_names; break; - case 1: verb_prep_names = german_verb_prep_names; break; - default: verb_prep_names = english_verb_prep_names; break; + case Common::RU_RUS: + verb_prep_names = russian_verb_prep_names; + break; + case Common::HB_ISR: + verb_prep_names = hebrew_verb_prep_names; + break; + case Common::ES_ESP: + verb_prep_names = spanish_verb_prep_names; + break; + case Common::IT_ITA: + verb_prep_names = italian_verb_prep_names; + break; + case Common::FR_FRA: + verb_prep_names = french_verb_prep_names; + break; + case Common::DE_DEU: + verb_prep_names = german_verb_prep_names; + break; + default: + verb_prep_names = english_verb_prep_names; + break; } CHECK_BOUNDS(hitarea_id, english_verb_prep_names); txt = verb_prep_names[hitarea_id]; } else { switch (_language) { - case 21: verb_names = russian_verb_names; break; - case 20: verb_names = hebrew_verb_names; break; - case 5: verb_names = spanish_verb_names; break; - case 3: verb_names = italian_verb_names; break; - case 2: verb_names = french_verb_names; break; - case 1: verb_names = german_verb_names; break; - default: verb_names = english_verb_names; break; + case Common::RU_RUS: + verb_names = russian_verb_names; + break; + case Common::HB_ISR: + verb_names = hebrew_verb_names; + break; + case Common::ES_ESP: + verb_names = spanish_verb_names; + break; + case Common::IT_ITA: + verb_names = italian_verb_names; + break; + case Common::FR_FRA: + verb_names = french_verb_names; + break; + case Common::DE_DEU: + verb_names = german_verb_names; + break; + default: + verb_names = english_verb_names; + break; } CHECK_BOUNDS(hitarea_id, english_verb_names); txt = verb_names[hitarea_id]; diff --git a/simon/vga.cpp b/simon/vga.cpp index 7892002d6e..d0453eba95 100644 --- a/simon/vga.cpp +++ b/simon/vga.cpp @@ -1914,7 +1914,7 @@ void SimonEngine::vc63_fastFadeIn() { void SimonEngine::vc64_skipIfSpeechEnded() { // Simon2 - if (!_sound->isVoiceActive() || (_subtitles && _language != 20)) + if (!_sound->isVoiceActive() || (_subtitles && _language != Common::HB_ISR)) vc_skip_next_instruction(); } |