aboutsummaryrefslogtreecommitdiff
path: root/scumm/scummvm.cpp
diff options
context:
space:
mode:
authorMax Horn2003-05-21 23:54:39 +0000
committerMax Horn2003-05-21 23:54:39 +0000
commitb12d741ac118eabbdbe7e38383933e0337fc002a (patch)
treede59aafa6c5d73ce1ef77178530c083d80f7ff41 /scumm/scummvm.cpp
parentb958c0a0024e449ed897e22d37b670ddfb1f61da (diff)
downloadscummvm-rg350-b12d741ac118eabbdbe7e38383933e0337fc002a.tar.gz
scummvm-rg350-b12d741ac118eabbdbe7e38383933e0337fc002a.tar.bz2
scummvm-rg350-b12d741ac118eabbdbe7e38383933e0337fc002a.zip
cleaned up V2 input code
svn-id: r7811
Diffstat (limited to 'scumm/scummvm.cpp')
-rw-r--r--scumm/scummvm.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 5041e37918..a01fab18e1 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -1859,24 +1859,15 @@ int Scumm::getKeyInput() {
VAR(VAR_LEFTBTN_HOLD) = (_leftBtnPressed & msDown) != 0;
VAR(VAR_RIGHTBTN_HOLD) = (_rightBtnPressed & msDown) != 0;
} else if (_features & GF_AFTER_V2) {
- // Store the input type. So far we can't distinguise
+ // 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 (_mouseButStat & MBS_LEFT_CLICK) {
- VirtScreen *zone = findVirtScreen(_mouse.y);
-
- if (zone->number == 0) // Clicked in scene
- _scummVars[VAR_CLICK_AREA] = 2;
- else if (zone->number == 2) { // Clicked in verb/sentence
- if (_mouse.y > zone->topline + 32)
- _scummVars[VAR_CLICK_AREA] = 3; // Inventory
- else
- _scummVars[VAR_CLICK_AREA] = 1; // Verb
- }
- } else if (_lastKeyHit) // Key Input
- _scummVars[VAR_CLICK_AREA] = 4;
+ if (_lastKeyHit) { // Key Input
+ VAR(VAR_KEYPRESS) = _lastKeyHit;
+ runInputScript(4, 0, 0);
+ }
}
_leftBtnPressed &= ~msClicked;