[Scummvm-git-logs] scummvm branch-2-5 -> 77bd0f2278eba103b43af5e053286d8626cdce54

dreammaster noreply at scummvm.org
Sat Dec 18 03:35:42 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
77bd0f2278 SHERLOCK: Fix Scalpel user interface being left in wrong mode


Commit: 77bd0f2278eba103b43af5e053286d8626cdce54
    https://github.com/scummvm/scummvm/commit/77bd0f2278eba103b43af5e053286d8626cdce54
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-12-17T19:35:32-08:00

Commit Message:
SHERLOCK: Fix Scalpel user interface being left in wrong mode

I think this one would happen if an NPC initiated conversaion with you,
while you had a window (e.g. the inventory) open. The game would be put
in talk mode, then close the inventory (putting the game in standard
mode), then print the conversation options.

That's because a loop was terminated prematurely (with a break), thus
bypassing the bit that would set it back into talk mode again.

I encountered this when finally meeting up with Lord Brumwell.

Changed paths:
    engines/sherlock/talk.cpp


diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 8ce258a820..07b200716b 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -342,7 +342,8 @@ void Talk::talkTo(const Common::String filename) {
 
 		// Handle replies until there's no further linked file,
 		// or the link file isn't a reply first cnversation
-		while (!_vm->shouldQuit()) {
+		bool done = false;
+		while (!done && !_vm->shouldQuit()) {
 			clearSequences();
 			_scriptSelect = select;
 			_speaker = _talkTo;
@@ -412,7 +413,7 @@ void Talk::talkTo(const Common::String filename) {
 
 					// Break out of loop now that we're waiting for player input
 					events.setCursor(ARROW);
-					break;
+					done = true;
 				} else {
 					// Add the statement into the journal and talk history
 					if (_talkTo != -1 && !_talkHistory[_converseNum][select])
@@ -438,7 +439,7 @@ void Talk::talkTo(const Common::String filename) {
 					ui.banishWindow();
 				}
 
-				break;
+				done = true;
 			}
 		}
 	}




More information about the Scummvm-git-logs mailing list