[Scummvm-git-logs] scummvm master -> e5f45df7af6c9911ccf5d7f7ad469948f6075eec
sev-
noreply at scummvm.org
Sat May 2 19:35:22 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:
365cb4921e DIRECTOR: Search the new shared cast in the directory of the new movie
e5f45df7af DIRECTOR: LINGO: Fix b_offset() for high-bit characters
Commit: 365cb4921ea3a78eb393487258cdfa1187567b26
https://github.com/scummvm/scummvm/commit/365cb4921ea3a78eb393487258cdfa1187567b26
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-05-02T21:35:07+02:00
Commit Message:
DIRECTOR: Search the new shared cast in the directory of the new movie
We were using path of the current movie, thus, if shared cast is present
in there, we will load it, instead of the proper cast for the new
movie.
Fixes loading in jewels1, where it first loads movies from
CIPHER/STAGE, then follows with movie from CIPHER
Changed paths:
engines/director/util.cpp
engines/director/util.h
engines/director/window.cpp
diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 0702b77d8f3..65d6e7c4b7d 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -869,12 +869,12 @@ Common::Path findPath(const Common::Path &path, bool currentFolder, bool searchP
return findPath(path.toString(g_director->_dirSeparator), currentFolder, searchPaths, directory, exts);
}
-Common::Path findPath(const Common::String &path, bool currentFolder, bool searchPaths, bool directory, const char **exts) {
+Common::Path findPath(const Common::String &path, bool currentFolder, bool searchPaths, bool directory, const char **exts, Common::String currentPath_) {
Common::Path result, base;
debugCN(1, kDebugPaths, "%s", recIndent());
debugC(1, kDebugPaths, "findPath(): beginning search for \"%s\"", path.c_str());
- Common::String currentPath = g_director->getCurrentPath();
+ Common::String currentPath = currentPath_.empty() ? g_director->getCurrentPath() : currentPath_;
Common::Path current = resolvePath(currentPath, base, true, exts);
Common::String testPath = path;
@@ -948,7 +948,7 @@ Common::Path findPath(const Common::String &path, bool currentFolder, bool searc
return Common::Path();
}
-Common::Path findMoviePath(const Common::String &path, bool currentFolder, bool searchPaths) {
+Common::Path findMoviePath(const Common::String &path, bool currentFolder, bool searchPaths, Common::String currentPath) {
const char *extsD3[] = { ".MMM", nullptr };
const char *extsD4[] = { ".DIR", ".DXR", ".EXE", nullptr };
const char *extsD5[] = { ".DIR", ".DXR", ".CST", ".CXT", ".EXE", nullptr };
@@ -965,7 +965,7 @@ Common::Path findMoviePath(const Common::String &path, bool currentFolder, bool
exts = extsD6;
}
- Common::Path result = findPath(path, currentFolder, searchPaths, false, exts);
+ Common::Path result = findPath(path, currentFolder, searchPaths, false, exts, currentPath);
return result;
}
diff --git a/engines/director/util.h b/engines/director/util.h
index 285f24aefbe..1bbf9e44f55 100644
--- a/engines/director/util.h
+++ b/engines/director/util.h
@@ -50,8 +50,8 @@ Common::Path resolvePathWithFuzz(const Common::String &path, const Common::Path
Common::Path resolvePartialPathWithFuzz(const Common::String &path, const Common::Path &base, bool directory, const char **exts);
Common::Path findAbsolutePath(const Common::String &path, bool directory = false, const char **exts = nullptr);
Common::Path findPath(const Common::Path &path, bool currentFolder = true, bool searchPaths = true, bool directory = false, const char **exts = nullptr);
-Common::Path findPath(const Common::String &path, bool currentFolder = true, bool searchPaths = true, bool directory = false, const char **exts = nullptr);
-Common::Path findMoviePath(const Common::String &path, bool currentFolder = true, bool searchPaths = true);
+Common::Path findPath(const Common::String &path, bool currentFolder = true, bool searchPaths = true, bool directory = false, const char **exts = nullptr, Common::String currentPath_ = "");
+Common::Path findMoviePath(const Common::String &path, bool currentFolder = true, bool searchPaths = true, Common::String currentPath = "");
Common::Path findXLibPath(const Common::String &path, bool currentFolder = true, bool searchPaths = true);
Common::Path findAudioPath(const Common::String &path, bool currentFolder = true, bool searchPaths = true);
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index ed062bd62e0..75e6c8d9862 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -731,9 +731,12 @@ Common::Path Window::getSharedCastPath() {
Common::Path result;
for (uint i = 0; i < namesToTry.size(); i++) {
- result = findMoviePath(namesToTry[i]);
- if (!result.empty())
+ debugC(2, kDebugPaths, "getSharedCastPath(): trying '%s'", namesToTry[i].c_str());
+ result = findMoviePath(namesToTry[i], true, true, _currentPath);
+ if (!result.empty()) {
+ debugC(2, kDebugPaths, "getSharedCastPath(): found '%s'", result.toString().c_str());
return result;
+ }
}
return result;
Commit: e5f45df7af6c9911ccf5d7f7ad469948f6075eec
https://github.com/scummvm/scummvm/commit/e5f45df7af6c9911ccf5d7f7ad469948f6075eec
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-05-02T21:35:10+02:00
Commit Message:
DIRECTOR: LINGO: Fix b_offset() for high-bit characters
We are using UTF8 everywhere, but d_strstr() is using MacRoman-based
character comparison tables. This was leading to problems with like
\xC5 characters which is used in menus, which was translated to
Ã
character, 2 bytes in UTF-8. Thus, d_strstr() was returning
incorrect position of the found string.
Now we decode the string back to the platform encoding (with hope
that we did not butchered it by this time), and only then performing
the comparison.
Fixes bootstrap in jewels1, where it modified menus (translateMenu
handler), that use \xC5 extensively.
Changed paths:
engines/director/lingo/lingo-builtins.cpp
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 32cf63b7b44..1d6e4eb97d7 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -802,8 +802,8 @@ void LB::b_offset(int nargs) {
b_offsetRect(nargs);
return;
}
- Common::String source = g_lingo->pop().asString();
- Common::String target = g_lingo->pop().asString();
+ Common::String source = Common::U32String(g_lingo->pop().asString()).encode(g_director->getPlatformEncoding());
+ Common::String target = Common::U32String(g_lingo->pop().asString()).encode(g_director->getPlatformEncoding());
const char *str = d_strstr(source.c_str(), target.c_str());
More information about the Scummvm-git-logs
mailing list