diff options
author | James Brown | 2003-05-17 06:14:08 +0000 |
---|---|---|
committer | James Brown | 2003-05-17 06:14:08 +0000 |
commit | 2813d48e929890cdb38001555e07751ccc5d95a9 (patch) | |
tree | 5df47220f6b0daa8c86475bd918a4274c25e7a7a | |
parent | 99b26a5684382cfaa135d76a0d54074a30306f0e (diff) | |
download | scummvm-rg350-2813d48e929890cdb38001555e07751ccc5d95a9.tar.gz scummvm-rg350-2813d48e929890cdb38001555e07751ccc5d95a9.tar.bz2 scummvm-rg350-2813d48e929890cdb38001555e07751ccc5d95a9.zip |
Cleanup
svn-id: r7598
-rw-r--r-- | scumm/scumm.h | 2 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 8 | ||||
-rw-r--r-- | scumm/vars.cpp | 1 | ||||
-rw-r--r-- | scumm/verbs.cpp | 17 |
4 files changed, 15 insertions, 13 deletions
diff --git a/scumm/scumm.h b/scumm/scumm.h index 9550d4cc38..7fe857e411 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1149,6 +1149,8 @@ public: byte VAR_CUSTOMSCALETABLE; byte VAR_V6_SOUNDMODE; + + byte VAR_CLICK_AREA; }; // This is a constant lookup table of reverse bit masks diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 465fb1c612..01cccc0723 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -1853,9 +1853,7 @@ int Scumm::getKeyInput() { VAR(VAR_MOUSE_HOLD) += 2; } } else if (_features & GF_AFTER_V7) { -// VAR(VAR_LEFTBTN_DOWN) = (_leftBtnPressed&msClicked) != 0; VAR(VAR_LEFTBTN_HOLD) = (_leftBtnPressed & msDown) != 0; -// VAR(VAR_RIGHTBTN_DOWN) = (_rightBtnPressed&msClicked) != 0; VAR(VAR_RIGHTBTN_HOLD) = (_rightBtnPressed & msDown) != 0; } else if (_features & GF_AFTER_V2) { // Store the input type. So far we can't distinguise @@ -1867,12 +1865,12 @@ int Scumm::getKeyInput() { VirtScreen *zone = findVirtScreen(_mouse.y); if (zone->number == 0) // Clicked in scene - _scummVars[32] = 2; + _scummVars[VAR_CLICK_AREA] = 2; else if (zone->number == 2) // Clicked in verb/sentence - _scummVars[32] = 1; + _scummVars[VAR_CLICK_AREA] = 1; } else if (_lastKeyHit) // Key Input - _scummVars[32] = 4; + _scummVars[VAR_CLICK_AREA] = 4; } _leftBtnPressed &= ~msClicked; diff --git a/scumm/vars.cpp b/scumm/vars.cpp index 9940fa5cc5..36f6c316f1 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -123,6 +123,7 @@ void Scumm_v2::setupScummVars() { VAR_SENTENCE_OBJECT2 = 28; VAR_VIRT_MOUSE_X = 30; VAR_VIRT_MOUSE_Y = 31; + VAR_CLICK_AREA = 32; VAR_ROOM_RESOURCE = 36; VAR_LAST_SOUND = 37; VAR_KEYPRESS = 39; diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index 6fd218c12c..60c53ebcde 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -43,14 +43,6 @@ void Scumm::checkExecVerbs() { int i, over; VerbSlot *vs; -#if 1 - // FIXME - MM / Zak hack - if ((_features & GF_AFTER_V2) && (_mouseButStat & MBS_LEFT_CLICK)) { - printf("Running script 4\n"); - runScript(4, 0, 0, 0); - } -#endif - if (_userPut <= 0 || _mouseButStat == 0) return; @@ -86,6 +78,15 @@ void Scumm::checkExecVerbs() { runInputScript(1, over != 0 ? _verbs[over].verbid : 0, code); } } + +#if 1 + // FIXME - MM / Zak hack + if ((_features & GF_AFTER_V2) && (_mouseButStat & MBS_LEFT_CLICK)) { + printf("Running script 4\n"); + runScript(4, 0, 0, 0); + } +#endif + } void Scumm::verbMouseOver(int verb) { |