[Scummvm-git-logs] scummvm master -> cd7a0bc0cf93f396cca626455ab345f427b66acb
sev-
noreply at scummvm.org
Mon Oct 16 15:30:10 UTC 2023
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f35d63bb54 SHERLOCK: Assert script index is in bounds
7cbf499501 SHERLOCK: Assert _talkToAbort is unset before changing scene
44497da4d3 SHERLOCK: Remove showCursor call from setCursor
2530b1f3ed SHERLOCK: RT: Fix cursor staying hidden after darts game
523d354371 SHERLOCK: Disable saving when cursor is hidden
cd7a0bc0cf SHERLOCK: RT: Disable most input while cursor is hidden
Commit: f35d63bb540ffb356fe2aa662fcb2620a44330b3
https://github.com/scummvm/scummvm/commit/f35d63bb540ffb356fe2aa662fcb2620a44330b3
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-10-16T17:30:02+02:00
Commit Message:
SHERLOCK: Assert script index is in bounds
Changed paths:
engines/sherlock/talk.cpp
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 889312228a7..75ff5516658 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -703,6 +703,7 @@ void Talk::doScript(const Common::String &script) {
if (_scriptMoreFlag) {
_scriptMoreFlag = 0;
str = _scriptStart + _scriptSaveIndex;
+ assert(str <= _scriptEnd);
}
// Check if the script begins with a Stealh Mode Active command
Commit: 7cbf499501c9401ec4c56a970dc325301428f851
https://github.com/scummvm/scummvm/commit/7cbf499501c9401ec4c56a970dc325301428f851
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-10-16T17:30:02+02:00
Commit Message:
SHERLOCK: Assert _talkToAbort is unset before changing scene
Changed paths:
engines/sherlock/sherlock.cpp
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index 81c5a55cde0..f3c2f8280c0 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -162,6 +162,11 @@ Common::Error SherlockEngine::run() {
// Reset the data for the player character (Sherlock)
_people->reset();
+ // If this is still set from the previous scene, something went wrong.
+ // The next scene's path script or a continued script would be
+ // incorrectly aborted
+ assert(!_talk->_talkToAbort);
+
// Initialize and load the scene.
_scene->selectScene();
Commit: 44497da4d36a45d8c758993b93a2a84b2649ca53
https://github.com/scummvm/scummvm/commit/44497da4d36a45d8c758993b93a2a84b2649ca53
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-10-16T17:30:02+02:00
Commit Message:
SHERLOCK: Remove showCursor call from setCursor
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.
Changed paths:
engines/sherlock/events.cpp
engines/sherlock/sherlock.cpp
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index 8360066b3d2..282d240d661 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -119,7 +119,6 @@ void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY)
tempSurface.free();
}
- showCursor();
}
void Events::setCursor(CursorId cursorId, const Common::Point &cursorPos, const Graphics::Surface &surface) {
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index f3c2f8280c0..4a24c9195c0 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -146,6 +146,8 @@ Common::Error SherlockEngine::run() {
_startupAutosave = true;
}
+ _events->showCursor();
+
while (!shouldQuit()) {
// Prepare for scene, and handle any game-specific scenes. This allows
// for game specific cutscenes or mini-games that aren't standard scenes
Commit: 2530b1f3edcf2bec4db1b2e334bb1258673bc6f5
https://github.com/scummvm/scummvm/commit/2530b1f3edcf2bec4db1b2e334bb1258673bc6f5
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-10-16T17:30:02+02:00
Commit Message:
SHERLOCK: RT: Fix cursor staying hidden after darts game
The regression was introduced by the recent change to not call
showCursor() every time the cursor is changed.
Changed paths:
engines/sherlock/tattoo/tattoo_darts.cpp
diff --git a/engines/sherlock/tattoo/tattoo_darts.cpp b/engines/sherlock/tattoo/tattoo_darts.cpp
index 64e006f1ed0..4275f6ed88c 100644
--- a/engines/sherlock/tattoo/tattoo_darts.cpp
+++ b/engines/sherlock/tattoo/tattoo_darts.cpp
@@ -294,6 +294,7 @@ void Darts::playDarts(GameType gameType) {
closeDarts();
screen.fadeToBlack();
screen.setFont(oldFontType);
+ events.showCursor();
// Flag to return to the Billard's Academy scene
scene._goToScene = 26;
Commit: 523d3543718328b0e4a6f49304c5988c03aec1a0
https://github.com/scummvm/scummvm/commit/523d3543718328b0e4a6f49304c5988c03aec1a0
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-10-16T17:30:02+02:00
Commit Message:
SHERLOCK: Disable saving when cursor is hidden
Visibility of the cursor is not synced, so saving should be
impossible while it is hidden.
Changed paths:
engines/sherlock/sherlock.cpp
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index 4a24c9195c0..d1fe1d44cf5 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -212,7 +212,7 @@ void SherlockEngine::sceneLoop() {
}
void SherlockEngine::handleInput() {
- _canLoadSave = _ui->_menuMode == STD_MODE || _ui->_menuMode == LAB_MODE;
+ _canLoadSave = (_ui->_menuMode == STD_MODE || _ui->_menuMode == LAB_MODE) && _events->isCursorVisible();
_events->pollEventsAndWait();
_canLoadSave = false;
Commit: cd7a0bc0cf93f396cca626455ab345f427b66acb
https://github.com/scummvm/scummvm/commit/cd7a0bc0cf93f396cca626455ab345f427b66acb
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-10-16T17:30:02+02:00
Commit Message:
SHERLOCK: RT: Disable most input while cursor 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
Changed paths:
engines/sherlock/tattoo/tattoo_user_interface.cpp
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index 35b02e5f389..2a7321bbd36 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -380,7 +380,8 @@ void TattooUserInterface::doStandardControl() {
Common::Point mousePos = events.mousePos();
// Don't do any input processing whilst the prolog is running
- if (vm._runningProlog)
+ // or the cursor is hidden (e.g. by a call to cmdMouseOnOff())
+ if (vm._runningProlog || !events.isCursorVisible())
return;
// When the end credits are active, any press will open the ScummVM global main menu
More information about the Scummvm-git-logs
mailing list