aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/input.cpp
diff options
context:
space:
mode:
authorMax Horn2007-06-23 11:53:24 +0000
committerMax Horn2007-06-23 11:53:24 +0000
commit302da0b8550081a8716b26043ab02124125a49b6 (patch)
tree4d98cdf0803ccbbbe9ff0c26540daced8b687721 /engines/scumm/input.cpp
parent3ce5f8abf3a1d293071eba7f640caa1ead0a9596 (diff)
downloadscummvm-rg350-302da0b8550081a8716b26043ab02124125a49b6.tar.gz
scummvm-rg350-302da0b8550081a8716b26043ab02124125a49b6.tar.bz2
scummvm-rg350-302da0b8550081a8716b26043ab02124125a49b6.zip
SCUMM: Added three FIXME comments to the _keyDownMap code, and made it use KEYCODE_ constants for clarity
svn-id: r27659
Diffstat (limited to 'engines/scumm/input.cpp')
-rw-r--r--engines/scumm/input.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index d8fc4dac5b..36440b102a 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -142,6 +142,19 @@ void ScummEngine::parseEvents() {
VAR(VAR_KEY_STATE) = _keyState;
}
+ // FIXME: There is a discrepancy between EVENT_KEYDOWN and EVENT_KEYUP here:
+ // For EVENT_KEYDOWN, we use _keyPressed.keycode, which has potentially been
+ // modified, while for EVENT_KEYUP we use the unfiltered event.kbd.keycode.
+ // This could lead problems (like a key becoming 'stuck').
+
+ // FIXME #2: We are mixing ascii and keycode values here. We probably should
+ // be using keycodes, but at least INSANE checks for "Shift-V" by looking for
+ // the 'V' key being pressed. It would be easy to solve that by also storing the
+ // the modifier flags. However, since getKeyState() is also called by scripts,
+ // we have to be very careful with semantic changes.
+ // Nevertheless, it's bad to rely on "ascii" holdoing keycode values for special
+ // keys (like the function keys), so this should be fixed.
+
if (_keyPressed.ascii >= 512)
debugC(DEBUG_GENERAL, "_keyPressed > 512 (%d)", _keyPressed.ascii);
else