diff options
author | Gregory Montoir | 2005-11-10 23:09:20 +0000 |
---|---|---|
committer | Gregory Montoir | 2005-11-10 23:09:20 +0000 |
commit | d50a69507da5b4bd8b6ec5e4d447e17dd03fff8b (patch) | |
tree | 69858cf08b169d2e7cf34643c1fa54ca91e93f42 /scumm | |
parent | 543072804bb636af26100859bd599fd3153cd198 (diff) | |
download | scummvm-rg350-d50a69507da5b4bd8b6ec5e4d447e17dd03fff8b.tar.gz scummvm-rg350-d50a69507da5b4bd8b6ec5e4d447e17dd03fff8b.tar.bz2 scummvm-rg350-d50a69507da5b4bd8b6ec5e4d447e17dd03fff8b.zip |
V8 uses 4 variables to handle mouse buttons state (like V7), cleanup processKbd() accordingly.
svn-id: r19553
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/input.cpp | 22 | ||||
-rw-r--r-- | scumm/scumm.cpp | 7 | ||||
-rw-r--r-- | scumm/scumm.h | 10 | ||||
-rw-r--r-- | scumm/vars.cpp | 8 |
4 files changed, 12 insertions, 35 deletions
diff --git a/scumm/input.cpp b/scumm/input.cpp index 61c568000e..be806ac66a 100644 --- a/scumm/input.cpp +++ b/scumm/input.cpp @@ -278,29 +278,11 @@ void ScummEngine::processKbd(bool smushMode) { _mouseAndKeyboardStat = MBS_RIGHT_CLICK; } - if (_version == 8) { - VAR(VAR_MOUSE_BUTTONS) = 0; - VAR(VAR_MOUSE_HOLD) = 0; - VAR(VAR_RIGHTBTN_HOLD) = 0; - - if (_leftBtnPressed & msClicked) - VAR(VAR_MOUSE_BUTTONS) += 1; - - if (_rightBtnPressed & msClicked) - VAR(VAR_MOUSE_BUTTONS) += 2; - - if (_leftBtnPressed & msDown) - VAR(VAR_MOUSE_HOLD) += 1; - - if (_rightBtnPressed & msDown) { - VAR(VAR_RIGHTBTN_HOLD) = 1; - VAR(VAR_MOUSE_HOLD) += 2; - } - } else if (_version >= 6) { + if (_version >= 6) { VAR(VAR_LEFTBTN_HOLD) = (_leftBtnPressed & msDown) != 0; VAR(VAR_RIGHTBTN_HOLD) = (_rightBtnPressed & msDown) != 0; - if (_version == 7) { + if (_version >= 7) { VAR(VAR_LEFTBTN_DOWN) = (_leftBtnPressed & msClicked) != 0; VAR(VAR_RIGHTBTN_DOWN) = (_rightBtnPressed & msClicked) != 0; } diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 333b25ac56..47c2b3eeae 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1265,7 +1265,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS VAR_V6_EMSSPACE = 0xFF; VAR_CAMERA_POS_Y = 0xFF; - VAR_CAMERA_MIN_Y = 0xFF; VAR_CAMERA_MAX_Y = 0xFF; VAR_CAMERA_THRESHOLD_X = 0xFF; @@ -1274,19 +1273,15 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS VAR_CAMERA_SPEED_Y = 0xFF; VAR_CAMERA_ACCEL_X = 0xFF; VAR_CAMERA_ACCEL_Y = 0xFF; - VAR_CAMERA_DEST_X = 0xFF; - VAR_CAMERA_DEST_Y = 0xFF; - VAR_CAMERA_FOLLOWED_ACTOR = 0xFF; VAR_LEFTBTN_DOWN = 0xFF; VAR_RIGHTBTN_DOWN = 0xFF; VAR_LEFTBTN_HOLD = 0xFF; VAR_RIGHTBTN_HOLD = 0xFF; - VAR_MOUSE_BUTTONS = 0xFF; - VAR_MOUSE_HOLD = 0xFF; + VAR_SAVELOAD_SCRIPT = 0xFF; VAR_SAVELOAD_SCRIPT2 = 0xFF; diff --git a/scumm/scumm.h b/scumm/scumm.h index 657f7e0102..9e7822cf65 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1301,12 +1301,10 @@ public: byte VAR_MUSIC_BUNDLE_LOADED; byte VAR_VOICE_BUNDLE_LOADED; - byte VAR_LEFTBTN_DOWN; // V7 - byte VAR_RIGHTBTN_DOWN; // V7 - byte VAR_LEFTBTN_HOLD; // V6/V72HE/V7 - byte VAR_RIGHTBTN_HOLD; // V6/V72HE/V7 - byte VAR_MOUSE_BUTTONS; // V8 - byte VAR_MOUSE_HOLD; // V8 + byte VAR_LEFTBTN_DOWN; // V7/V8 + byte VAR_RIGHTBTN_DOWN; // V7/V8 + byte VAR_LEFTBTN_HOLD; // V6/V72HE/V7/V8 + byte VAR_RIGHTBTN_HOLD; // V6/V72HE/V7/V8 byte VAR_SAVELOAD_SCRIPT; // V6/V7 (not HE) byte VAR_SAVELOAD_SCRIPT2; // V6/V7 (not HE) diff --git a/scumm/vars.cpp b/scumm/vars.cpp index 852183b0f1..eeadbc0da5 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -451,9 +451,11 @@ void ScummEngine_v8::setupScummVars() { VAR_TALK_ACTOR = 14; VAR_HAVE_MSG = 15; - VAR_MOUSE_BUTTONS = 16; - VAR_RIGHTBTN_HOLD = 17; // TODO: Guess (used in room 10 script 2004, and ship-to-ship combat) - VAR_MOUSE_HOLD = 18; + + VAR_LEFTBTN_DOWN = 16; + VAR_RIGHTBTN_DOWN = 17; + VAR_LEFTBTN_HOLD = 18; + VAR_RIGHTBTN_HOLD = 19; VAR_TIMEDATE_YEAR = 24; VAR_TIMEDATE_MONTH = 25; |