[Scummvm-git-logs] scummvm master -> e39b9118950e40e33a8f5069e1419c8242efa9b4

athrxx athrxx at scummvm.org
Sat Aug 14 13:24:52 UTC 2021


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

Summary:
e39b911895 SCUMM: (COMI/CJK) - fix 1-byte-character display in Smush movies


Commit: e39b9118950e40e33a8f5069e1419c8242efa9b4
    https://github.com/scummvm/scummvm/commit/e39b9118950e40e33a8f5069e1419c8242efa9b4
Author: athrxx (athrxx at scummvm.org)
Date: 2021-08-14T15:24:29+02:00

Commit Message:
SCUMM: (COMI/CJK) - fix 1-byte-character display in Smush movies

(bug #11947 - "SMUSH text rendering differences with Korean COMI")

Turns out that the interpreter has another hack that I missed...

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


diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 5d9a1a892f..12c50f13e5 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -539,8 +539,10 @@ void SmushPlayer::handleTextResource(uint32 subType, int32 subSize, Common::Seek
 	if ((!ConfMan.getBool("subtitles")) && ((flags & 8) == 8))
 		return;
 
-	SmushFont *sf = getFont(0);
+	bool isCJKComi = (_vm->_game.id == GID_CMI && _vm->_useCJKMode);
 	int color = 15;
+	int fontId = isCJKComi ? 1 : 0;
+
 	while (*str == '/') {
 		str++; // For Full Throttle text resources
 	}
@@ -563,9 +565,8 @@ void SmushPlayer::handleTextResource(uint32 subType, int32 subSize, Common::Seek
 		switch (str[1]) {
 		case 'f':
 		{
-			int id = str[3] - '0';
+			fontId = str[3] - '0';
 			str += 4;
-			sf = getFont(id);
 		}
 		break;
 		case 'c':
@@ -579,6 +580,15 @@ void SmushPlayer::handleTextResource(uint32 subType, int32 subSize, Common::Seek
 		}
 	}
 
+	// This is a hack from the original COMI CJK interpreter. Its purpuse is avoiding
+	// ugly combinations of CJK and standard NUT font characters (see bug #11947).
+	if (isCJKComi && !(fontId == 0 && color == 1)) {
+		fontId = 1;
+		color = 255;
+	}
+
+	SmushFont *sf = getFont(fontId);
+
 	// HACK. This is to prevent bug #2220. In updated Win95 dig
 	// there is such line:
 	//




More information about the Scummvm-git-logs mailing list