[Scummvm-git-logs] scummvm master -> 980e927e572ded0b6f87931f06f3c90132f4102f

sev- noreply at scummvm.org
Fri Feb 10 20:00:12 UTC 2023


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

Summary:
4cc5b9e4d8 DIRECTOR: Added more debug ouput to quirks
0e38160996 DIRECTOR: LINGO: Implementing setting 'the searchPath' entity
9a353d71b6 DIRECTOR: Fixed quirk for mcluhan-win
8db30fce73 DIRECTOR: Convert path before making it relative.
6440de5ee4 DIRECTOR: Added indentation to the pathMakeRelative() debug output
5c3586bd67 DIRECTOR: Fix makePathRelative() with directories
e663f0d3ba DIRECTOR: Remove now unneeded quirk for mcluhan-win
980e927e57 GRAPHICS: MACGUI: Warn about incorrect winfont sizes used as a substitute


Commit: 4cc5b9e4d8e32c2b1e9c7938bb30d3a432587fc8
    https://github.com/scummvm/scummvm/commit/4cc5b9e4d8e32c2b1e9c7938bb30d3a432587fc8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-10T20:59:14+01:00

Commit Message:
DIRECTOR: Added more debug ouput to quirks

Changed paths:
    engines/director/game-quirks.cpp


diff --git a/engines/director/game-quirks.cpp b/engines/director/game-quirks.cpp
index f034798c8cc..07fa7b1148b 100644
--- a/engines/director/game-quirks.cpp
+++ b/engines/director/game-quirks.cpp
@@ -126,6 +126,8 @@ void DirectorEngine::gameQuirks(const char *target, Common::Platform platform) {
 	for (auto q = quirks; q->target != nullptr; q++) {
 		if (q->platform == Common::kPlatformUnknown || q->platform == platform)
 			if (!strcmp(q->target, target)) {
+				debugC(1, kDebugLoading, "Applying quirk for the target %s", target);
+
 				q->quirk();
 				break;
 			}
@@ -139,6 +141,8 @@ void DirectorEngine::gameQuirks(const char *target, Common::Platform platform) {
 				if (size == -1)
 					size = strlen((const char *)f->data);
 				list.push_back(CachedArchive::InputEntry(f->fileName, f->data, size));
+
+				debugC(1, kDebugLoading, "Added file '%s' of size %d to the file cache", f->fileName, size);
 			}
 	}
 


Commit: 0e381609966a186900033b107ebb8844f765491a
    https://github.com/scummvm/scummvm/commit/0e381609966a186900033b107ebb8844f765491a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-10T20:59:14+01:00

Commit Message:
DIRECTOR: LINGO: Implementing setting 'the searchPath' entity

Used in the first movie script of mcluhan

Changed paths:
    engines/director/lingo/lingo-the.cpp


diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index c55f553a6fc..470ea0030f3 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -1086,6 +1086,9 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
 	case kTheSearchCurrentFolder:
 		warning("BUILDBOT: Trying to set SearchCurrentFolder lingo property");
 		break;
+	case kTheSearchPath:
+		g_lingo->_searchPath = d;
+		break;
 	case kTheSelEnd:
 		movie->_selEnd = d.asInt();
 		if (movie->_currentEditableTextChannel != 0) {


Commit: 9a353d71b66a41e897b0edec1455008913d72f79
    https://github.com/scummvm/scummvm/commit/9a353d71b66a41e897b0edec1455008913d72f79
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-10T20:59:14+01:00

Commit Message:
DIRECTOR: Fixed quirk for mcluhan-win

Changed paths:
    engines/director/game-quirks.cpp


diff --git a/engines/director/game-quirks.cpp b/engines/director/game-quirks.cpp
index 07fa7b1148b..c44a2ba3126 100644
--- a/engines/director/game-quirks.cpp
+++ b/engines/director/game-quirks.cpp
@@ -91,7 +91,7 @@ static void quirkLzone() {
 
 static void quirkMcLuhan() {
 	// TODO. Read fonts from MCLUHAN/SYSTEM directory
-	g_director->_extraSearchPath.push_back("mcluhan");
+	g_director->_extraSearchPath.push_back("mcluhan\\");
 	Graphics::MacFontManager *fontMan = g_director->_wm->_fontMan;
 	fontMan->loadWindowsFont("MCLUHAN/SYSTEM/MCBOLD13.FON");
 	fontMan->loadWindowsFont("MCLUHAN/SYSTEM/MCLURG__.FON");


Commit: 8db30fce734ef5511eae83438288cc229206e83d
    https://github.com/scummvm/scummvm/commit/8db30fce734ef5511eae83438288cc229206e83d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-10T20:59:14+01:00

Commit Message:
DIRECTOR: Convert path before making it relative.

That will make sure that Windows disk references will be cleaned up.

Used in mcluhan-win startup where it calls getNthFileNameInFolder("C:\prefs\Notes", 1)

Changed paths:
    engines/director/util.cpp


diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 0305aeed484..48c511a6c7a 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -339,6 +339,9 @@ Common::String convertPath(Common::String &path) {
 	if (path.empty())
 		return path;
 
+
+	debug(9, "convertPath(%s)", path.c_str());
+
 	if (!path.contains(':') && !path.contains('\\') && !path.contains('@')) {
 		return path;
 	}
@@ -467,6 +470,10 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext
 	//Wrap pathMakeRelative to search in extra paths defined by the game
 	Common::String foundPath;
 
+	debug(8, "pathMakeRelative(\"%s\", recursive: %d, addexts: %d, directory: %d):", path.c_str(), recursive, addexts, directory);
+	path = convertPath(path);
+	debug(9, "pathMakeRelative(): converted -> %s", path.c_str());
+
 	Datum searchPath = g_director->getLingo()->_searchPath;
 	if (searchPath.type == ARRAY && searchPath.u.farr->arr.size() > 0) {
 		for (uint i = 0; i < searchPath.u.farr->arr.size(); i++) {


Commit: 6440de5ee472e5433d4a9e737374cc7415d69cf1
    https://github.com/scummvm/scummvm/commit/6440de5ee472e5433d4a9e737374cc7415d69cf1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-10T20:59:15+01:00

Commit Message:
DIRECTOR: Added indentation to the pathMakeRelative() debug output

Changed paths:
    engines/director/util.cpp


diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 48c511a6c7a..cb239622b04 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -335,11 +335,34 @@ Common::String CastMemberID::asString() const {
 	return res;
 }
 
+int recLevel = 0;
+const char *tabs[] = {	"",
+						"  ",
+						"    ",
+						"      ",
+						"        ",
+						"          ",
+						"            ",
+						"              ",
+						"                ",
+						"                  ",
+						"                    ",
+};
+
+const char *recIndent() {
+	if (recLevel >= ARRAYSIZE(tabs)) {
+		warning("recIndent() too deep: %d", recLevel);
+		return tabs[0];
+	}
+
+	return tabs[recLevel];
+}
+
 Common::String convertPath(Common::String &path) {
 	if (path.empty())
 		return path;
 
-
+	debugN(9, "%s", recIndent());
 	debug(9, "convertPath(%s)", path.c_str());
 
 	if (!path.contains(':') && !path.contains('\\') && !path.contains('@')) {
@@ -409,6 +432,7 @@ bool testPath(Common::String &path, bool directory) {
 	     Common::MacResManager::exists(Common::Path(path, g_director->_dirSeparator))))
 		return true;
 
+	debugN(9, "%s", recIndent());
 	debug(9, "testPath: %s  dir: %d", path.c_str(), directory);
 
 	// check for the game data dir
@@ -455,10 +479,12 @@ bool testPath(Common::String &path, bool directory) {
 			}
 		}
 		if (!exists) {
+			debugN(9, "%s", recIndent());
 			debug(9, "testPath: Not exists");
 			return false;
 		}
 	}
+	debugN(9, "%s", recIndent());
 	debug(9, "testPath: ***** HAVE MATCH");
 	// write back path with correct case
 	path = newPath;
@@ -470,31 +496,45 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext
 	//Wrap pathMakeRelative to search in extra paths defined by the game
 	Common::String foundPath;
 
+	recLevel = 0;
+
+	debugN(8, "%s", recIndent());
 	debug(8, "pathMakeRelative(\"%s\", recursive: %d, addexts: %d, directory: %d):", path.c_str(), recursive, addexts, directory);
 	path = convertPath(path);
+	debugN(9, "%s", recIndent());
 	debug(9, "pathMakeRelative(): converted -> %s", path.c_str());
 
 	Datum searchPath = g_director->getLingo()->_searchPath;
 	if (searchPath.type == ARRAY && searchPath.u.farr->arr.size() > 0) {
 		for (uint i = 0; i < searchPath.u.farr->arr.size(); i++) {
 			Common::String searchIn = searchPath.u.farr->arr[i].asString();
+			debugN(9, "%s", recIndent());
 			debug(9, "pathMakeRelative(): searchPath: %s", searchIn.c_str());
 
+			recLevel++;
 			foundPath = wrappedPathMakeRelative(searchIn + path, recursive, addexts, directory);
+			recLevel--;
+
 			if (testPath(foundPath))
 				return foundPath;
 
+			debugN(9, "%s", recIndent());
 			debug(9, "pathMakeRelative(): -- searchPath not found: %s", foundPath.c_str());
 		}
 	}
 
 	for (auto i = g_director->_extraSearchPath.begin(); i != g_director->_extraSearchPath.end(); ++i) {
+		debugN(9, "%s", recIndent());
 		debug(9, "pathMakeRelative(): extraSearchPath: %s", i->c_str());
 
+		recLevel++;
 		foundPath = wrappedPathMakeRelative(*i + path, recursive, addexts, directory);
+		recLevel--;
+
 		if (testPath(foundPath))
 			return foundPath;
 
+		debugN(9, "%s", recIndent());
 		debug(9, "pathMakeRelative(): -- extraSearchPath not found: %s", foundPath.c_str());
 	}
 
@@ -509,21 +549,25 @@ Common::String wrappedPathMakeRelative(Common::String path, bool recursive, bool
 
 	Common::String initialPath(path);
 
+	debugN(9, "%s", recIndent());
 	debug(9, "wrappedPathMakeRelative(): s0 %s -> %s", path.c_str(), initialPath.c_str());
 
 	if (recursive) // first level
 		initialPath = convertPath(initialPath);
 
+	debugN(9, "%s", recIndent());
 	debug(9, "wrappedPathMakeRelative(): s1 %s -> %s", path.c_str(), initialPath.c_str());
 
 	initialPath = Common::normalizePath(g_director->getCurrentPath() + initialPath, g_director->_dirSeparator);
 	Common::String convPath = initialPath;
 
+	debugN(9, "%s", recIndent());
 	debug(9, "wrappedPathMakeRelative(): s2 %s", convPath.c_str());
 
 	if (testPath(initialPath, directory))
 		return initialPath;
 
+	debugN(9, "%s", recIndent());
 	debug(9, "wrappedPathMakeRelative(): s2.1 -- not found %s", initialPath.c_str());
 
 	// Now try to search the file
@@ -533,15 +577,18 @@ Common::String wrappedPathMakeRelative(Common::String path, bool recursive, bool
 		int pos = convPath.find(g_director->_dirSeparator);
 		convPath = Common::String(&convPath.c_str()[pos + 1]);
 
+		debugN(9, "%s", recIndent());
 		debug(9, "wrappedPathMakeRelative(): s3 try %s", convPath.c_str());
 
 		if (!testPath(convPath, directory)) {
 			// If we were supplied a path 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);
+			debugN(9, "%s", recIndent());
 			debug(9, "wrappedPathMakeRelative(): s3.1 try %s", locPath.c_str());
 
 			if (!testPath(locPath, directory)) {
+				debugN(9, "%s", recIndent());
 				debug(9, "wrappedPathMakeRelative(): s3.1 -- not found %s", locPath.c_str());
 				continue;
 			}
@@ -558,11 +605,13 @@ Common::String wrappedPathMakeRelative(Common::String path, bool recursive, bool
 		// Try stripping all of the characters not allowed in FAT
 		convPath = stripMacPath(initialPath.c_str());
 
+		debugN(9, "%s", recIndent());
 		debug(9, "wrappedPathMakeRelative(): s4 %s", convPath.c_str());
 
 		if (testPath(initialPath, directory))
 			return initialPath;
 
+		debugN(9, "%s", recIndent());
 		debug(9, "wrappedPathMakeRelative(): s4.1 -- not found %s", initialPath.c_str());
 
 		// Now try to search the file
@@ -570,13 +619,16 @@ Common::String wrappedPathMakeRelative(Common::String path, bool recursive, bool
 			int pos = convPath.find(g_director->_dirSeparator);
 			convPath = Common::String(&convPath.c_str()[pos + 1]);
 
+			debugN(9, "%s", recIndent());
 			debug(9, "wrappedPathMakeRelative(): s5 try %s", convPath.c_str());
 
 			if (!testPath(convPath, directory)) {
+				debugN(9, "%s", recIndent());
 				debug(9, "wrappedPathMakeRelative(): s5 -- not found %s", convPath.c_str());
 				continue;
 			}
 
+			debugN(9, "%s", recIndent());
 			debug(9, "wrappedPathMakeRelative(): s5 converted %s -> %s", path.c_str(), convPath.c_str());
 
 			opened = true;
@@ -617,12 +669,17 @@ Common::String wrappedPathMakeRelative(Common::String path, bool recursive, bool
 				Common::String ext = component.substr(component.size() - 4);
 				Common::String newpath = convPath + convertMacFilename(nameWithoutExt.c_str()) + ext;
 
+				debugN(9, "%s", recIndent());
 				debug(9, "wrappedPathMakeRelative(): s6 %s -> try %s", initialPath.c_str(), newpath.c_str());
+
+				recLevel++;
 				Common::String res = wrappedPathMakeRelative(newpath, false, false);
+				recLevel--;
 
 				if (testPath(res))
 					return res;
 
+				debugN(9, "%s", recIndent());
 				debug(9, "wrappedPathMakeRelative(): s6 -- not found %s", res.c_str());
 			}
 		}
@@ -659,6 +716,7 @@ Common::String testExtensions(Common::String component, Common::String initialPa
 	for (int i = 0; exts[i]; ++i) {
 		Common::String newpath = convPath + component.c_str() + exts[i];
 
+		debugN(9, "%s", recIndent());
 		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);
 
@@ -668,6 +726,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];
 
+		debugN(9, "%s", recIndent());
 		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);
 


Commit: 5c3586bd6783d2c4464267c5cbdf6fe7d3e736a0
    https://github.com/scummvm/scummvm/commit/5c3586bd6783d2c4464267c5cbdf6fe7d3e736a0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-10T20:59:15+01:00

Commit Message:
DIRECTOR: Fix makePathRelative() with directories

Changed paths:
    engines/director/util.cpp


diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index cb239622b04..b22947156d9 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -515,7 +515,7 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext
 			foundPath = wrappedPathMakeRelative(searchIn + path, recursive, addexts, directory);
 			recLevel--;
 
-			if (testPath(foundPath))
+			if (testPath(foundPath, directory))
 				return foundPath;
 
 			debugN(9, "%s", recIndent());
@@ -531,7 +531,7 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext
 		foundPath = wrappedPathMakeRelative(*i + path, recursive, addexts, directory);
 		recLevel--;
 
-		if (testPath(foundPath))
+		if (testPath(foundPath, directory))
 			return foundPath;
 
 		debugN(9, "%s", recIndent());


Commit: e663f0d3ba36468ace2dab9a6d31fcd583f8e922
    https://github.com/scummvm/scummvm/commit/e663f0d3ba36468ace2dab9a6d31fcd583f8e922
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-10T20:59:15+01:00

Commit Message:
DIRECTOR: Remove now unneeded quirk for mcluhan-win

Changed paths:
    engines/director/game-quirks.cpp


diff --git a/engines/director/game-quirks.cpp b/engines/director/game-quirks.cpp
index c44a2ba3126..812909f18c0 100644
--- a/engines/director/game-quirks.cpp
+++ b/engines/director/game-quirks.cpp
@@ -71,10 +71,6 @@ struct CachedFile {
 		"WOLFGANG.dat",	// It needs an empty file
 			(const byte *)"", 0
 	},
-	{ "mcluhan", Common::kPlatformWindows,
-		"prefs/Markers/List.Txt",	// It needs an empty file
-			(const byte *)"", 0
-	},
 	{ nullptr, Common::kPlatformUnknown, nullptr, nullptr, 0 }
 };
 


Commit: 980e927e572ded0b6f87931f06f3c90132f4102f
    https://github.com/scummvm/scummvm/commit/980e927e572ded0b6f87931f06f3c90132f4102f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-10T20:59:30+01:00

Commit Message:
GRAPHICS: MACGUI: Warn about incorrect winfont sizes used as a substitute

Used by mcluhan-win that has 3 fonts bundled with it.

Changed paths:
    graphics/macgui/macfontmanager.cpp


diff --git a/graphics/macgui/macfontmanager.cpp b/graphics/macgui/macfontmanager.cpp
index 4b444d87c9c..1892720eef0 100644
--- a/graphics/macgui/macfontmanager.cpp
+++ b/graphics/macgui/macfontmanager.cpp
@@ -451,12 +451,16 @@ void MacFontManager::loadWindowsFont(const Common::String fileName) {
 	font->setName(fullName);
 	font->setFont(winFont, false);
 	_fontRegistry.setVal(font->getName(), font);
+
+	debug(2, "MacFontManager::loadWindowsFont(): Loaded font %s", fullName.c_str());
 }
 
 const Font *MacFontManager::getFont(MacFont *macFont) {
 	Common::String name;
 	const Font *font = 0;
 
+	debug(3, "getFont(%s), id: %d", getFontName(macFont->getId(), macFont->getSize(), macFont->getSlant(), 0).c_str(), macFont->getId());
+
 	int aliasForId = getFontAliasForId(macFont->getId());
 	if (aliasForId > -1) {
 		macFont->setId(aliasForId);
@@ -516,6 +520,10 @@ const Font *MacFontManager::getFont(MacFont *macFont) {
 
 		if (_fontInfo.contains(id) && _winFontRegistry.contains(_fontInfo.getVal(id)->name)) {
 			font = _winFontRegistry.getVal(_fontInfo.getVal(id)->name);
+			const Graphics::WinFont *winfont = (const Graphics::WinFont *)font;
+
+			if (winfont->getFontHeight() != macFont->getSize())
+				warning("MacFontManager::getFont(): For font '%s' windows font '%s' is used of a different size %d", macFont->getName().c_str(), winfont->getName().c_str(), winfont->getFontHeight());
 		}
 	}
 




More information about the Scummvm-git-logs mailing list