[Scummvm-git-logs] scummvm master -> c7f6a9a7a617c9e30beb3cf5dd901fc4c274eac7
whoozle
noreply at scummvm.org
Mon Jul 27 21:50:59 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:
c7f6a9a7a6 PHOENIXVR: Fix invalid hidden cursor state.
Commit: c7f6a9a7a617c9e30beb3cf5dd901fc4c274eac7
https://github.com/scummvm/scummvm/commit/c7f6a9a7a617c9e30beb3cf5dd901fc4c274eac7
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-07-27T22:50:39+01:00
Commit Message:
PHOENIXVR: Fix invalid hidden cursor state.
Match the original engine behaviour.
Fix a few known visual glitches, e.g. in Necronomicon you see active cursor for hidden region where the map was.
Changed paths:
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/phoenixvr.h
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index f56db041174..818eb97f86e 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -880,7 +880,7 @@ void PhoenixVREngine::setCursor(const Common::String &path, const Common::String
}
auto &cursors = _cursors[warp];
if (idx >= 0 && idx < static_cast<int>(cursors.size()))
- cursors[idx] = path;
+ cursors[idx].name = path;
else
debug("index %d is out of range", idx);
}
@@ -894,7 +894,7 @@ void PhoenixVREngine::hideCursor(const Common::String &wname, int idx) {
}
auto &cursors = _cursors[warp];
if (idx >= 0 && idx < static_cast<int>(cursors.size()))
- cursors[idx].clear();
+ cursors[idx].hidden = true;
else
debug("index %d is out of range", idx);
}
@@ -1786,6 +1786,9 @@ void PhoenixVREngine::tick(float dt) {
debug("warp %d -> %s %s", _nextWarp, _warp->vrFile.c_str(), _warp->testFile.c_str());
_nextWarp = -1;
_randomSounds.clear();
+ auto &cursors = _cursors[_warpIdx];
+ for (auto &cursor : cursors)
+ cursor.hidden = false;
{
Common::String origName;
@@ -1846,7 +1849,8 @@ void PhoenixVREngine::tick(float dt) {
continue;
if (_vr.isVR() ? region->contains3D(currentVRPos()) : region->contains2D(_mousePos.x, _mousePos.y)) {
- anyMatched = true;
+ const bool validTestIdx = i < static_cast<int>(cursors.size());
+ anyMatched = !(validTestIdx && cursors[i].hidden);
if (gameIdMatches("messenger") && _warp && _warp->vrFile.equalsIgnoreCase("portef.vr") && i >= 0 && i < 12)
messengerInventoryHover = i;
@@ -1857,9 +1861,8 @@ void PhoenixVREngine::tick(float dt) {
executeTest(i);
}
- if (!cursor && i < static_cast<int>(cursors.size())) {
- auto &name = cursors[i];
- cursor = loadCursor(name);
+ if (!cursor && validTestIdx) {
+ cursor = loadCursor(cursors[i].name);
}
} else if (i == _hoverIndex) {
debug("leaving hover region");
@@ -2220,7 +2223,7 @@ void PhoenixVREngine::captureContext() {
writeString({});
for (auto &warpCursors : _cursors)
for (auto &cursor : warpCursors)
- writeString(cursor);
+ writeString(cursor.name);
for (auto &var : _script->getVars()) {
auto value = g_engine->getVariable(var.name);
@@ -2313,7 +2316,7 @@ bool PhoenixVREngine::enterScript() {
debug("ignoring VR cursor, original engine saves `LOAD.VR` as a cursor name at loading screen");
cursor.clear();
}
- warpCursor = cursor;
+ warpCursor.name = cursor;
}
}
debug("vars at %08x", (uint32)ms.pos());
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index a12f8584d73..709b7cd98f3 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -379,7 +379,11 @@ private:
float _lensflareY = 0.0f;
Common::Array<uint32> _lightEffect;
- Common::Array<Common::Array<Common::String>> _cursors;
+ struct WarpCursorState {
+ Common::String name;
+ bool hidden = false;
+ };
+ Common::Array<Common::Array<WarpCursorState>> _cursors;
Common::String _defaultCursor[2];
Common::String _currentMusic;
int _currentMusicVolume = 0;
More information about the Scummvm-git-logs
mailing list