diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/scumm.cpp | 1 | ||||
-rw-r--r-- | scumm/scumm.h | 1 | ||||
-rw-r--r-- | scumm/vars.cpp | 1 | ||||
-rw-r--r-- | scumm/verbs.cpp | 6 |
4 files changed, 9 insertions, 0 deletions
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 5a71bd5818..2e23cc563b 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1052,6 +1052,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS VAR_NUM_SPRITES = 0xFF; VAR_NUM_PALETTES = 0xFF; VAR_NUM_UNK = 0xFF; + VAR_MOUSE_STATE = 0xFF; VAR_POLYGONS_ONLY = 0xFF; VAR_WINDOWS_VERSION = 0xFF; VAR_KEY_STATE = 0xFF; diff --git a/scumm/scumm.h b/scumm/scumm.h index 46e96b5bf0..76ba8263bd 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -1354,6 +1354,7 @@ public: byte VAR_NUM_SPRITES; byte VAR_NUM_PALETTES; byte VAR_NUM_UNK; + byte VAR_MOUSE_STATE; byte VAR_POLYGONS_ONLY; byte VAR_WINDOWS_VERSION; byte VAR_KEY_STATE; diff --git a/scumm/vars.cpp b/scumm/vars.cpp index 42497684e6..fd981e48bb 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -261,6 +261,7 @@ void ScummEngine_v72he::setupScummVars() { VAR_NUM_IMAGES = 72; VAR_NUM_CHARSETS = 73; VAR_NUM_GLOBAL_OBJS = 74; + VAR_MOUSE_STATE = 75; VAR_POLYGONS_ONLY = 76; if (_heversion >= 80) diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index d48e1ba3b9..3de3bd1542 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -353,9 +353,15 @@ void ScummEngine::checkExecVerbs() { int i, over; VerbSlot *vs; + if (VAR_MOUSE_STATE != 0xFF) + VAR(VAR_MOUSE_STATE) = 0; + if (_userPut <= 0 || _mouseButStat == 0) return; + if (VAR_MOUSE_STATE != 0xFF) + VAR(VAR_MOUSE_STATE) = _mouseButStat; + if (_mouseButStat < MBS_MAX_KEY) { /* Check keypresses */ vs = &_verbs[1]; |