diff options
author | Martin Kiewitz | 2009-12-04 18:02:48 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-12-04 18:02:48 +0000 |
commit | 3db191275955ce6bf912a96edf39b2a38b9e4c77 (patch) | |
tree | 63cbd48f56d90f0f4e7c3c6814b757ae9d38e2f2 /engines/sci | |
parent | d982d1050585449a3c966161d2bde5ef46069895 (diff) | |
download | scummvm-rg350-3db191275955ce6bf912a96edf39b2a38b9e4c77.tar.gz scummvm-rg350-3db191275955ce6bf912a96edf39b2a38b9e4c77.tar.bz2 scummvm-rg350-3db191275955ce6bf912a96edf39b2a38b9e4c77.zip |
SCI: Renamed "buckybits" to "modifiers" in SciEvent
svn-id: r46256
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kevent.cpp | 8 | ||||
-rw-r--r-- | engines/sci/event.cpp | 22 | ||||
-rw-r--r-- | engines/sci/event.h | 4 |
3 files changed, 17 insertions, 17 deletions
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp index 2ca8e13ab8..02e1961d80 100644 --- a/engines/sci/engine/kevent.cpp +++ b/engines/sci/engine/kevent.cpp @@ -75,11 +75,11 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { break; case SCI_EVENT_KEYBOARD: - if ((curEvent.buckybits & SCI_KEYMOD_LSHIFT) && (curEvent.buckybits & SCI_KEYMOD_RSHIFT) && (curEvent.data == '-')) { + if ((curEvent.modifiers & SCI_KEYMOD_LSHIFT) && (curEvent.modifiers & SCI_KEYMOD_RSHIFT) && (curEvent.data == '-')) { printf("Debug mode activated\n"); g_debugState.seeking = kDebugSeekNothing; g_debugState.runningStep = 0; - } else if ((curEvent.buckybits & SCI_KEYMOD_CTRL) && (curEvent.data == '`')) { + } else if ((curEvent.modifiers & SCI_KEYMOD_CTRL) && (curEvent.data == '`')) { printf("Debug mode activated\n"); g_debugState.seeking = kDebugSeekNothing; g_debugState.runningStep = 0; @@ -89,7 +89,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { PUT_SEL32V(segMan, obj, message, curEvent.character); // We only care about the translated character - PUT_SEL32V(segMan, obj, modifiers, curEvent.buckybits&modifier_mask); + PUT_SEL32V(segMan, obj, modifiers, curEvent.modifiers & modifier_mask); } break; @@ -117,7 +117,7 @@ reg_t kGetEvent(EngineState *s, int argc, reg_t *argv) { PUT_SEL32V(segMan, obj, type, curEvent.type); PUT_SEL32V(segMan, obj, message, 0); - PUT_SEL32V(segMan, obj, modifiers, (curEvent.buckybits | extra_bits)&modifier_mask); + PUT_SEL32V(segMan, obj, modifiers, (curEvent.modifiers | extra_bits) & modifier_mask); s->r_acc = make_reg(0, 1); } break; diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp index 4e06866601..3cf28c4fe2 100644 --- a/engines/sci/event.cpp +++ b/engines/sci/event.cpp @@ -215,7 +215,7 @@ sciEvent SciEvent::getFromScummVM() { } //TODO: SCI_EVM_INSERT - input.buckybits = + input.modifiers = ((modifiers & Common::KBD_ALT) ? SCI_KEYMOD_ALT : 0) | ((modifiers & Common::KBD_CTRL) ? SCI_KEYMOD_CTRL : 0) | ((modifiers & Common::KBD_SHIFT) ? SCI_KEYMOD_LSHIFT | SCI_KEYMOD_RSHIFT : 0) | @@ -237,7 +237,7 @@ sciEvent SciEvent::getFromScummVM() { input.type = SCI_EVENT_NONE; input.character = 0; input.data = 0; - input.buckybits = 0; + input.modifiers = 0; return input; } @@ -249,7 +249,7 @@ sciEvent SciEvent::getFromScummVM() { // Tab input.type = SCI_EVENT_KEYBOARD; input.data = SCI_KEY_TAB; - if (input.buckybits & (SCI_KEYMOD_LSHIFT | SCI_KEYMOD_RSHIFT)) + if (input.modifiers & (SCI_KEYMOD_LSHIFT | SCI_KEYMOD_RSHIFT)) input.character = SCI_KEY_SHIFT_TAB; else input.character = SCI_KEY_TAB; @@ -260,7 +260,7 @@ sciEvent SciEvent::getFromScummVM() { // SCI_K_F1 == 59 << 8 // SCI_K_SHIFT_F1 == 84 << 8 input.data = SCI_KEY_F1 + ((input.data - Common::KEYCODE_F1)<<8); - if (input.buckybits & (SCI_KEYMOD_LSHIFT | SCI_KEYMOD_RSHIFT)) + if (input.modifiers & (SCI_KEYMOD_LSHIFT | SCI_KEYMOD_RSHIFT)) input.character = input.data + 25; else input.character = input.data; @@ -400,23 +400,23 @@ sciEvent SciEvent::get(unsigned int mask) { event.character = event.data; // TODO: Remove this as soon as ScummVM handles Ctrl-Alt-X to us - if ((event.buckybits == SCI_KEYMOD_CTRL) && (event.character = 'x')) - event.buckybits |= SCI_KEYMOD_ALT; + if ((event.modifiers == SCI_KEYMOD_CTRL) && (event.character = 'x')) + event.modifiers |= SCI_KEYMOD_ALT; // Scancodify if appropriate - if (event.buckybits & SCI_KEYMOD_ALT) { + if (event.modifiers & SCI_KEYMOD_ALT) { event.character = altify(event.character); - } else if (event.buckybits & SCI_KEYMOD_CTRL) { + } else if (event.modifiers & SCI_KEYMOD_CTRL) { event.character = controlify(event.character); } // Shift if appropriate - else if (((event.buckybits & (SCI_KEYMOD_RSHIFT | SCI_KEYMOD_LSHIFT)) && !(event.buckybits & SCI_KEYMOD_CAPSLOCK)) - || (!(event.buckybits & (SCI_KEYMOD_RSHIFT | SCI_KEYMOD_LSHIFT)) && (event.buckybits & SCI_KEYMOD_CAPSLOCK))) + else if (((event.modifiers & (SCI_KEYMOD_RSHIFT | SCI_KEYMOD_LSHIFT)) && !(event.modifiers & SCI_KEYMOD_CAPSLOCK)) + || (!(event.modifiers & (SCI_KEYMOD_RSHIFT | SCI_KEYMOD_LSHIFT)) && (event.modifiers & SCI_KEYMOD_CAPSLOCK))) event.character = shiftify(event.character); // Numlockify if appropriate - else if (event.buckybits & SCI_KEYMOD_NUMLOCK) + else if (event.modifiers & SCI_KEYMOD_NUMLOCK) event.data = numlockify(event.data); } diff --git a/engines/sci/event.h b/engines/sci/event.h index 1645d2294d..b381e9e16f 100644 --- a/engines/sci/event.h +++ b/engines/sci/event.h @@ -37,9 +37,9 @@ namespace Sci { struct sciEvent { short type; short data; - short buckybits; + short modifiers; short character; /* for keyboard events: 'data' after applying - ** the effects of 'buckybits', e.g. if + ** the effects of 'modifiers', e.g. if ** type == SCI_EVT_KEYBOARD ** data == 'a' ** buckybits == SCI_EVM_LSHIFT |