[Scummvm-git-logs] scummvm master -> 099f0adf560b78a3e5bda24ad995a855a16bc377
bluegr
noreply at scummvm.org
Wed Jun 17 23:50:13 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
8e4d59608a NANCY: Limit the mouse cursor movement inside popups in Nancy10+
099f0adf56 NANCY: Don't clear generic flags when saving
Commit: 8e4d59608a51db3745b4eb482640acece20b3319
https://github.com/scummvm/scummvm/commit/8e4d59608a51db3745b4eb482640acece20b3319
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-06-18T02:50:00+03:00
Commit Message:
NANCY: Limit the mouse cursor movement inside popups in Nancy10+
Changed paths:
engines/nancy/state/scene.cpp
engines/nancy/state/scene.h
diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index f3f856c11ce..5e0a440b034 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -1133,6 +1133,17 @@ void Scene::run() {
}
}
+Common::Rect Scene::activePopupConfinement() const {
+ // Pick the first visible Nancy 10+ popup; if more than one is open
+ // (shouldn't normally happen) the priority order matches the input
+ // order â conversation, inventory, notebook, cellphone.
+ if (_conversationPopup.isVisible()) return _conversationPopup.getScreenPosition();
+ if (_inventoryPopup.isVisible()) return _inventoryPopup.getScreenPosition();
+ if (_notebookPopup.isVisible()) return _notebookPopup.getScreenPosition();
+ if (_cellPhonePopup.isVisible()) return _cellPhonePopup.getScreenPosition();
+ return Common::Rect();
+}
+
void Scene::handleInput() {
NancyInput input = g_nancy->_input->getInput();
@@ -1170,6 +1181,16 @@ void Scene::handleInput() {
// the popup that overlapped the textbox area could accidentally pick
// a conversation response.
if (g_nancy->getGameType() >= kGameTypeNancy10) {
+ // Confine the cursor to whichever popup is open so the player
+ // can't drag it into the underlying scene UI.
+ const Common::Rect confine = activePopupConfinement();
+ if (!confine.isEmpty() && !confine.contains(input.mousePos)) {
+ input.mousePos.x = CLIP<int16>(input.mousePos.x,
+ confine.left, confine.right - 1);
+ input.mousePos.y = CLIP<int16>(input.mousePos.y,
+ confine.top, confine.bottom - 1);
+ g_nancy->_cursor->warpCursor(input.mousePos);
+ }
_conversationPopup.handleInput(input);
_inventoryPopup.handleInput(input);
_notebookPopup.handleInput(input);
diff --git a/engines/nancy/state/scene.h b/engines/nancy/state/scene.h
index 0a580ab87dc..973ec2c28ff 100644
--- a/engines/nancy/state/scene.h
+++ b/engines/nancy/state/scene.h
@@ -238,6 +238,9 @@ private:
void run();
void handleInput();
+ // Rect of the open Nancy 10+ taskbar popup, or empty if none.
+ Common::Rect activePopupConfinement() const;
+
void initStaticData();
void clearSceneData();
Commit: 099f0adf560b78a3e5bda24ad995a855a16bc377
https://github.com/scummvm/scummvm/commit/099f0adf560b78a3e5bda24ad995a855a16bc377
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2026-06-18T02:50:02+03:00
Commit Message:
NANCY: Don't clear generic flags when saving
This change was introduced in commit a97ee89. However, it has the
unwanted side effect of clearing generic flags when saving, e.g. when
the game auto-saves for a "second chance" save.
As an example, this led to the phone not being answered in Nancy 9
(bug #16799), because the game was trying to create a second chance
saved game while the phone rang. The phone normally opens when the
ringing sound starts, which sets flag 20. However, when the game tried
to auto-save, all the generic scene flags, including flag 20, were
incorrectly reset.
We fix this unwanted behavior by only clearing generic flags when
loading a save - saving a game shouldn't reset scene flags.
Fix #16799
Changed paths:
engines/nancy/state/scene.cpp
diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index 5e0a440b034..2c268d40fdd 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -750,9 +750,11 @@ void Scene::synchronize(Common::Serializer &ser) {
ser.syncArray(_flags.eventFlags.data(), g_nancy->getStaticData().numEventFlags, Common::Serializer::Byte);
- // Clear generic flags
- for (uint16 id : g_nancy->getStaticData().genericEventFlags) {
- _flags.eventFlags[id] = g_nancy->_false;
+ if (!ser.isSaving()) {
+ // Clear generic flags
+ for (uint16 id : g_nancy->getStaticData().genericEventFlags) {
+ _flags.eventFlags[id] = g_nancy->_false;
+ }
}
// Skip empty sceneCount array
More information about the Scummvm-git-logs
mailing list