Opened 3 years ago

Closed 3 years ago

#13195 closed defect (fixed)

SHERLOCK: UI glitch when looking at screen object in inventory mode (Demo)

Reported by: antoniou79 Owned by: eriktorbjorn
Priority: normal Component: Engine: Sherlock
Version: Keywords: Case of the Serrated Scalpel, DOS, Demo, UI, glitch
Cc: Game: Sherlock Holmes: Case of the Serrated Scalpel

Description

I am on Windows 10 Pro x64, testing with latest code from master (local msys2 build) for 2.6.0git.

I am only able to test with the English Demo of The Serrated Scalpel, available from ScummVM website (in the Games page): "The Lost Files of Sherlock Holmes: The Case of the Serrated Scalpel (DOS Demo)", as of yet. So I don't know if the bug exists in the full game.

To reproduce the bug:

  • Start the demo
  • Open the INVENTORY (by choosing the INVENTORY verb from the UI panel below)
  • Then click on the corpse on the main screen to examine it (while INVENTORY is still open)

After that, the text Sherlock's observations on the corpse will not be displayed and the UI panel will be broken -- it seems that it has reverted to the normal verb mode, but the verbs appear one by one glitching with the UI when the user clicks the mouse on the panel.

The "workaround" out of this situation, is to click on where the (now invisible) INVENTORY verb is, and then click on Exit to exit the Inventory mode properly.

I'll attach a screenshot of the glitched out UI.

Attachments (1)

scummvm-scalpel-demo-00000.png (75.5 KB ) - added by antoniou79 3 years ago.

Download all attachments as: .zip

Change History (6)

by antoniou79, 3 years ago

comment:1 by eriktorbjorn, 3 years ago

I can reproduce it in the full game.

However, I can also reproduce it when running the demo or full version in DOSBox.

I haven't tried to figure out what's causing it yet.

comment:2 by eriktorbjorn, 3 years ago

The problem seems to be in ScalpelUserInterface::examine(). It checks if the inventory is open before printing the object description, except if the description is printed as part of an animation. Moving the check to earlier in the function seems to fix the problem, i.e.:

diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherl
ock/scalpel/scalpel_user_interface.cpp
index 7c780f4650d..9e590b7808e 100644
--- a/engines/sherlock/scalpel/scalpel_user_interface.cpp
+++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp
@@ -533,6 +533,13 @@ void ScalpelUserInterface::examine() {
        Talk &talk = *_vm->_talk;
        Common::Point pt = events.mousePos();
 
+       if (_invLookFlag) {
+               // Don't close the inventory window when starting an examine dis
play, since its
+               // window will slide up to replace the inventory display
+               _windowOpen = false;
+               _menuMode = LOOK_MODE;
+       }
+
        if (pt.y < (CONTROLS_Y + 9)) {
                Object &obj = scene._bgShapes[_bgFound];
 
@@ -560,13 +567,6 @@ void ScalpelUserInterface::examine() {
                        _vm->setFlags(inv[_selector]._lookFlag);
        }
 
-       if (_invLookFlag) {
-               // Don't close the inventory window when starting an examine display, since its
-               // window will slide up to replace the inventory display
-               _windowOpen = false;
-               _menuMode = LOOK_MODE;
-       }
-
        if (!talk._talkToAbort) {
                if (!scene._cAnimFramePause)
                        printObjectDesc(_cAnimStr, true);

comment:3 by eriktorbjorn, 3 years ago

This fix is now part of the following pull request: https://github.com/scummvm/scummvm/pull/3661

I've played through the entire game - again - with it, and I didn't notice any regressions. So that's promising.

comment:4 by antoniou79, 3 years ago

I can only test with the demo but I can confirm this is fixed there.
Thank you!

comment:5 by eriktorbjorn, 3 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

Thanks for verifying! (I forgot to close the bug report when merging.)

Note: See TracTickets for help on using tickets.