[Scummvm-git-logs] scummvm master -> 27c244181530ac5762e230a97e2268ef7b99af20
Scorpeg
noreply at scummvm.org
Tue Sep 22 08:27:08 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
27c2441815 PHOENIXVR: Fix secondary hover state
Commit: 27c244181530ac5762e230a97e2268ef7b99af20
https://github.com/scummvm/scummvm/commit/27c244181530ac5762e230a97e2268ef7b99af20
Author: Scorp (scorp at mrs.mn)
Date: 2026-09-22T11:26:58+03:00
Commit Message:
PHOENIXVR: Fix secondary hover state
Changed paths:
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/phoenixvr.h
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 07a05d3d748..e26d25e51fe 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -1844,6 +1844,8 @@ void PhoenixVREngine::tick(float dt) {
auto &cursors = _cursors[_warpIdx];
bool anyMatched = false;
int messengerInventoryHover = -1;
+ int hoverIndex = -1;
+ int hoverLeaveIndex = -1;
int regionCount = _regSet ? _regSet->size() : 0;
for (int i = 0, n = MAX<int>(regionCount, cursors.size()); i != n; ++i) {
auto *region = getRegion(i);
@@ -1857,24 +1859,33 @@ void PhoenixVREngine::tick(float dt) {
messengerInventoryHover = i;
auto test = _warp->getTest(i);
- if (test && test->hover == 1 && _hoverIndex < 0) {
- debug("executing hover test %d", i);
- _hoverIndex = i;
- executeTest(i);
+ if (test) {
+ if (test->hover == 1)
+ hoverIndex = i;
+ else if (test->hover == 2)
+ hoverLeaveIndex = i;
}
if (!cursor && validTestIdx) {
cursor = loadCursor(cursors[i].name);
}
- } else if (i == _hoverIndex) {
- debug("leaving hover region");
- auto leave = _warp->getTest(i - 1);
- if (!leave || leave->hover != 2)
- leave = _warp->getTest(i + 1);
- if (leave && leave->hover == 2) {
- executeTest(leave->idx);
- }
- _hoverIndex = -1;
+ }
+ }
+
+ if (hoverLeaveIndex != _hoverLeaveIndex) {
+ int prevHoverLeaveIndex = _hoverLeaveIndex;
+ _hoverLeaveIndex = hoverLeaveIndex;
+ if (prevHoverLeaveIndex >= 0) {
+ debug("executing hover leave test %d", prevHoverLeaveIndex);
+ executeTest(prevHoverLeaveIndex);
+ }
+ }
+
+ if (hoverIndex != _hoverIndex) {
+ _hoverIndex = hoverIndex;
+ if (hoverIndex >= 0) {
+ debug("executing hover test %d", hoverIndex);
+ executeTest(hoverIndex);
}
}
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 709b7cd98f3..c6cd3dfdf64 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -321,6 +321,7 @@ private:
int _prevWarp = -1;
Common::List<int> _prevWarpHistory; // V2 stack of warps
int _hoverIndex = -1;
+ int _hoverLeaveIndex = -1;
int _messengerInventoryHover = -1;
int _nextTest = -1;
More information about the Scummvm-git-logs
mailing list