[Scummvm-git-logs] scummvm master -> 2b00109ea73f961342ff0c7476b0689ae5d83828

sev- noreply at scummvm.org
Sun May 17 23:49:03 UTC 2026


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
19e703bd4f COMMON: Switch creator and type in FinderInfo to uint32
b284d1adaf COMMON: Declare MacResMan::getFinderInfoFromMacBinary() as public
2b00109ea7 DIRECTOR: Recognise early director movies by their Finder type in fallback detection


Commit: 19e703bd4fc7cb3a143f1211b831ed5312ebda21
    https://github.com/scummvm/scummvm/commit/19e703bd4fc7cb3a143f1211b831ed5312ebda21
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-05-17T22:37:35+02:00

Commit Message:
COMMON: Switch creator and type in FinderInfo to uint32

This makes it conformant with the MKTAG() macro and makes the usage
more convenient

Changed paths:
    common/compression/stuffit.cpp
    common/compression/vise.cpp
    common/macresman.cpp
    common/macresman.h
    engines/mtropolis/boot.cpp
    engines/wage/detection.cpp


diff --git a/common/compression/stuffit.cpp b/common/compression/stuffit.cpp
index ff8b1e4c2e1..290c388533a 100644
--- a/common/compression/stuffit.cpp
+++ b/common/compression/stuffit.cpp
@@ -189,8 +189,8 @@ bool StuffItArchive::open(Common::SeekableReadStream *stream, bool flattenTree)
 
 		MacFinderInfo finfo;
 
-		headStream.read(finfo.type, 4);
-		headStream.read(finfo.creator, 4);
+		finfo.type = headStream.readUint32BE();
+		finfo.creator = headStream.readUint32BE();
 		finfo.flags = headStream.readUint16BE();
 		/* uint32 creationDate = */ headStream.readUint32BE();
 		/* uint32 modificationDate = */ headStream.readUint32BE();
diff --git a/common/compression/vise.cpp b/common/compression/vise.cpp
index e03f33d1dd4..ec9df860a3a 100644
--- a/common/compression/vise.cpp
+++ b/common/compression/vise.cpp
@@ -43,8 +43,8 @@ private:
 	struct FileDesc {
 		FileDesc();
 
-		byte type[4];
-		byte creator[4];
+		uint32 type;
+		uint32 creator;
 		uint32 compressedDataSize;
 		uint32 uncompressedDataSize;
 		uint32 compressedResSize;
@@ -120,8 +120,8 @@ Common::SeekableReadStream *MacVISEArchive::ArchiveMember::createReadStreamForAl
 			return nullptr;
 
 		Common::MacFinderInfo finfo;
-		memcpy(finfo.type, _fileDesc->type, 4);
-		memcpy(finfo.creator, _fileDesc->creator, 4);
+		finfo.type = _fileDesc->type;
+		finfo.creator = _fileDesc->creator;
 
 		*finfoData = finfo.toData();
 
@@ -224,7 +224,7 @@ bool MacVISEArchive::ArchiveMember::isInMacArchive() const {
 	return true;
 }
 
-MacVISEArchive::FileDesc::FileDesc() : type{0, 0, 0, 0}, creator{0, 0, 0, 0}, compressedDataSize(0), uncompressedDataSize(0), compressedResSize(0), uncompressedResSize(0), positionInArchive(0) {
+MacVISEArchive::FileDesc::FileDesc() : type(0), creator(0), compressedDataSize(0), uncompressedDataSize(0), compressedResSize(0), uncompressedResSize(0), positionInArchive(0) {
 }
 
 MacVISEArchive::MacVISEArchive(Common::SeekableReadStream *archiveStream) : _archiveStream(archiveStream) {
@@ -302,8 +302,8 @@ bool MacVISEArchive::loadCatalog() {
 			}
 
 			FileDesc desc;
-			memcpy(desc.type, fileData + 40, 4);
-			memcpy(desc.creator, fileData + 44, 4);
+			desc.type = READ_BE_UINT32(fileData + 40);
+			desc.creator = READ_BE_UINT32(fileData + 44);
 			desc.compressedDataSize = READ_BE_UINT32(fileData + 64);
 			desc.uncompressedDataSize = READ_BE_UINT32(fileData + 68);
 			desc.compressedResSize = READ_BE_UINT32(fileData + 72);
diff --git a/common/macresman.cpp b/common/macresman.cpp
index 43cd05d7764..fc11e3fd143 100644
--- a/common/macresman.cpp
+++ b/common/macresman.cpp
@@ -37,12 +37,12 @@
 
 namespace Common {
 
-MacFinderInfo::MacFinderInfo() : type{0, 0, 0, 0}, creator{0, 0, 0, 0}, flags(0), position(0, 0), windowID(0) {
+MacFinderInfo::MacFinderInfo() : type(0), creator(0), flags(0), position(0, 0), windowID(0) {
 }
 
 MacFinderInfo::MacFinderInfo(const MacFinderInfoData &data) {
-	memcpy(type, data.data + 0, 4);
-	memcpy(creator, data.data + 4, 4);
+	type = READ_BE_UINT32(data.data + 0);
+	creator = READ_BE_UINT32(data.data + 4);
 	flags = READ_BE_UINT16(data.data + 8);
 	position.y = READ_BE_INT16(data.data + 10);
 	position.x = READ_BE_INT16(data.data + 12);
@@ -51,8 +51,8 @@ MacFinderInfo::MacFinderInfo(const MacFinderInfoData &data) {
 
 MacFinderInfoData MacFinderInfo::toData() const {
 	MacFinderInfoData data;
-	memcpy(data.data + 0, type, 4);
-	memcpy(data.data + 4, creator, 4);
+	WRITE_BE_UINT32(data.data + 0, type);
+	WRITE_BE_UINT32(data.data + 4, creator);
 	WRITE_BE_UINT16(data.data + 8, flags);
 	WRITE_BE_INT16(data.data + 10, position.y);
 	WRITE_BE_INT16(data.data + 12, position.x);
@@ -651,8 +651,8 @@ bool MacResManager::getFinderInfoFromMacBinary(SeekableReadStream *stream, MacFi
 	MacFinderInfo finfo;
 
 	// Parse fields
-	memcpy(finfo.type, infoHeader + MBI_TYPE, 4);
-	memcpy(finfo.creator, infoHeader + MBI_CREATOR, 4);
+	finfo.type = READ_BE_UINT32(infoHeader + MBI_TYPE);
+	finfo.creator = READ_BE_UINT32(infoHeader + MBI_CREATOR);
 	finfo.flags = (infoHeader[MBI_FLAGSHIGH] << 8) + infoHeader[MBI_FLAGSLOW];
 	finfo.position.x = READ_BE_INT16(infoHeader + MBI_POSX);
 	finfo.position.y = READ_BE_INT16(infoHeader + MBI_POSY);
diff --git a/common/macresman.h b/common/macresman.h
index 98bd4d15af8..a1a5d6ad36c 100644
--- a/common/macresman.h
+++ b/common/macresman.h
@@ -96,8 +96,8 @@ struct MacFinderInfo {
 
 	MacFinderInfoData toData() const;
 
-	byte type[4];
-	byte creator[4];
+	uint32 type;
+	uint32 creator;
 	uint16 flags;
 	Common::Point position;
 	int16 windowID;
diff --git a/engines/mtropolis/boot.cpp b/engines/mtropolis/boot.cpp
index 19501dc2765..63bd67bda48 100644
--- a/engines/mtropolis/boot.cpp
+++ b/engines/mtropolis/boot.cpp
@@ -2583,7 +2583,7 @@ PlayerType evaluateMacPlayer(Common::Archive &fs, Common::ArchiveMember &archive
 
 	Common::MacFinderInfo finderInfo;
 	if (Common::MacResManager::getFileFinderInfo(path, fs, finderInfo)) {
-		if (finderInfo.type[0] != 'A' || finderInfo.type[1] != 'P' || finderInfo.type[2] != 'P' || finderInfo.type[3] != 'L')
+		if (finderInfo.type != MKTAG('A', 'P', 'P', 'L'))
 			return kPlayerTypeNone;
 	}
 
@@ -2732,7 +2732,7 @@ bool getMacFileType(Common::Archive &fs, const Common::Path &path, uint32 &outTa
 	if (!Common::MacResManager::getFileFinderInfo(path, fs, finderInfo))
 		return false;
 
-	outTag = MKTAG(finderInfo.type[0], finderInfo.type[1], finderInfo.type[2], finderInfo.type[3]);
+	outTag = finderInfo.type;
 	return true;
 }
 
diff --git a/engines/wage/detection.cpp b/engines/wage/detection.cpp
index bb6b4bc3852..ef3137ef711 100644
--- a/engines/wage/detection.cpp
+++ b/engines/wage/detection.cpp
@@ -104,10 +104,10 @@ ADDetectedGame WageMetaEngineDetection::fallbackDetect(const FileMap &allFiles,
 
 		Common::MacFinderInfo finderInfo;
 		if (resManager.getFileFinderInfo(filePath, finderInfo)) {
-			if (READ_BE_UINT32(finderInfo.type) != MKTAG('A', 'P', 'P', 'L')) {
+			if (finderInfo.type != MKTAG('A', 'P', 'P', 'L')) {
 				continue;
 			}
-			if (READ_BE_UINT32(finderInfo.creator) != MKTAG('W', 'E', 'D', 'T')) {
+			if (finderInfo.creator != MKTAG('W', 'E', 'D', 'T')) {
 				continue;
 			}
 


Commit: b284d1adaf265a6b8d1f6cabd991c556077c2f1c
    https://github.com/scummvm/scummvm/commit/b284d1adaf265a6b8d1f6cabd991c556077c2f1c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-05-17T23:39:56+02:00

Commit Message:
COMMON: Declare MacResMan::getFinderInfoFromMacBinary() as public

Changed paths:
    common/macresman.h


diff --git a/common/macresman.h b/common/macresman.h
index a1a5d6ad36c..8fa7b9d25b2 100644
--- a/common/macresman.h
+++ b/common/macresman.h
@@ -360,11 +360,13 @@ private:
 	bool loadFromRawFork(SeekableReadStream *stream);
 	bool loadFromAppleDouble(SeekableReadStream *stream);
 
+public:
 	/**
 	 * Get Finder info from a file in MacBinary format
 	 */
 	static bool getFinderInfoFromMacBinary(SeekableReadStream *stream, MacFinderInfo &outFinderInfo, MacFinderExtendedInfo &outFinderExtendedInfo);
 
+private:
 	/**
 	 * Get Finder info from a file in AppleDouble format
 	 */


Commit: 2b00109ea73f961342ff0c7476b0689ae5d83828
    https://github.com/scummvm/scummvm/commit/2b00109ea73f961342ff0c7476b0689ae5d83828
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-05-18T00:00:13+02:00

Commit Message:
DIRECTOR: Recognise early director movies by their Finder type in fallback detection

Changed paths:
    engines/director/detection.cpp


diff --git a/engines/director/detection.cpp b/engines/director/detection.cpp
index d8b003786ab..4f748d780da 100644
--- a/engines/director/detection.cpp
+++ b/engines/director/detection.cpp
@@ -375,6 +375,30 @@ ADDetectedGame DirectorMetaEngineDetection::fallbackDetect(const FileMap &allFil
 			if (Common::MacResManager::isMacBinary(f)) {
 				warning("Director fallback detection: Start movie is in MacBinary format, reporting as Mac Director game");
 				desc->desc.platform = Common::kPlatformMacintosh;
+
+				f.seek(0);
+
+				Common::MacFinderInfo info;
+				Common::MacFinderExtendedInfo fxinfo;
+				if (Common::MacResManager::getFinderInfoFromMacBinary(&f, info, fxinfo)) {
+					switch (info.type) {
+					case MKTAG('V', 'W', 'S', 'C'):	// VideoWorks II movies ("scenes")
+						desc->version = 50;
+						break;
+					case MKTAG('V', 'W', 'Z', 'P'):	// VideoWorks + Director Overview ("Zorro")
+						desc->version = 0;
+						break;
+					case MKTAG('V', 'W', 'P', 'R'):	// "VideoWorks Pro" = Director
+						desc->version = 100;
+						break;
+					case MKTAG('V', 'W', 'M', 'D'):	// Director 3.0
+						desc->version = 300;
+						break;
+					default:
+						warning("Director fallback detection: Start movie has unrecognized Finder type %s, cannot determine version", tag2str(info.type));
+						break;
+					}
+				}
 			} else {
 				f.seek(0);
 				uint32 initialTag = f.readUint32BE();




More information about the Scummvm-git-logs mailing list