diff options
Diffstat (limited to 'engines/sherlock/events.cpp')
-rw-r--r-- | engines/sherlock/events.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp index 758ba12b6a..77833f8b3f 100644 --- a/engines/sherlock/events.cpp +++ b/engines/sherlock/events.cpp @@ -43,6 +43,7 @@ Events::Events(SherlockEngine *vm): _vm(vm) { _rightPressed = _rightReleased = false; _oldButtons = _oldRightButton = false; _firstPress = false; + _waitCounter = 0; if (_vm->_interactiveFl) loadCursors("rmouse.vgs"); @@ -67,7 +68,7 @@ void Events::loadCursors(const Common::String &filename) { } void Events::setCursor(CursorId cursorId) { - if (cursorId == _cursorId) + if (cursorId == _cursorId || _waitCounter > 0) return; int hotspotX, hotspotY; @@ -361,4 +362,14 @@ bool Events::checkInput() { return kbHit() || _pressed || _released || _rightPressed || _rightReleased; } +void Events::incWaitCounter() { + setCursor(WAIT); + ++_waitCounter; +} + +void Events::decWaitCounter() { + assert(_waitCounter > 0); + --_waitCounter; +} + } // End of namespace Sherlock |