diff options
author | Martin Kiewitz | 2010-01-08 22:52:50 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-08 22:52:50 +0000 |
commit | af8298d4f8f75b6fdc14ae6d21120bc82a1df560 (patch) | |
tree | 24cdddbe821fe32e698329f098c7b55500ef88ed /engines/sci | |
parent | 75a4ef14f1d75fc53b915cf3cfdaf59ae31c550f (diff) | |
download | scummvm-rg350-af8298d4f8f75b6fdc14ae6d21120bc82a1df560.tar.gz scummvm-rg350-af8298d4f8f75b6fdc14ae6d21120bc82a1df560.tar.bz2 scummvm-rg350-af8298d4f8f75b6fdc14ae6d21120bc82a1df560.zip |
SCI: removed controlify() to ease readability of code
svn-id: r47186
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/event.cpp | 12 | ||||
-rw-r--r-- | engines/sci/event.h | 1 |
2 files changed, 3 insertions, 10 deletions
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index 715156eee9..88645b625d 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -51,12 +51,6 @@ struct scancode_row { {0x2c, "ZXCVBNM,./"} }; -int SciEvent::controlify(int ch) { - if (ch < 26) - ch += 96; // 0x01 -> 'a' - return ch; -} - int SciEvent::altify (int ch) { // Calculates a PC keyboard scancode from a character */ int row; @@ -369,7 +363,7 @@ sciEvent SciEvent::get(unsigned int mask) { // we support the other case as well if (event.modifiers & SCI_KEYMOD_ALT) { if (event.character < 26) - event.character += 96; + event.character += 96; // 0x01 -> 'a' } if (getSciVersion() <= SCI_VERSION_1_MIDDLE) { @@ -378,8 +372,8 @@ sciEvent SciEvent::get(unsigned int mask) { if (event.modifiers & SCI_KEYMOD_ALT) { event.character = altify(event.character); } else if (event.modifiers & SCI_KEYMOD_CTRL) { - //event.character = event.data; - event.character = controlify(event.character); + if (event.character < 26) + event.character += 96; // 0x01 -> 'a' } } diff --git a/engines/sci/event.h b/engines/sci/event.h index b381e9e16f..610fd566fc 100644 --- a/engines/sci/event.h +++ b/engines/sci/event.h @@ -119,7 +119,6 @@ public: sciEvent get(unsigned int mask); private: - int controlify (int ch); int altify (int ch); int shiftify (int c); int numlockify (int c); |