[Scummvm-git-logs] scummvm master -> 03c3bb0f835228fa45e6d503731e40fae27b53bb
whoozle
noreply at scummvm.org
Tue Jul 14 21:29:21 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:
03c3bb0f83 PHOENIXVR: Fix Save after Load for Amerzone
Commit: 03c3bb0f835228fa45e6d503731e40fae27b53bb
https://github.com/scummvm/scummvm/commit/03c3bb0f835228fa45e6d503731e40fae27b53bb
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-07-14T22:28:38+01:00
Commit Message:
PHOENIXVR: Fix Save after Load for Amerzone
After loading the game, clicking "Save" again closes interface.
Add missing loadsave logging.
Remove noisy "cursor ..." log lines.
Add comments for Amerzone plugins.
Changed paths:
engines/phoenixvr/commands.h
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/script.cpp
diff --git a/engines/phoenixvr/commands.h b/engines/phoenixvr/commands.h
index 4373beefa4e..6600e76004f 100644
--- a/engines/phoenixvr/commands.h
+++ b/engines/phoenixvr/commands.h
@@ -591,6 +591,7 @@ struct Op : public Script::Command {
}
};
+// Amerzone-specific preload plugin
struct Preload : public Script::Command {
Common::String arg;
Preload(const Common::Array<Common::String> &args) : arg(args[0]) {}
@@ -600,16 +601,16 @@ struct Preload : public Script::Command {
g_engine->loadGameState(atoi(arg.c_str()));
} else {
auto loaded = g_engine->enterScript();
+ debug("preload: loaded: %d", loaded);
g_engine->setVariable(arg, loaded);
if (loaded) {
ctx.running = false;
- g_engine->returnToWarp();
}
}
}
};
-// Old loadsave/save plugins found in Amerzone.
+// Amerzone-specific loadsave plugin
struct LoadSave : public Script::Command {
Common::Array<Common::String> args;
LoadSave(const Common::Array<Common::String> &args_) : args(args_) {}
@@ -629,7 +630,7 @@ struct LoadSave : public Script::Command {
auto slot = atoi(args[0].c_str());
auto &var = args[1];
auto &negativeVar = args[2];
- debug("LoadSave %d %s %s", slot, var.c_str(), negativeVar.c_str());
+ debug("loadsave %d %s %s", slot, var.c_str(), negativeVar.c_str());
int status = 0;
// Amerzone script checks those:
// 99 -> true, 98 -> false: continue
@@ -655,6 +656,7 @@ struct LoadSave : public Script::Command {
} else if (n == 2) {
auto &srcVar = args[0];
auto &dstVar = args[1];
+ debug("loadsave %s %s", srcVar.c_str(), dstVar.c_str());
if (!dstVar.empty() && Common::isDigit(dstVar[0])) {
uint level = atoi(dstVar.c_str());
uint currentLevel = g_engine->currentAmerzoneLevel();
@@ -679,6 +681,7 @@ struct LoadSave : public Script::Command {
}
};
+// Amerzone-specific save plugin
struct Save : public Script::Command {
int slot;
Save(const Common::Array<Common::String> &args) : slot(atoi(args[0].c_str())) {}
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 1a7477b3463..a8c008ff305 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -1693,6 +1693,7 @@ void PhoenixVREngine::captureContext() {
ms.writeSint32LE(fromAngle(_angleX.rangeMin()));
ms.writeSint32LE(fromAngle(_angleX.rangeMax()));
ms.writeSint32LE(_warpIdx);
+ debug("captureContext: warpIdx: %d, prev: %d", _warpIdx, _prevWarp);
ms.writeUint32LE(_warp->tests.size());
writeString({});
writeString({});
@@ -1787,7 +1788,6 @@ bool PhoenixVREngine::enterScript() {
for (auto &warpCursors : _cursors) {
for (auto &warpCursor : warpCursors) {
auto cursor = ms.readString(0, 257);
- debug("cursor %s", cursor.c_str());
if (cursor.hasSuffix(".VR") || cursor.hasSuffix(".vr")) {
debug("ignoring VR cursor, original engine saves `LOAD.VR` as a cursor name at loading screen");
cursor.clear();
diff --git a/engines/phoenixvr/script.cpp b/engines/phoenixvr/script.cpp
index cd6a432e820..c96ab17becd 100644
--- a/engines/phoenixvr/script.cpp
+++ b/engines/phoenixvr/script.cpp
@@ -339,7 +339,7 @@ void Script::parseLine(const Common::String &line, uint lineno) {
if (!_warpsIndex.contains(vr))
_warpsIndex[vr] = _warps.size();
else
- warning("duplicate warp %s\n", vr.c_str());
+ warning("duplicate warp %s", vr.c_str());
_warps.push_back(_currentWarp);
_warpNames.push_back(vr);
} else if (p.maybe("test]=")) {
More information about the Scummvm-git-logs
mailing list