[Scummvm-git-logs] scummvm master -> d31f2dfd9dd4cda44a19fc8021cc676314045b29

whoozle noreply at scummvm.org
Fri Mar 6 23:35:22 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:
d31f2dfd9d PHOENIXVR: allow .pak compression for any files


Commit: d31f2dfd9dd4cda44a19fc8021cc676314045b29
    https://github.com/scummvm/scummvm/commit/d31f2dfd9dd4cda44a19fc8021cc676314045b29
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-06T23:34:00Z

Commit Message:
PHOENIXVR: allow .pak compression for any files

Changed paths:
    engines/phoenixvr/phoenixvr.cpp
    engines/phoenixvr/phoenixvr.h


diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index f5142c50410..c6a78720af6 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -101,23 +101,37 @@ Common::String PhoenixVREngine::removeDrive(const Common::String &path) {
 	else
 		return path.substr(2);
 }
-Common::SeekableReadStream *PhoenixVREngine::open(const Common::String &name) {
-	debug("open %s", name.c_str());
-	auto packed = name.hasSuffixIgnoreCase(".lst");
-	auto filename = packed ? name.substr(0, name.size() - 4) + ".pak" : name;
-	auto p = _currentScriptPath.append(filename, '\\').normalize();
+
+Common::SeekableReadStream *PhoenixVREngine::tryOpen(const Common::Path &name) {
 	Common::ScopedPtr<Common::File> s(new Common::File());
-	debug("trying %s", p.toString().c_str());
-	if (s->open(p)) {
-		debug("opening %s: %s", name.c_str(), p.toString().c_str());
-		return packed ? unpack(*s) : s.release();
+	if (s->open(name)) {
+		auto nameStr = name.toString();
+		debug("opened %s", nameStr.c_str());
+		return s.release();
 	}
-	p = filename;
-	debug("trying %s", p.toString().c_str());
-	if (s->open(p)) {
-		debug("opening %s: %s", name.c_str(), p.toString().c_str());
-		return packed ? unpack(*s) : s.release();
+	auto pakName = name.toString();
+	auto dotPos = pakName.rfind('.');
+	if (dotPos == pakName.npos)
+		return nullptr;
+	pakName = pakName.substr(0, dotPos) + ".pak";
+	if (s->open(Common::Path{pakName})) {
+		debug("opened %s", pakName.c_str());
+		return unpack(*s);
 	}
+
+	return nullptr;
+}
+
+Common::SeekableReadStream *PhoenixVREngine::open(Common::String filename) {
+	debug("open %s", filename.c_str());
+	auto *stream = tryOpen(_currentScriptPath.append(filename, '\\').normalize());
+	if (stream)
+		return stream;
+
+	stream = tryOpen(Common::Path{filename});
+	if (stream)
+		return stream;
+
 	return nullptr;
 }
 
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 1e25891b8f5..805e4f5774b 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -182,7 +182,8 @@ public:
 
 private:
 	static Common::String removeDrive(const Common::String &path);
-	Common::SeekableReadStream *open(const Common::String &name);
+	Common::SeekableReadStream *open(Common::String name);
+	Common::SeekableReadStream *tryOpen(const Common::Path &name);
 
 	Graphics::Surface *loadSurface(const Common::String &path);
 	Graphics::Surface *loadCursor(const Common::String &path);




More information about the Scummvm-git-logs mailing list