Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHERLOCK: RT: Fix opcode 0xAE (cmdMouseOnOff()) #5318

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

PushmePullyu
Copy link
Contributor

Depending on its argument, the opcode does the following in the original game:

0x01: Hide the cursor and disable user input
0x02: Unhide the cursor and re-enable user input

In ScummVM, the opcode was only hiding/unhiding the cursor.
However, this was broken due to frequent showCursor() calls from setCursor().

So this PR does the following:

  1. Fix cursor hiding
  2. Disable input while cursor is hidden to match original behavior
  3. Fix regressions caused by the changes
  4. Add asserts pertinent to bug #14610

Fixes #14610

Calling showCursor() every time the cursor changes
is unnecessary and breaks hiding it via Rose Tattoo's cmdMouseOnOff().

Instead, call showCursor() only once on game start.
The regression was introduced by the recent change to not call
showCursor() every time the cursor is changed.
Visibility of the cursor is not synced, so saving should be
impossible while it is hidden.
Fixes opcode 0xAE (handled by TattooTalk::cmdMouseOnOff()).

Depending on its argument, the opcode does the following in the
original game:

0x01: Hide the cursor and disable user input
0x02: Unhide the cursor and re-enable user input

Cursor visibility toggling was already implemented, so this change
makes the opcode behave like in the original game (with the exception
that skipping dialogue is still possibile as a QoL improvement).

Fixes #14610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant