[Scummvm-git-logs] scummvm master -> 17141b0e7be5f7087efcaee2a61d1e40e073ee2f

sev- noreply at scummvm.org
Wed Mar 16 23:43:06 UTC 2022


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

Summary:
44d5722d0c DIRECTOR: Fixed extension replacement is makePathRelative()
9c09c68cd6 DIRECTOR: Added more debug output
1a5f2d6af9 DIRECTOR: Probe additional variant in makePathRelative()
17141b0e7b DIRECTOR: Probe relative paths in external vide loading.


Commit: 44d5722d0cfa84ffa94506c27a6efd2c2c8c7cdf
    https://github.com/scummvm/scummvm/commit/44d5722d0cfa84ffa94506c27a6efd2c2c8c7cdf
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-03-17T00:41:13+01:00

Commit Message:
DIRECTOR: Fixed extension replacement is makePathRelative()

Changed paths:
    engines/director/util.cpp


diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 5b2217ee823..7eb1c33ca89 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -737,6 +737,10 @@ Common::String convertMacFilename(const char *name) {
 
 			cnt++;
 		}
+
+		// If the result filename ends with '.', remove it
+		if (res.hasSuffix("."))
+			res = res.substr(0, res.size() - 1);
 	}
 
 	return res;


Commit: 9c09c68cd6316e97372859acc1f99a3f77fb10c7
    https://github.com/scummvm/scummvm/commit/9c09c68cd6316e97372859acc1f99a3f77fb10c7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-03-17T00:41:13+01:00

Commit Message:
DIRECTOR: Added more debug output

Changed paths:
    engines/director/util.cpp


diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 7eb1c33ca89..140d153ae5e 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -465,6 +465,8 @@ Common::String wrappedPathMakeRelative(Common::String path, bool recursive, bool
 
 	Common::String initialPath(path);
 
+	debug(9, "pathMakeRelative(): s0 %s -> %s", path.c_str(), initialPath.c_str());
+
 	if (recursive) // first level
 		initialPath = convertPath(initialPath);
 
@@ -599,7 +601,7 @@ Common::String testExtensions(Common::String component, Common::String initialPa
 	for (int i = 0; exts[i]; ++i) {
 		Common::String newpath = convPath + convertMacFilename(component.c_str()) + exts[i];
 
-		debug(9, "pathMakeRelative(): s6 %s -> try %s", initialPath.c_str(), newpath.c_str());
+		debug(9, "testExtensions(): sT %s -> try %s, comp: %s", initialPath.c_str(), newpath.c_str(), component.c_str());
 		Common::String res = wrappedPathMakeRelative(newpath, false, false);
 
 		if (testPath(res))


Commit: 1a5f2d6af93cebd62a7aa51ecf05bea6987105dd
    https://github.com/scummvm/scummvm/commit/1a5f2d6af93cebd62a7aa51ecf05bea6987105dd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-03-17T00:41:14+01:00

Commit Message:
DIRECTOR: Probe additional variant in makePathRelative()

Changed paths:
    engines/director/util.cpp


diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 140d153ae5e..ca701821c4e 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -492,8 +492,15 @@ Common::String wrappedPathMakeRelative(Common::String path, bool recursive, bool
 
 		debug(9, "pathMakeRelative(): s3 try %s", convPath.c_str());
 
-		if (!testPath(convPath, directory))
-			continue;
+		if (!testPath(convPath, directory)) {
+			// If we were supplied with parh with subdirectories,
+			// attempt to combine it with the current movie path at every iteration
+			Common::String locPath = Common::normalizePath(g_director->getCurrentPath() + convPath, g_director->_dirSeparator);
+			debug(9, "pathMakeRelative(): s3.1 try %s", locPath.c_str());
+
+			if (!testPath(locPath, directory))
+				continue;
+		}
 
 		debug(9, "pathMakeRelative(): s3 converted %s -> %s", path.c_str(), convPath.c_str());
 


Commit: 17141b0e7be5f7087efcaee2a61d1e40e073ee2f
    https://github.com/scummvm/scummvm/commit/17141b0e7be5f7087efcaee2a61d1e40e073ee2f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-03-17T00:41:14+01:00

Commit Message:
DIRECTOR: Probe relative paths in external vide loading.

This fixes bug in Opera Fatal intro

Changed paths:
    engines/director/castmember.cpp


diff --git a/engines/director/castmember.cpp b/engines/director/castmember.cpp
index c78201b90b7..8a802e53163 100644
--- a/engines/director/castmember.cpp
+++ b/engines/director/castmember.cpp
@@ -359,11 +359,13 @@ bool DigitalVideoCastMember::loadVideo(Common::String path) {
 	_filename = path;
 	_video = new Video::QuickTimeDecoder();
 
-	debugC(2, kDebugLoading | kDebugImages, "Loading video %s", path.c_str());
-	bool result = _video->loadFile(Common::Path(path, g_director->_dirSeparator));
+	Common::String path1 = pathMakeRelative(path);
+
+	debugC(2, kDebugLoading | kDebugImages, "Loading video %s -> %s", path.c_str(), path1.c_str());
+	bool result = _video->loadFile(Common::Path(path1, g_director->_dirSeparator));
 	if (!result) {
 		_video = new Video::AVIDecoder();
-		result = _video->loadFile(Common::Path(path, g_director->_dirSeparator));
+		result = _video->loadFile(Common::Path(path1, g_director->_dirSeparator));
 	}
 
 	if (result && g_director->_pixelformat.bytesPerPixel == 1) {




More information about the Scummvm-git-logs mailing list