diff options
author | Max Horn | 2003-06-21 01:45:38 +0000 |
---|---|---|
committer | Max Horn | 2003-06-21 01:45:38 +0000 |
commit | b81cbb930f4efe9e407d5fa38641f2ca8d931fda (patch) | |
tree | c41647185cee919501e960832bfbf900bd7a0259 /scumm | |
parent | 5477d0831b77ff89b6f1bef61573df35ab3e9310 (diff) | |
download | scummvm-rg350-b81cbb930f4efe9e407d5fa38641f2ca8d931fda.tar.gz scummvm-rg350-b81cbb930f4efe9e407d5fa38641f2ca8d931fda.tar.bz2 scummvm-rg350-b81cbb930f4efe9e407d5fa38641f2ca8d931fda.zip |
support F-keys in V2 games
svn-id: r8576
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/scummvm.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index d204121060..3790e82fc4 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -1809,6 +1809,10 @@ void Scumm::clearClickedStatus() { int Scumm::checkKeyHit() { int a = _keyPressed; _keyPressed = 0; + if (_version <= 2 && 315 <= a && a < 315+12) { + // Convert F-Keys + a -= 314; + } return a; } @@ -1921,8 +1925,10 @@ void Scumm::processKbd() { int saveloadkey; getKeyInput(); - if ((_features & GF_OLD256) || (_gameId == GID_CMI) || (_features & GF_OLD_BUNDLE)) /* FIXME: Support ingame screen */ - saveloadkey = 319; + if (_version <= 2) + saveloadkey = 5; // F5 + else if ((_features & GF_OLD256) || (_gameId == GID_CMI)) /* FIXME: Support ingame screen ? */ + saveloadkey = 319; // F5 else saveloadkey = VAR(VAR_SAVELOADDIALOG_KEY); @@ -2015,6 +2021,16 @@ void Scumm::processKbd() { VAR(VAR_CHARINC) = _defaultTalkDelay / 20; } else if (_lastKeyHit == '~' || _lastKeyHit == '#') { // Debug console g_debugger->attach(this, NULL); + } else if (_version <= 2) { + // Store the input type. So far we can't distinguish + // between 1, 3 and 5. + // 1) Verb 2) Scene 3) Inv. 4) Key + // 5) Sentence Bar + + if (_lastKeyHit) { // Key Input + VAR(VAR_KEYPRESS) = _lastKeyHit; + runInputScript(4, 0, 0); + } } _mouseButStat = _lastKeyHit; @@ -2065,16 +2081,6 @@ int Scumm::getKeyInput() { } else if (_version == 7) { VAR(VAR_LEFTBTN_HOLD) = (_leftBtnPressed & msDown) != 0; VAR(VAR_RIGHTBTN_HOLD) = (_rightBtnPressed & msDown) != 0; - } else if (_version <= 2) { - // Store the input type. So far we can't distinguish - // between 1, 3 and 5. - // 1) Verb 2) Scene 3) Inv. 4) Key - // 5) Sentence Bar - - if (_lastKeyHit) { // Key Input - VAR(VAR_KEYPRESS) = _lastKeyHit; - runInputScript(4, 0, 0); - } } _leftBtnPressed &= ~msClicked; |