[Scummvm-git-logs] scummvm master -> 7f738abe4f07211057e7670b58db9600ee69a26a

sev- sev at scummvm.org
Mon Aug 31 22:31:45 UTC 2020


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

Summary:
c245a81a24 SCUMM: Improved detection for Chinese DIG
7f738abe4f SCUMM: Treat 0x21 as breaking space in Chinese in SMUSH movies. Fixes #7126


Commit: c245a81a242205f0630da1a63d7c39a76b2c1e36
    https://github.com/scummvm/scummvm/commit/c245a81a242205f0630da1a63d7c39a76b2c1e36
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-09-01T00:08:33+02:00

Commit Message:
SCUMM: Improved detection for Chinese DIG

Changed paths:
    engines/scumm/detection.cpp


diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 926827b84b..b839a1c815 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -443,6 +443,15 @@ static Common::Language detectLanguage(const Common::FSList &fslist, byte id) {
 			&& searchFSNode(tmpList, filename, langFile)) {
 			tmp.open(langFile);
 		}
+		// The Chinese version of Dig has the LANGUAGE.BND in the VIDEO sub dir.
+		if (!tmp.isOpen()
+			&& id == GID_DIG
+			&& searchFSNode(fslist, "VIDEO", resDir)
+			&& resDir.isDirectory()
+			&& resDir.getChildren(tmpList, Common::FSNode::kListFilesOnly)
+			&& searchFSNode(tmpList, filename, langFile)) {
+			tmp.open(langFile);
+		}
 	}
 	if (tmp.isOpen()) {
 		uint size = tmp.size();


Commit: 7f738abe4f07211057e7670b58db9600ee69a26a
    https://github.com/scummvm/scummvm/commit/7f738abe4f07211057e7670b58db9600ee69a26a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-09-01T00:30:54+02:00

Commit Message:
SCUMM: Treat 0x21 as breaking space in Chinese in SMUSH movies. Fixes #7126

Changed paths:
    engines/scumm/smush/smush_font.cpp


diff --git a/engines/scumm/smush/smush_font.cpp b/engines/scumm/smush/smush_font.cpp
index 93945d9e2f..46a2722715 100644
--- a/engines/scumm/smush/smush_font.cpp
+++ b/engines/scumm/smush/smush_font.cpp
@@ -215,7 +215,14 @@ void SmushFont::drawString(const char *str, byte *buffer, int dst_width, int dst
 
 	while (str) {
 		char line[256];
-		const char *pos = strchr(str, '\n');
+		char separators[] = "\n ";
+
+		if (_vm->_language == Common::ZH_TWN)
+			separators[1] = '!';
+		else
+			separators[1] = '\0';
+
+		const char *pos = strpbrk(str, separators);
 		if (pos) {
 			memcpy(line, str, pos - str - 1);
 			line[pos - str - 1] = 0;
@@ -236,12 +243,18 @@ void SmushFont::drawStringWrap(const char *str, byte *buffer, int dst_width, int
 	Common::String s(str);
 	char *words[MAX_WORDS];
 	int word_count = 0;
+	char separators[] = " \t\r\n ";
+
+	if (_vm->_language == Common::ZH_TWN)
+		separators[4] = '!';
+	else
+		separators[4] = '\0';
 
 	Common::String::iterator tmp = s.begin();
 	while (tmp) {
 		assert(word_count < MAX_WORDS);
 		words[word_count++] = tmp;
-		tmp = strpbrk(tmp, " \t\r\n");
+		tmp = strpbrk(tmp, separators);
 		if (tmp == 0)
 			break;
 		*tmp++ = 0;




More information about the Scummvm-git-logs mailing list