[Scummvm-git-logs] scummvm master -> 33b0670a2e6ef7e29248afc185e4d9f29f76b277
eriktorbjorn
noreply at scummvm.org
Wed May 14 16:38:27 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:
33b0670a2e SCUMM: MACGUI: Correctly draw the TM glyph in the Last Crusade inventory
Commit: 33b0670a2e6ef7e29248afc185e4d9f29f76b277
https://github.com/scummvm/scummvm/commit/33b0670a2e6ef7e29248afc185e4d9f29f76b277
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2025-05-14T18:35:10+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 9647167d3d6..1de3d2166b4 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