diff options
author | Paul Gilbert | 2016-01-29 23:02:28 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-01-29 23:02:28 -0500 |
commit | b75f6182b0596e885e4fe70719b818d9cb32694e (patch) | |
tree | 236d90dc32abc8ceef36b096b45fb95d60daa816 /engines | |
parent | 171b79c2c528d03a826ab095fcd3b0ebd3236f94 (diff) | |
download | scummvm-rg350-b75f6182b0596e885e4fe70719b818d9cb32694e.tar.gz scummvm-rg350-b75f6182b0596e885e4fe70719b818d9cb32694e.tar.bz2 scummvm-rg350-b75f6182b0596e885e4fe70719b818d9cb32694e.zip |
SHERLOCK: RT: Simplify ascii char checks, since we don't support accents
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/tattoo/widget_files.cpp | 2 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_foolscap.cpp | 3 | ||||
-rw-r--r-- | engines/sherlock/tattoo/widget_password.cpp | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/engines/sherlock/tattoo/widget_files.cpp b/engines/sherlock/tattoo/widget_files.cpp index ca5e1bff93..ff8cb83dca 100644 --- a/engines/sherlock/tattoo/widget_files.cpp +++ b/engines/sherlock/tattoo/widget_files.cpp @@ -386,7 +386,7 @@ bool WidgetFiles::getFilename() { done = -1; } - if ((keyState.ascii >= ' ') && ((keyState.ascii <= 168) || (keyState.ascii == 225)) && (index < 50)) { + if ((keyState.ascii >= ' ') && (keyState.ascii <= 'z') && (index < 50)) { if (pt.x + _surface.charWidth(keyState.ascii) < _surface.w() - BUTTON_SIZE - 20) { if (insert) filename.insertChar(keyState.ascii, index); diff --git a/engines/sherlock/tattoo/widget_foolscap.cpp b/engines/sherlock/tattoo/widget_foolscap.cpp index 8246e9a371..c8df71e873 100644 --- a/engines/sherlock/tattoo/widget_foolscap.cpp +++ b/engines/sherlock/tattoo/widget_foolscap.cpp @@ -184,8 +184,7 @@ void WidgetFoolscap::handleKeyboardEvents() { TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui; Common::KeyState keyState = ui._keyState; - if (((toupper(keyState.ascii) >= 'A') && (toupper(keyState.ascii) <= 'Z')) || - ((keyState.ascii >= 128) && ((keyState.ascii <= 168) || (keyState.ascii == 225)))) { + if ((toupper(keyState.ascii) >= 'A') && (toupper(keyState.ascii) <= 'Z')) { // Visible key pressed, set it and set the keycode to move the caret to the right _answers[_lineNum][_charNum] = keyState.ascii; keyState.keycode = Common::KEYCODE_RIGHT; diff --git a/engines/sherlock/tattoo/widget_password.cpp b/engines/sherlock/tattoo/widget_password.cpp index 3dd0e308ff..57a5e02653 100644 --- a/engines/sherlock/tattoo/widget_password.cpp +++ b/engines/sherlock/tattoo/widget_password.cpp @@ -159,7 +159,7 @@ void WidgetPassword::handleEvents() { } else if (keycode == Common::KEYCODE_RETURN || keycode == Common::KEYCODE_ESCAPE) { close(); return; - } else if (((ui._keyState.ascii >= ' ' && ui._keyState.ascii < 169) || ui._keyState.ascii == 225)) { + } else if ((ui._keyState.ascii >= ' ') && (ui._keyState.ascii <= 'z')) { if (_cursorPos.x + _surface.charWidth(ui._keyState.ascii) < _bounds.width() - _surface.widestChar() - 3) { if (_insert) _password.insertChar(ui._keyState.ascii, _index); |