[Scummvm-git-logs] scummvm branch-2-9 -> 9620211894cc7e3f96698f2cb80c610c57034bec

eriktorbjorn noreply at scummvm.org
Thu May 15 05:54:49 UTC 2025


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

Summary:
9620211894 SCUMM: MACGUI: Correctly draw the TM glyph in the Last Crusade inventory


Commit: 9620211894cc7e3f96698f2cb80c610c57034bec
    https://github.com/scummvm/scummvm/commit/9620211894cc7e3f96698f2cb80c610c57034bec
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2025-05-15T07:54:40+02:00

Commit Message:
SCUMM: MACGUI: Correctly draw the TM glyph in the Last Crusade inventory

The eagle-eyed ATMcashpoint noticed that the "IndyWear by Lucasfilm" was
missing its TM glyph. This is because the SCUMM character set and the
Mac OS Roman character set are not the same. In fact, the TM glyph is two
characters because in the VGA DOS version it's at least nine pixels wide.

I don't think the other discrepancies need to be handled. Unless there
is a localized version that I'm not aware of?

Changed paths:
    engines/scumm/macgui/macgui_indy3.cpp


diff --git a/engines/scumm/macgui/macgui_indy3.cpp b/engines/scumm/macgui/macgui_indy3.cpp
index 7a42cee5d84..607139d9186 100644
--- a/engines/scumm/macgui/macgui_indy3.cpp
+++ b/engines/scumm/macgui/macgui_indy3.cpp
@@ -107,9 +107,20 @@ void MacIndy3Gui::Widget::markScreenAsDirty(Common::Rect r) const {
 }
 
 byte MacIndy3Gui::Widget::translateChar(byte c) const {
-	if (c == '^')
+	// Remap SCUMM-specific characters to Mac OS Roman. I have verified
+	// that these are actually used. If we find others, or if there are
+	// fan translations, that can be dealt with later.
+
+	switch (c) {
+	case 0x10: // Left half of TM glyph
+		return 0xAA;
+	case 0x11: // Right half of TM glyph. Don't draw at all.
+		return 0x00;
+	case 0x5E: // ...
 		return 0xC9;
-	return c;
+	default:
+		return c;
+	}
 }
 
 void MacIndy3Gui::Widget::fill(Common::Rect r) {
@@ -325,12 +336,15 @@ void MacIndy3Gui::Button::draw() {
 
 		for (uint i = 0; i < _text.size() && x < _bounds.right; i++) {
 			byte c = translateChar(_text[i]);
-			if (x >= _bounds.left) {
-				if (_enabled)
-					outlineFont->drawChar(_surface, c, x, y, kBlack);
-				boldFont->drawChar(_surface, c, x + 1, y, color);
+
+			if (c) {
+				if (x >= _bounds.left) {
+					if (_enabled)
+						outlineFont->drawChar(_surface, c, x, y, kBlack);
+					boldFont->drawChar(_surface, c, x + 1, y, color);
+				}
+				x += boldFont->getCharWidth(c);
 			}
-			x += boldFont->getCharWidth(c);
 		}
 	}
 }
@@ -679,8 +693,10 @@ void MacIndy3Gui::Inventory::Slot::draw() {
 		for (uint i = 0; i < _name.size() && x < _bounds.right; i++) {
 			byte c = translateChar(_name[i]);
 
-			font->drawChar(_surface, c, x, y, fg);
-			x += font->getCharWidth(c);
+			if (c) {
+				font->drawChar(_surface, c, x, y, fg);
+				x += font->getCharWidth(c);
+			}
 		}
 	}
 }




More information about the Scummvm-git-logs mailing list