aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx
diff options
context:
space:
mode:
authorFilippos Karapetis2009-06-04 08:28:20 +0000
committerFilippos Karapetis2009-06-04 08:28:20 +0000
commit70effa46e55100630df3b902918c75e77d505188 (patch)
tree29dc563df2f3832e50661ddb9a0877f1fe02ef35 /engines/sci/gfx
parent634e0234852ebb37d6cb10bc627d84ebaf35d56f (diff)
downloadscummvm-rg350-70effa46e55100630df3b902918c75e77d505188.tar.gz
scummvm-rg350-70effa46e55100630df3b902918c75e77d505188.tar.bz2
scummvm-rg350-70effa46e55100630df3b902918c75e77d505188.zip
Reordered the numpad keys so that they make more sense, and simplified the code which returns the values of shifted function keys
svn-id: r41155
Diffstat (limited to 'engines/sci/gfx')
-rw-r--r--engines/sci/gfx/operations.cpp26
1 files changed, 3 insertions, 23 deletions
diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp
index 7ab1bc28cd..49c73ac0fd 100644
--- a/engines/sci/gfx/operations.cpp
+++ b/engines/sci/gfx/operations.cpp
@@ -1326,28 +1326,8 @@ int _gfxop_shiftify(int c) {
}
}
- switch (c) {
- case SCI_K_F1 :
- return SCI_K_SHIFT_F1;
- case SCI_K_F2 :
- return SCI_K_SHIFT_F2;
- case SCI_K_F3 :
- return SCI_K_SHIFT_F3;
- case SCI_K_F4 :
- return SCI_K_SHIFT_F4;
- case SCI_K_F5 :
- return SCI_K_SHIFT_F5;
- case SCI_K_F6 :
- return SCI_K_SHIFT_F6;
- case SCI_K_F7 :
- return SCI_K_SHIFT_F7;
- case SCI_K_F8 :
- return SCI_K_SHIFT_F8;
- case SCI_K_F9 :
- return SCI_K_SHIFT_F9;
- case SCI_K_F10 :
- return SCI_K_SHIFT_F10;
- }
+ if (c >= SCI_K_F1 && c <= SCI_K_F10)
+ return c + 25;
return c;
}
@@ -1488,7 +1468,7 @@ static sci_event_t scummvm_get_event(gfx_driver_t *drv) {
// SCI_K_SHIFT_F1 == 84 << 8
input.data = SCI_K_F1 + ((input.data - Common::KEYCODE_F1)<<8);
if (input.buckybits & (SCI_EVM_LSHIFT | SCI_EVM_RSHIFT))
- input.character = input.data + SCI_K_SHIFT_F1 - SCI_K_F1;
+ input.character = input.data + 25;
else
input.character = input.data;
} else {