[Scummvm-git-logs] scummvm master -> 1c27ed49f56662543e757bdbd6a2a0855a45adbb

sev- noreply at scummvm.org
Sun Oct 13 17:57:47 UTC 2024


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

Summary:
6e8d0611dc DIRECTOR: Remove endian bodge in Windows projector loader
9441405858 DIRECTOR: Update Pop Up Computer detection entry
1c27ed49f5 DIRECTOR: Fix resolvePath to test extensions against all sources


Commit: 6e8d0611dc9007649ca808bf1285c4b9050206f7
    https://github.com/scummvm/scummvm/commit/6e8d0611dc9007649ca808bf1285c4b9050206f7
Author: Scott Percival (code at moral.net.au)
Date: 2024-10-13T19:57:43+02:00

Commit Message:
DIRECTOR: Remove endian bodge in Windows projector loader

It is possible for the size of a movie stored as an entry to be larger
than the start offset of the list.

Fixes loading the resource list in the Windows version of Pop Up
Computer.

Changed paths:
    engines/director/resource.cpp


diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index 574d1be3cbb..c8da60f975b 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -736,12 +736,6 @@ bool ProjectorArchive::loadArchive(Common::SeekableReadStream *stream) {
 		tag = stream->readUint32BE();
 		size = bigEndian ? stream->readUint32BE() : stream->readUint32LE();
 
-		// endianness issue, swap size and continue
-		if (size > stream->pos()) {
-			bigEndian = !bigEndian;
-			size = SWAP_BYTES_32(size);
-		}
-
 		Common::Path path = toSafePath(arr[i]);
 
 		debugC(1, kDebugLoading, "Entry: %s offset %lX (%ld) tag %s size %d", path.toString().c_str(), long(stream->pos() - 8), long(stream->pos() - 8), tag2str(tag), size);


Commit: 9441405858ce7a57a9927ac424c8ec2fc8d58451
    https://github.com/scummvm/scummvm/commit/9441405858ce7a57a9927ac424c8ec2fc8d58451
Author: Scott Percival (code at moral.net.au)
Date: 2024-10-13T19:57:43+02:00

Commit Message:
DIRECTOR: Update Pop Up Computer detection entry

The game uses a ProjectorArchive with hardcoded paths of e.g.
F:\POPUP\A.DIR. For the path detection to work, we need to include
the whole CD.

Changed paths:
    engines/director/detection_tables.h


diff --git a/engines/director/detection_tables.h b/engines/director/detection_tables.h
index be2a86bb97a..701185af99b 100644
--- a/engines/director/detection_tables.h
+++ b/engines/director/detection_tables.h
@@ -5421,7 +5421,7 @@ static const DirectorGameDescription gameDescriptions[] = {
 	MACGAME1("popapenguin", "", "pwrmacp", "ccf864a8dc6e9d0d26eb73b4683e634b", 61012, 404),
 
 	MACGAME1_l("popup", "", "POP UP COMPUTER", "c1c73a286e7fdb439c8d49c79a2d9997", 318305, Common::JA_JPN, 400),
-	WINGAME1_l("popup", "", "POPUP.EXE", "f47f7663a75120eca6c9e91025d51786", 65216494, Common::JA_JPN, 400),
+	WINGAME1_l("popup", "", "POPUP/POPUP.EXE", "f47f7663a75120eca6c9e91025d51786", 65216494, Common::JA_JPN, 400),
 	MACDEMO1_l("popup", "Demo",		 "POP UP COMPUTER DEMO", "r:8272aef35bd90e06bac5d622707d9459", 304941, Common::JA_JPN, 400),
 	MACDEMO1_l("popup", "Auto Demo", "Pop up auto demo",	 "r:bcd3c718db258701496b3c5bcb827ef2", 484067, Common::JA_JPN, 404),
 


Commit: 1c27ed49f56662543e757bdbd6a2a0855a45adbb
    https://github.com/scummvm/scummvm/commit/1c27ed49f56662543e757bdbd6a2a0855a45adbb
Author: Scott Percival (code at moral.net.au)
Date: 2024-10-13T19:57:43+02:00

Commit Message:
DIRECTOR: Fix resolvePath to test extensions against all sources

Previously we were only testing extensions for Director files from
the file system, not from e.g. SearchMan.

Fixes movie switching in Pop Up Computer; the script makes calls
like go(1, "A"), referring to a movie embedded in a ProjectorArchive
with a path entry of "F:\POPUP\A.DIR".

Changed paths:
    engines/director/util.cpp
    engines/director/util.h


diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index f91eaa8ccad..1bb958d9ea1 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -688,20 +688,10 @@ Common::Path resolveFSPath(const Common::String &path, const Common::Path &base,
 	return Common::Path();
 }
 
-Common::Path resolvePath(const Common::String &path, const Common::Path &base, bool directory, const char **exts) {
+Common::Path resolvePathInner(const Common::String &path, const Common::Path &base, bool directory) {
 	Common::Path result = resolveFSPath(path, base, directory);
 	if (!result.empty()) {
 		return result;
-	} else if (result.empty() && !directory && exts) {
-		Common::String fileBase = path;
-		if (hasExtension(fileBase))
-			fileBase = fileBase.substr(0, fileBase.size() - 4);
-		for (int i = 0; exts[i]; i++) {
-			Common::String fileExt = fileBase + exts[i];
-			result = resolveFSPath(fileExt, base, directory);
-			if (!result.empty())
-				return result;
-		}
 	}
 
 	// No filesystem match, check caches
@@ -760,6 +750,22 @@ Common::Path resolvePath(const Common::String &path, const Common::Path &base, b
 	return Common::Path();
 }
 
+Common::Path resolvePath(const Common::String &path, const Common::Path &base, bool directory, const char **exts) {
+	Common::Path result = resolvePathInner(path, base, directory);
+	if (result.empty() && !directory && exts) {
+		Common::String fileBase = path;
+		if (hasExtension(fileBase))
+			fileBase = fileBase.substr(0, fileBase.size() - 4);
+		for (int i = 0; exts[i]; i++) {
+			Common::String fileExt = fileBase + exts[i];
+			result = resolvePathInner(fileExt, base, directory);
+			if (!result.empty())
+				break;
+		}
+	}
+	return result;
+}
+
 Common::Path resolvePartialPath(const Common::String &path, const Common::Path &base, bool directory, const char **exts) {
 	Common::String converted = convertPath(path);
 	Common::Path result;
diff --git a/engines/director/util.h b/engines/director/util.h
index 9be0e4ad06d..a4c3a1be507 100644
--- a/engines/director/util.h
+++ b/engines/director/util.h
@@ -43,6 +43,7 @@ Common::String unixToMacPath(const Common::String &path);
 Common::String getPath(const Common::String &path, const Common::String &cwd);
 
 Common::Path resolveFSPath(const Common::String &path, const Common::Path &base, bool directory);
+Common::Path resolvePathInner(const Common::String &path, const Common::Path &base, bool directory, const char *ext);
 Common::Path resolvePath(const Common::String &path, const Common::Path &base, bool directory, const char **exts);
 Common::Path resolvePartialPath(const Common::String &path, const Common::Path &base, bool directory, const char **exts);
 Common::Path resolvePathWithFuzz(const Common::String &path, const Common::Path &base, bool directory, const char **exts);




More information about the Scummvm-git-logs mailing list