[Scummvm-git-logs] scummvm master -> 5c6f993dec3087d8ce5ada998581943b9a9dc5a1
tnm23
noreply at scummvm.org
Tue Jan 27 15:34:53 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:
83a9ca5953 COMMON:ARCHIVE: Allow multiple subdirectories with the same name to be added to a SearchSet when _ignoreClashes is set t
5c6f993dec ZVISION: Modify loadZix functionality to exclude subdirectories not explicitly named in the zix file.
Commit: 83a9ca5953b328f926d54fdb5e1cfa6ad2013ced
https://github.com/scummvm/scummvm/commit/83a9ca5953b328f926d54fdb5e1cfa6ad2013ced
Author: Thomas N McEwan (46427621+tnm23 at users.noreply.github.com)
Date: 2026-01-27T15:33:54Z
Commit Message:
COMMON:ARCHIVE: Allow multiple subdirectories with the same name to be added to a SearchSet when _ignoreClashes is set true.
Useful when operating in flat mode and multiple directories exist with the same name but different contents, such as in Z-Vision games.
Changed paths:
common/archive.cpp
diff --git a/common/archive.cpp b/common/archive.cpp
index 9dd781c42ab..8f1f3478f44 100644
--- a/common/archive.cpp
+++ b/common/archive.cpp
@@ -341,7 +341,7 @@ void SearchSet::insert(const Node &node) {
}
void SearchSet::add(const String &name, Archive *archive, int priority, bool autoFree) {
- if (find(name) == _list.end()) {
+ if ( (find(name) == _list.end()) || _ignoreClashes ) {
Node node(priority, name, archive, autoFree);
insert(node);
} else {
Commit: 5c6f993dec3087d8ce5ada998581943b9a9dc5a1
https://github.com/scummvm/scummvm/commit/5c6f993dec3087d8ce5ada998581943b9a9dc5a1
Author: Thomas N McEwan (46427621+tnm23 at users.noreply.github.com)
Date: 2026-01-27T15:33:54Z
Commit Message:
ZVISION: Modify loadZix functionality to exclude subdirectories not explicitly named in the zix file.
Intended to fix bugs caused by the presence & contents of "/null" subdirectory in certain releases of Grand Inquisitor.
loadZix now also adds directories in the specific sequence they occur in the zix file.
Remove prior bugfix for defective wne3hptc.raw files in Nemesis, as this makes it unnecessary.
Changed paths:
engines/zvision/file/file_manager.cpp
engines/zvision/file/file_manager.h
engines/zvision/zvision.cpp
diff --git a/engines/zvision/file/file_manager.cpp b/engines/zvision/file/file_manager.cpp
index 01b24c2d980..a8de55becfe 100644
--- a/engines/zvision/file/file_manager.cpp
+++ b/engines/zvision/file/file_manager.cpp
@@ -135,7 +135,7 @@ Common::Path FileManager::srcPath(Common::Path filePath) {
return filePath.getParent().appendComponent(name);
}
-bool FileManager::loadZix(const Common::Path &zixPath) {
+bool FileManager::loadZix(const Common::Path &zixPath, const Common::FSNode &gameDataDir) {
Common::File zixFile;
if (!zixFile.open(zixPath))
return false;
@@ -187,14 +187,19 @@ bool FileManager::loadZix(const Common::Path &zixPath) {
line.deleteLastChar();
Common::Path path(line, '/');
- path = path.getLastComponent(); //We are using the search manager in "flat" mode, so only filenames are needed
- if (line.matchString("*.zfs", true))
+ if (line.matchString("*.zfs", true)) {
if (!SearchMan.hasArchive(line)) {
- debugC(1, kDebugFile, "Adding archive %s to search manager.", path.toString().c_str());
- Common::Archive *arc;
- arc = new ZfsArchive(path);
- SearchMan.add(line, arc);
+ path = path.getLastComponent(); //We are using the search manager in "flat" mode, so only filenames are needed
+ debugC(1, kDebugFile, "Adding archive %s to search manager.", path.toString().c_str());
+ Common::Archive *arc;
+ arc = new ZfsArchive(path);
+ SearchMan.add(line, arc);
+ }
+ }
+ else {
+ debugC(1, kDebugFile, "Adding directory %s to search manager.", path.toString().c_str());
+ SearchMan.addSubDirectoryMatching(gameDataDir,path.toString());
}
archives++;
}
diff --git a/engines/zvision/file/file_manager.h b/engines/zvision/file/file_manager.h
index e852a71d2d8..fa57e4ee968 100644
--- a/engines/zvision/file/file_manager.h
+++ b/engines/zvision/file/file_manager.h
@@ -33,7 +33,7 @@ public:
FileManager(ZVision *engine);
~FileManager() {};
- bool loadZix(const Common::Path &zixPath);
+ bool loadZix(const Common::Path &zixPath, const Common::FSNode &gameDataDir);
Common::File *open(const Common::Path &fileName, bool allowSrc=true); // Wrapper to automatically handle loading of files which may be empty & have an alternate .src file
bool exists(Common::Path filePath, bool allowSrc=true); // Wrapper to automatically handle checking existence of files which may be empty & have an alternate .src file
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index c852d92b94a..bd7b867a7b7 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -398,22 +398,18 @@ void ZVision::initializePath(const Common::FSNode &gamePath) {
const Common::FSNode gameDataDir(gamePath);
SearchMan.setIgnoreClashes(true);
+ SearchMan.addDirectory(gamePath, 0, 1, true);
switch (getGameId()) {
case GID_GRANDINQUISITOR:
break;
case GID_NEMESIS:
- //Workaround for production error in English language releases of Zork Nemesis
- //Multiple copies of audio file wne3hptc.raw exist in the game data subdirectories; the one in the "temple" subdirectory plays at the wrong pitch, thus the other "global" subfolders containing the correct versions of this file must take search precedence to ensure that it is never used. Non-English releases should not be affected by this.
- SearchMan.addSubDirectoriesMatching(gameDataDir, "data*/zassets/global*", true);
- SearchMan.addSubDirectoriesMatching(gameDataDir, "zassets/global*", true);
- SearchMan.addSubDirectoriesMatching(gameDataDir, "global*", true);
+ SearchMan.addSubDirectoriesMatching(gameDataDir, "znemscr", true); // Add directory that may contain .zix file in some versions of the game
break;
case GID_NONE:
default:
break;
}
- SearchMan.addDirectory(gamePath, 0, 5, true);
SearchMan.addSubDirectoryMatching(gameDataDir, "FONTS");
// Ensure extras take first search priority
@@ -436,12 +432,12 @@ void ZVision::initializePath(const Common::FSNode &gamePath) {
switch (getGameId()) {
case GID_GRANDINQUISITOR:
- if (!_fileManager->loadZix("INQUIS.ZIX"))
+ if (!_fileManager->loadZix("INQUIS.ZIX", gameDataDir))
error("Unable to load file INQUIS.ZIX");
break;
case GID_NEMESIS:
- if (!_fileManager->loadZix("NEMESIS.ZIX")) // GOG version or used original game installer
- if (!_fileManager->loadZix("MEDIUM.ZIX")) // Manual installation from CD or ZGI DVD according to wiki.scummvm.org
+ if (!_fileManager->loadZix("NEMESIS.ZIX", gameDataDir)) // GOG version or used original game installer
+ if (!_fileManager->loadZix("MEDIUM.ZIX", gameDataDir)) // Manual installation from CD or ZGI DVD according to wiki.scummvm.org
error("Unable to load file NEMESIS.ZIX or MEDIUM.ZIX");
break;
case GID_NONE:
More information about the Scummvm-git-logs
mailing list