diff options
author | Travis Howell | 2007-06-15 06:30:44 +0000 |
---|---|---|
committer | Travis Howell | 2007-06-15 06:30:44 +0000 |
commit | f8b030991dc63ff39df3836029d0725f294de156 (patch) | |
tree | 3a48bbffdbb6f7135ca0ea9f8974802075e3b126 | |
parent | ef14ab45df2c1e1994a66f9103ae181dcda1df60 (diff) | |
download | scummvm-rg350-f8b030991dc63ff39df3836029d0725f294de156.tar.gz scummvm-rg350-f8b030991dc63ff39df3836029d0725f294de156.tar.bz2 scummvm-rg350-f8b030991dc63ff39df3836029d0725f294de156.zip |
When selecting language, ignore request for language that doesn't exist.
svn-id: r27414
-rw-r--r-- | engines/parallaction/menu.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/engines/parallaction/menu.cpp b/engines/parallaction/menu.cpp index d0b23b0d49..26285c46b4 100644 --- a/engines/parallaction/menu.cpp +++ b/engines/parallaction/menu.cpp @@ -182,9 +182,6 @@ uint16 Menu::chooseLanguage() { return 1; } - // TODO: should return the language ID supported by Amiga versions - // this can be done with some flags in the detection structures - // user can choose language in dos version _vm->_gfx->setFont(kFontMenu); @@ -207,13 +204,29 @@ uint16 Menu::chooseLanguage() { if (_mouseButtons == kMouseLeftUp) { for (uint16 _si = 0; _si < 4; _si++) { - if (80 + _si*49 >= _vm->_mousePos.x) continue; - if (110 - _si*25 >= _vm->_mousePos.y) continue; + if (80 + _si * 49 >= _vm->_mousePos.x) continue; + if (110 - _si * 25 >= _vm->_mousePos.y) continue; - if (128 + _si*49 <= _vm->_mousePos.x) continue; - if (180 - _si*25 <=_vm->_mousePos.y) continue; + if (128 + _si * 49 <= _vm->_mousePos.x) continue; + if (180 - _si * 25 <= _vm->_mousePos.y) continue; // beep(); + + switch (_si) { + case 0: + if (!(_vm->getFeatures() & GF_LANG_IT)) + continue; + case 1: + if (!(_vm->getFeatures() & GF_LANG_FR)) + continue; + case 2: + if (!(_vm->getFeatures() & GF_LANG_EN)) + continue; + case 3: + if (!(_vm->getFeatures() & GF_LANG_DE)) + continue; + } + return _si; } } |