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

sev- noreply at scummvm.org
Sat May 25 22:51:10 UTC 2024


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:
dc52513ed3 DIRECTOR: Keep formatting for empty STXT resources


Commit: dc52513ed3141480931c89cee4d3386dd50f62ae
    https://github.com/scummvm/scummvm/commit/dc52513ed3141480931c89cee4d3386dd50f62ae
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-05-26T00:50:57+02:00

Commit Message:
DIRECTOR: Keep formatting for empty STXT resources

This effectively reverts 77582aa8233b3037dec2ef71e6220205a31fbcda
and fixes mcluhan-win that is checking fonts for presence in this manner
in its startup movie:

  if the textFont of field 4 < "McLuhan13" then
    alert("The provided McLuhan fonts are not installed.  Please reinstall Understanding McLuhan.")
    quit()
  end if

Changed paths:
    engines/director/stxt.cpp


diff --git a/engines/director/stxt.cpp b/engines/director/stxt.cpp
index ec01b3ef1d4..bdf57c9f005 100644
--- a/engines/director/stxt.cpp
+++ b/engines/director/stxt.cpp
@@ -68,8 +68,6 @@ Stxt::Stxt(Cast *cast, Common::SeekableReadStreamEndian &textStream) : _cast(cas
 
 	debugC(3, kDebugText, "Stxt init: formattingCount: %u", formattingCount);
 
-	uint16 totalFormatting = formattingCount;
-
 	Common::U32String logText;
 
 	while (formattingCount) {
@@ -96,14 +94,6 @@ Stxt::Stxt(Cast *cast, Common::SeekableReadStreamEndian &textStream) : _cast(cas
 		_ftext += u32TextPart;
 		logText += Common::toPrintable(u32TextPart);
 
-		// Reset formatting if the text is completely empty
-		if (totalFormatting == 1 && textPart.empty()) {
-			_style.fontId = 0;
-			_style.textSlant = 0;
-			_style.fontSize = 12;
-			debugC(4, kDebugText, "Stxt init: the font formatting was reset due to empty string");
-		}
-
 		Common::String format = Common::String::format("\001\016%04x%02x%04x%04x%04x%04x", _style.fontId, _style.textSlant, _style.fontSize, _style.r, _style.g, _style.b);
 		_ftext += format;
 		logText += Common::toPrintable(format);




More information about the Scummvm-git-logs mailing list