From 45d208b2ec058d2709c3a5da58abff41d08d782c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 25 Oct 2016 23:10:46 -0400 Subject: TITANIC: Further work on mouse cursor enablement logic --- engines/titanic/support/mouse_cursor.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'engines/titanic/support/mouse_cursor.h') diff --git a/engines/titanic/support/mouse_cursor.h b/engines/titanic/support/mouse_cursor.h index 8881c9b182..8960c54f8a 100644 --- a/engines/titanic/support/mouse_cursor.h +++ b/engines/titanic/support/mouse_cursor.h @@ -66,7 +66,8 @@ private: CursorId _cursorId; CursorEntry _cursors[NUM_CURSORS]; uint _setCursorCount; - int _hideCount; + int _hideCounter; + bool _cursorSuppressed; int _fieldE4; int _fieldE8; @@ -88,6 +89,29 @@ public: */ void hide(); + /** + * Decrements the hide counter, and shows the mouse if + * it's reached zero + */ + void incHideCounter(); + + /** + * Increments the hide counter, hiding the mouse if it's the first call + */ + void decHideCounter(); + + /** + * Suppresses the cursor. When suppressed, the cursor isn't drawn, + * even if it's not otherwise being hidden + */ + void suppressCursor(); + + /** + * Unflags the cursor as being suppressed, allowing it to be drawn + * again if it's enabled + */ + void unsuppressCursor(); + /** * Set the cursor */ -- cgit v1.2.3