aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-03-19 11:10:24 +0000
committerTravis Howell2006-03-19 11:10:24 +0000
commit3f172bb3c2d1cadfe1d1bf31cfcab4f1d478673c (patch)
treeae50edf91af54d5a989d0bae2426e7393ac28039 /engines
parentf26dee75995e6349385e59f67d467d85ce8787f2 (diff)
downloadscummvm-rg350-3f172bb3c2d1cadfe1d1bf31cfcab4f1d478673c.tar.gz
scummvm-rg350-3f172bb3c2d1cadfe1d1bf31cfcab4f1d478673c.tar.bz2
scummvm-rg350-3f172bb3c2d1cadfe1d1bf31cfcab4f1d478673c.zip
Remove unused cases of getKeyState(), checked against scripts of FT, Dig and COMI.
svn-id: r21381
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/script_v6.cpp67
1 files changed, 1 insertions, 66 deletions
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index d5784c58f9..0e1c9cafa4 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -2786,39 +2786,8 @@ void ScummEngine_v6::o6_kernelGetFunctions() {
}
}
-// FIXME: check either some warning will trigger. I am not sure that those
-// keys are queried in scripts at all
int ScummEngine::getKeyState(int key) {
switch (key) {
- case 0x145:
- warning("ScummEngine::getKeyState(%x) 'numlock' is probed", key);
- return 0;
- break;
- case 0x164:
- warning("ScummEngine::getKeyState(%x) 'left shift' is probed", key);
- return 0;
- break;
- case 0x165:
- warning("ScummEngine::getKeyState(%x) 'right shift' is probed", key);
- return 0;
- break;
- case 0x166:
- case 0x167:
- warning("ScummEngine::getKeyState(%x) 'alt' is probed", key);
- return 0;
- break;
- case 0x168:
- warning("ScummEngine::getKeyState(%x) 'left ctrl' is probed", key);
- return 0;
- break;
- case 0x202a:
- warning("ScummEngine::getKeyState(%x) 'gray *' is probed", key);
- return 0;
- break;
- case 0x202d:
- warning("ScummEngine::getKeyState(%x) 'gray -' is probed", key);
- return 0;
- break;
case 0x147: // Home
return (_keyDownMap[0x107] || _keyDownMap[0x115]) ? 1 : 0;
break;
@@ -2829,24 +2798,14 @@ int ScummEngine::getKeyState(int key) {
case 0x149: // PgUp
return (_keyDownMap[0x109] || _keyDownMap[0x118]) ? 1 : 0;
break;
- case 0x14A: // Gray-
- return (_keyDownMap[0x10d] || _keyDownMap[0x2d]) ? 1 : 0;
- break;
case 0x14B: // Left
return (_keyDownMap[0x104] || _keyDownMap[0x114] ||
_keyDownMap[0x34]) ? 1 : 0;
break;
- case 0x14C: // 5
- return (_keyDownMap[0x105]) ? 1 : 0;
- break;
case 0x14D: // Right
return (_keyDownMap[0x106] || _keyDownMap[0x113] ||
_keyDownMap[0x36]) ? 1 : 0;
break;
- case 0x14E: // Gray+
- return (_keyDownMap[0x10e] ||
- (_keyDownMap[0x13d] && _keyDownMap[0x12f])) ? 1 : 0;
- break;
case 0x14F: // End
return (_keyDownMap[0x101] || _keyDownMap[0x117]) ? 1 : 0;
break;
@@ -2857,34 +2816,10 @@ int ScummEngine::getKeyState(int key) {
case 0x151: // PgDn
return (_keyDownMap[0x103] || _keyDownMap[0x119]) ? 1 : 0;
break;
- case 0x152: // Ins
- return (_keyDownMap[0x100] || _keyDownMap[0x115]) ? 1 : 0;
- break;
- case 0x153: // Del
- return (_keyDownMap[0x10a] || _keyDownMap[0x7f]) ? 1 : 0;
- break;
default:
+ return (_keyDownMap[key]) ? 1 : 0;
break;
}
-
- if (key >= 0x13b && key <= 0x144) { // F1-F10
- key -= 0x13b - 0x11a;
- } else if (key >= 0x154 && key <= 0x15d) { // Shift+F1-F10
- key -= 0x154 - 0x11a; // map it to just F1-F10
-
- warning("ScummEngine::getKeyState(%x) 'Shift-F%d' is probed", key, key-0x153);
- } else if (key > 0x8000) { // Alt
- key -= 0x8000;
- key += 154; // see ScummEngine::parseEvents()
- } else if (key > 0x4000) { // Ctrl
- key -= 0x4000;
- key -= 0x40;
- } else if (key > 0x2000) { // Gray keys
- key -= 0x2000;
- warning("ScummEngine::getKeyState(%x) 'gray key' is probed", key);
- }
-
- return (_keyDownMap[key]) ? 1 : 0;
}
void ScummEngine_v6::o6_delayFrames() {