From b34e784c8a6f76f034ebfa62d1c95c809e5414b4 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 30 Oct 2016 19:25:46 -0400 Subject: TITANIC: Renamings of mouse methods --- engines/titanic/support/mouse_cursor.cpp | 10 +++++----- engines/titanic/support/mouse_cursor.h | 13 ++++++++++--- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'engines/titanic/support') diff --git a/engines/titanic/support/mouse_cursor.cpp b/engines/titanic/support/mouse_cursor.cpp index 8a9b6b6656..efb78a8a0a 100644 --- a/engines/titanic/support/mouse_cursor.cpp +++ b/engines/titanic/support/mouse_cursor.cpp @@ -55,7 +55,7 @@ CMouseCursor::CursorEntry::~CursorEntry() { CMouseCursor::CMouseCursor(CScreenManager *screenManager) : _screenManager(screenManager), _cursorId(CURSOR_HOURGLASS), _hideCounter(0), - _hiddenCount(0), _cursorSuppressed(false), _setCursorCount(0), _fieldE4(0), _fieldE8(0) { + _hiddenCount(0), _cursorSuppressed(false), _setCursorCount(0), _inputEnabled(true), _fieldE8(0) { loadCursorImages(); setCursor(CURSOR_ARROW); CursorMan.showMouse(true); @@ -162,13 +162,13 @@ void CMouseCursor::update() { // No implementation needed } -void CMouseCursor::lockE4() { - _fieldE4 = 0; +void CMouseCursor::disableControl() { + _inputEnabled = false; CScreenManager::_screenManagerPtr->_inputHandler->incLockCount(); } -void CMouseCursor::unlockE4() { - _fieldE4 = 1; +void CMouseCursor::enableControl() { + _inputEnabled = true; _fieldE8 = 0; CScreenManager::_screenManagerPtr->_inputHandler->decLockCount(); } diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h index 41508fdaf4..39042a5ba1 100644 --- a/engines/titanic/support/mouse_cursor.h +++ b/engines/titanic/support/mouse_cursor.h @@ -69,7 +69,7 @@ private: int _hideCounter; int _hiddenCount; bool _cursorSuppressed; - int _fieldE4; + bool _inputEnabled; int _fieldE8; /** @@ -128,8 +128,15 @@ public: */ uint getChangeCount() const { return _setCursorCount; } - void lockE4(); - void unlockE4(); + /** + * Disables user control of the mouse + */ + void disableControl(); + + /** + * Re-enables user control of the mouse + */ + void enableControl(); /** * Sets the mouse to a new position -- cgit v1.2.3