[Scummvm-git-logs] scummvm master -> c4b7cbd7ae9c6e31606cd2c15a19bc7071ebf5d8
whoozle
noreply at scummvm.org
Tue Jul 21 00:03:19 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:
84d0333a1c PHOENIXVR: V2: initialise variables if value was provided
c4b7cbd7ae PHOENIXVR: Clear screen surface before playing movie
Commit: 84d0333a1c69d6a356e6330984e244a823f0c313
https://github.com/scummvm/scummvm/commit/84d0333a1c69d6a356e6330984e244a823f0c313
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-07-21T01:01:06+01:00
Commit Message:
PHOENIXVR: V2: initialise variables if value was provided
Changed paths:
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/script.h
engines/phoenixvr/script_v1.cpp
engines/phoenixvr/script_v2.cpp
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index fcc841cab70..4b128293727 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -490,9 +490,13 @@ void PhoenixVREngine::loadNextScript() {
if (!s)
error("can't open script file %s", nextScript.c_str());
- _script.reset(Script::load(*s, version()));
- for (auto &var : _script->getVarNames())
- declareVariable(var);
+ auto ver = version();
+ _script.reset(Script::load(*s, ver));
+ for (auto &var : _script->getVars()) {
+ declareVariable(var.name);
+ if (ver >= 2)
+ setVariable(var.name, var.value);
+ }
if (gameIdMatches("dracula1")) {
declareVariable("P_Alliance"); // Referenced by 0M1Script.lst, declared by 0M2Script.lst
declareVariable("reloaddone"); // Referenced by InsertCD.lst, declared by chapter scripts
@@ -1953,8 +1957,8 @@ void PhoenixVREngine::captureContext() {
for (auto &cursor : warpCursors)
writeString(cursor);
- for (auto &name : _script->getVarNames()) {
- auto value = g_engine->getVariable(name);
+ for (auto &var : _script->getVars()) {
+ auto value = g_engine->getVariable(var.name);
ms.writeUint32LE(value);
}
@@ -2048,10 +2052,10 @@ bool PhoenixVREngine::enterScript() {
}
}
debug("vars at %08x", (uint32)ms.pos());
- for (auto &name : _script->getVarNames()) {
+ for (auto &var : _script->getVars()) {
auto value = ms.readSint32LE();
- debug("var %s: %d", name.c_str(), value);
- g_engine->setVariable(name, value);
+ debug("var %s: %d", var.name.c_str(), value);
+ g_engine->setVariable(var.name, value);
}
debug("vars end at %08x", (uint32)ms.pos());
auto currentSubroutine = ms.readSint32LE();
diff --git a/engines/phoenixvr/script.h b/engines/phoenixvr/script.h
index b61583db58f..d5fc9e9ce46 100644
--- a/engines/phoenixvr/script.h
+++ b/engines/phoenixvr/script.h
@@ -64,8 +64,12 @@ public:
protected:
Common::HashMap<Common::String, int, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _warpsIndex;
Common::Array<Common::String> _warpNames;
- Common::Array<Common::String> _vars;
Common::Array<WarpPtr> _warps;
+ struct VariableDeclaration {
+ Common::String name;
+ int value;
+ };
+ Common::Array<VariableDeclaration> _vars;
virtual void parseLine(const Common::String &line, uint lineno) = 0;
@@ -86,7 +90,7 @@ public:
const Common::Array<Common::String> &getWarpNames() const {
return _warpNames;
}
- const Common::Array<Common::String> &getVarNames() const {
+ const Common::Array<VariableDeclaration> &getVars() const {
return _vars;
}
};
diff --git a/engines/phoenixvr/script_v1.cpp b/engines/phoenixvr/script_v1.cpp
index 96f400440bb..798bd7910f1 100644
--- a/engines/phoenixvr/script_v1.cpp
+++ b/engines/phoenixvr/script_v1.cpp
@@ -78,7 +78,7 @@ void ScriptV1::parseLine(const Common::String &line, uint lineno) {
if (p.maybe('[')) {
if (p.maybe("bool]=") || p.maybe("bool)=") || p.maybe({"b\x00\x00ool]=", 8})) {
- _vars.push_back(p.nextWord());
+ _vars.push_back(VariableDeclaration{p.nextWord(), 0});
} else if (p.maybe("warp]=")) {
auto vr = p.nextWord();
Common::String test;
diff --git a/engines/phoenixvr/script_v2.cpp b/engines/phoenixvr/script_v2.cpp
index b641a4d60f7..a86fd64f11a 100644
--- a/engines/phoenixvr/script_v2.cpp
+++ b/engines/phoenixvr/script_v2.cpp
@@ -141,7 +141,7 @@ void ScriptV2::parseLine(const Common::String &line, uint lineno) {
value = p.nextInt();
}
debug("declared var %s: %d", name.c_str(), value);
- _vars.push_back(name);
+ _vars.push_back({name, value});
} else if (p.maybe("warp]:")) {
auto vr = p.nextWord();
Common::String test;
Commit: c4b7cbd7ae9c6e31606cd2c15a19bc7071ebf5d8
https://github.com/scummvm/scummvm/commit/c4b7cbd7ae9c6e31606cd2c15a19bc7071ebf5d8
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-07-21T01:02:52+01:00
Commit Message:
PHOENIXVR: Clear screen surface before playing movie
Changed paths:
engines/phoenixvr/phoenixvr.cpp
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 4b128293727..b073f1fca0f 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -1018,6 +1018,7 @@ void PhoenixVREngine::playMovie(const Common::String &movie) {
return;
}
+ g_system->fillScreen(0);
_system->lockMouse(false);
dec->start();
More information about the Scummvm-git-logs
mailing list