[Scummvm-git-logs] scummvm master -> d2f659faf7f7ffb5bf14a2c003f1b0ea508ebe87
sev-
noreply at scummvm.org
Sat Jun 14 21:19:52 UTC 2025
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:
359e7636f2 ENGINES: Removed usage of kMD5MacResOrDataFork
d2f659faf7 M$: Added kADFlagMatchFullPaths flag to AD since one of ripley variants is usingn it
Commit: 359e7636f2d026652a89cf5baaebbef48f086b1e
https://github.com/scummvm/scummvm/commit/359e7636f2d026652a89cf5baaebbef48f086b1e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-06-14T23:12:32+02:00
Commit Message:
ENGINES: Removed usage of kMD5MacResOrDataFork
This is a bad syntax for ADGF_MACRESFORK, whuch by the previous
code version was computing only resource forks.
If we managed to mix files with resources and plain files in
a single detection entries, those entries must be fixed with
the respective md5 prefixes, e g. r: or d:
Changed paths:
engines/advancedDetector.cpp
engines/game.cpp
engines/game.h
engines/sci/detection.cpp
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 663e98d4c22..b67e2351a0a 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -491,7 +491,7 @@ static MD5Properties gameFileToMD5Props(const ADGameFileDescription *fileEntry,
}
if (gameFlags & ADGF_MACRESFORK) {
- ret = (MD5Properties)(ret | kMD5MacResOrDataFork);
+ ret = (MD5Properties)(ret | kMD5MacResFork);
}
if (gameFlags & ADGF_TAILMD5) {
@@ -509,10 +509,6 @@ Common::String md5PropToGameFile(MD5Properties flags) {
res = "d";
break;
- case kMD5MacResOrDataFork:
- res = "m";
- break;
-
case kMD5MacResFork:
res = "r";
break;
@@ -562,7 +558,7 @@ bool AdvancedMetaEngineBase::getFilePropertiesExtern(uint md5Bytes, const FileMa
static bool getFilePropertiesIntern(uint md5Bytes, const AdvancedMetaEngineBase::FileMap &allFiles, MD5Properties md5prop, const Common::Path &fname, FileProperties &fileProps) {
if (md5prop & (kMD5MacResFork | kMD5MacDataFork)) {
FileMapArchive fileMapArchive(allFiles);
- bool is_legacy = ((md5prop & kMD5MacMask) == kMD5MacResOrDataFork);
+
if (md5prop & kMD5MacResFork) {
Common::MacResManager macResMan;
@@ -580,8 +576,7 @@ static bool getFilePropertiesIntern(uint md5Bytes, const AdvancedMetaEngineBase:
if (md5prop & kMD5MacDataFork) {
Common::SeekableReadStream *dataFork = Common::MacResManager::openFileOrDataFork(fname, fileMapArchive);
- // Logically 0-sized data fork is valid but legacy code continues fallback
- if (dataFork && (dataFork->size() || !is_legacy)) {
+ if (dataFork) {
fileProps.size = dataFork->size();
fileProps.md5 = Common::computeStreamMD5AsString(*dataFork, md5Bytes);
fileProps.md5prop = (MD5Properties)((md5prop & kMD5Tail) | kMD5MacDataFork);
@@ -591,9 +586,8 @@ static bool getFilePropertiesIntern(uint md5Bytes, const AdvancedMetaEngineBase:
delete dataFork;
}
- // In modern case stop here
- if (!is_legacy)
- return false;
+ // We have no forks
+ return false;
}
Common::ScopedPtr<Common::SeekableReadStream> testFile;
diff --git a/engines/game.cpp b/engines/game.cpp
index 2586e8a1e02..d4880bb001f 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -175,14 +175,10 @@ Common::String md5PropToCachePrefix(MD5Properties flags) {
}
switch (flags & kMD5MacMask) {
- case kMD5MacDataFork:
+ case kMD5MacDataFork:
res += 'd';
break;
- case kMD5MacResOrDataFork:
- res += 'm';
- break;
-
case kMD5MacResFork:
res += 'r';
break;
diff --git a/engines/game.h b/engines/game.h
index d428d1e110f..e427dfd3167 100644
--- a/engines/game.h
+++ b/engines/game.h
@@ -108,7 +108,6 @@ enum MD5Properties {
kMD5Tail = 1 << 1, // the MD5 is calculated from the tail
kMD5MacResFork = 1 << 2, // the MD5 is calculated from the Mac Resource fork (no fall back) (head or tail)
kMD5MacDataFork = 1 << 3, // the MD5 is calculated from the Mac Data fork (head or tail)
- kMD5MacResOrDataFork = kMD5MacResFork | kMD5MacDataFork, // the MD5 is calculated from the Mac Resource fork falling back to data fork (head or tail). Deprecated.
kMD5MacMask = kMD5MacResFork | kMD5MacDataFork, // Mask for mac type
kMD5Archive = 1 << 4, // the desired file is inside an archive
};
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index f1c6a5c9403..f5112675d3f 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -296,7 +296,7 @@ ADDetectedGame SciMetaEngineDetection::fallbackDetect(const FileMap &allFiles, c
}
} else if (allFiles.contains("Data1")) {
// add Mac volumes
- md5Prop = (MD5Properties)(md5Prop | kMD5MacResOrDataFork);
+ md5Prop = (MD5Properties)(md5Prop | kMD5MacResFork);
for (int i = 1; i <= 13; i++) {
Common::String volume = Common::String::format("Data%d", i);
addFileToDetectedGame(Common::Path(volume), allFiles, md5Prop, game);
Commit: d2f659faf7f7ffb5bf14a2c003f1b0ea508ebe87
https://github.com/scummvm/scummvm/commit/d2f659faf7f7ffb5bf14a2c003f1b0ea508ebe87
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-06-14T23:18:29+02:00
Commit Message:
M$: Added kADFlagMatchFullPaths flag to AD since one of ripley variants is usingn it
Changed paths:
engines/m4/detection.cpp
diff --git a/engines/m4/detection.cpp b/engines/m4/detection.cpp
index b9ca6bb013c..f4256ff6d41 100644
--- a/engines/m4/detection.cpp
+++ b/engines/m4/detection.cpp
@@ -44,6 +44,7 @@ M4MetaEngineDetection::M4MetaEngineDetection() : AdvancedMetaEngineDetection(M4:
_guiOptions = GUIO1(GAMEOPTION_ORIGINAL_SAVELOAD);
_maxScanDepth = 2;
_directoryGlobs = DIRECTORY_GLOBS;
+ _flags = kADFlagMatchFullPaths;
}
REGISTER_PLUGIN_STATIC(M4_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, M4MetaEngineDetection);
More information about the Scummvm-git-logs
mailing list