[Scummvm-git-logs] scummvm master -> 264d96b29d2ebbba740861a3c28d2f63b468e3ae
whoozle
noreply at scummvm.org
Tue Jul 14 22:07:04 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:
264d96b29d PHOENIXVR: Fix Amerzone chapter switching
Commit: 264d96b29d2ebbba740861a3c28d2f63b468e3ae
https://github.com/scummvm/scummvm/commit/264d96b29d2ebbba740861a3c28d2f63b468e3ae
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-07-14T23:04:55+01:00
Commit Message:
PHOENIXVR: Fix Amerzone chapter switching
Rename _currentLevel to _nextLevel.
Fix loading code so it selects proper _nextLevel now.
Changed paths:
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/phoenixvr.h
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index a8c008ff305..9082e122ba8 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -353,7 +353,7 @@ uint PhoenixVREngine::currentAmerzoneLevel() const {
return index;
}
- return _currentLevel;
+ error("currentAmerzoneLevel: can't find current script");
}
Common::String PhoenixVREngine::removeDrive(const Common::String &path) {
@@ -399,14 +399,14 @@ Common::SeekableReadStream *PhoenixVREngine::open(const Common::String &filename
}
bool PhoenixVREngine::setNextLevel() {
- if (_currentLevel < _levels.size()) {
- auto &level = _levels[_currentLevel++];
+ if (_nextLevel < _levels.size()) {
+ auto &level = _levels[_nextLevel++];
debug("next level is %s", level.c_str());
setNextScript(Common::String::format("%s\\%s.lst", level.c_str(), _gameDescription->gameId));
_loaded = true;
// reset flag or interface.vr will skip menu
- if (_currentLevel == 1)
+ if (_nextLevel == 1)
_loaded = false;
return true;
} else
@@ -687,7 +687,7 @@ void PhoenixVREngine::restart() {
debug("restart");
resetState();
_restarted = true;
- _currentLevel = 0;
+ _nextLevel = 0;
setNextLevel();
_prevWarp = -1;
_loaded = false;
@@ -1857,8 +1857,8 @@ Common::Error PhoenixVREngine::loadGameStream(Common::SeekableReadStream *slot)
for (; i != n; ++i) {
auto &level = _levels[i];
if (state.script.hasPrefixIgnoreCase(level)) {
- debug("current level is %u", i);
- _currentLevel = i;
+ _nextLevel = i + 1;
+ debug("current level is %u", _nextLevel);
break;
}
}
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 10a44b013fe..5c8c8dd293f 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -313,7 +313,7 @@ private:
Common::Array<int> _cibleBounds;
Common::Array<Common::String> _levels;
- uint _currentLevel = 0;
+ uint _nextLevel = 0;
bool _restarted = false;
bool _loaded = false;
More information about the Scummvm-git-logs
mailing list