[Scummvm-git-logs] scummvm master -> febd0cbb10853166502c82500ade950ff575df97
antoniou79
noreply at scummvm.org
Sat Feb 28 17:13:25 UTC 2026
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
c1a2997436 SHERLOCK: ROSETATTOO: Use common constant for max tooltip line width
921dd9bb84 SHERLOCK: ROSETATTOO: Fixes for fixed text in Spanish and French
8845ec0f31 SHERLOCK: ROSETATTOO: Calculate width of quit dialog from longest line
febd0cbb10 SHERLOCK: Use non-translated index for font glyph y-offset
Commit: c1a2997436c4d1219ecd6ac748cd0fc114a9e9ab
https://github.com/scummvm/scummvm/commit/c1a2997436c4d1219ecd6ac748cd0fc114a9e9ab
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2026-02-28T19:12:55+02:00
Commit Message:
SHERLOCK: ROSETATTOO: Use common constant for max tooltip line width
Changed paths:
engines/sherlock/tattoo/widget_inventory.cpp
engines/sherlock/tattoo/widget_tooltip.cpp
engines/sherlock/tattoo/widget_tooltip.h
diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp
index 04e04106d6e..0a7e2e00ab7 100644
--- a/engines/sherlock/tattoo/widget_inventory.cpp
+++ b/engines/sherlock/tattoo/widget_inventory.cpp
@@ -54,7 +54,7 @@ void WidgetInventoryTooltip::setText(const Common::String &str) {
Common::String line1 = str, line2;
// See if we need to split it into two lines
- if (width > 150) {
+ if (width > kMaxTooltipWidth) {
// Yes, we do
const char *s = str.c_str();
const char *space = nullptr;
diff --git a/engines/sherlock/tattoo/widget_tooltip.cpp b/engines/sherlock/tattoo/widget_tooltip.cpp
index 28cdab9b6b5..0bd70e0e6dd 100644
--- a/engines/sherlock/tattoo/widget_tooltip.cpp
+++ b/engines/sherlock/tattoo/widget_tooltip.cpp
@@ -29,8 +29,6 @@ namespace Sherlock {
namespace Tattoo {
-#define MAX_TOOLTIP_WIDTH 150
-
void WidgetTooltipBase::draw() {
Screen &screen = *_vm->_screen;
@@ -83,8 +81,9 @@ void WidgetTooltip::setText(const Common::String &strIn) {
int height = _surface.stringHeight(str) + 2;
Common::String line1 = str, line2 = "";
+ // TODO This code is similar to WidgetInventoryTooltip::setText(). Maybe they should be merged?
// See if we need to split it into two lines
- if (width > MAX_TOOLTIP_WIDTH) {
+ if (width > kMaxTooltipWidth) {
// Go forward word by word to find out where to split the line
const char *s = str.c_str();
const char *space = nullptr;
diff --git a/engines/sherlock/tattoo/widget_tooltip.h b/engines/sherlock/tattoo/widget_tooltip.h
index 33493b9697a..df402ea9666 100644
--- a/engines/sherlock/tattoo/widget_tooltip.h
+++ b/engines/sherlock/tattoo/widget_tooltip.h
@@ -34,6 +34,8 @@ namespace Tattoo {
class WidgetTooltipBase : public WidgetBase {
public:
+ static const int kMaxTooltipWidth = 150;
+
WidgetTooltipBase(SherlockEngine *vm) : WidgetBase(vm) {}
~WidgetTooltipBase() override {}
Commit: 921dd9bb8423ee063c260817312894794b01dcc2
https://github.com/scummvm/scummvm/commit/921dd9bb8423ee063c260817312894794b01dcc2
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2026-02-28T19:12:57+02:00
Commit Message:
SHERLOCK: ROSETATTOO: Fixes for fixed text in Spanish and French
Fix for part of bug #16238 (wrt the out of order quit dialog text and buttons)
Changed paths:
engines/sherlock/tattoo/tattoo_fixed_text.cpp
diff --git a/engines/sherlock/tattoo/tattoo_fixed_text.cpp b/engines/sherlock/tattoo/tattoo_fixed_text.cpp
index 98e9f15c83b..0d43b144ae4 100644
--- a/engines/sherlock/tattoo/tattoo_fixed_text.cpp
+++ b/engines/sherlock/tattoo/tattoo_fixed_text.cpp
@@ -476,7 +476,7 @@ static const char *const fixedTextFR[] = {
"An", // ???
"Quitter",
"Voulez-vous quitter?",
- "Sind Sie sicher ?", // ???
+ "", // ???
"Oui",
"Non",
"Entrez le mot de passe",
@@ -663,10 +663,10 @@ static const char *const fixedTextES[] = {
"Off", // ???
"On", // ???
"Salir",
- "quieres salir?",
"\250Est\240s seguro de que",
+ "quieres salir?",
"Si",
- "Non",
+ "No",
"Introducir Palabra Clave",
"Vas al Este", // correct password, was translated in Spanish version (???)
"Diario de Watson",
Commit: 8845ec0f3158abe59a9d2ccf40e43519a9ed6216
https://github.com/scummvm/scummvm/commit/8845ec0f3158abe59a9d2ccf40e43519a9ed6216
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2026-02-28T19:12:58+02:00
Commit Message:
SHERLOCK: ROSETATTOO: Calculate width of quit dialog from longest line
Don't assume first line is the longest
This might also help with bug #16238
Changed paths:
engines/sherlock/tattoo/widget_quit.cpp
diff --git a/engines/sherlock/tattoo/widget_quit.cpp b/engines/sherlock/tattoo/widget_quit.cpp
index b8ca8ec6b0d..97253723ef6 100644
--- a/engines/sherlock/tattoo/widget_quit.cpp
+++ b/engines/sherlock/tattoo/widget_quit.cpp
@@ -43,8 +43,10 @@ void WidgetQuit::show() {
const char *NO = FIXED(No);
// Set up the display area
- _bounds = Common::Rect(_surface.stringWidth(FIXED(AreYouSureYou)) + _surface.widestChar() * 2,
- (_surface.fontHeight() + 7) * 4);
+ const int firstLineWidth = _surface.stringWidth(FIXED(AreYouSureYou));
+ const int secondLineWidth = _surface.stringWidth(FIXED(WishToQuit));
+ const int boundsWidth = MAX(firstLineWidth, secondLineWidth) + _surface.widestChar() * 2;
+ _bounds = Common::Rect(boundsWidth, (_surface.fontHeight() + 7) * 4);
_bounds.moveTo(mousePos.x - _bounds.width() / 2, mousePos.y - _bounds.height() / 2);
// Create the surface
@@ -53,8 +55,8 @@ void WidgetQuit::show() {
makeInfoArea();
// Draw the message text
- _surface.writeString(FIXED(AreYouSureYou), Common::Point((_surface.width() - _surface.stringWidth(FIXED(AreYouSureYou))) / 2, 5), INFO_TOP);
- _surface.writeString(FIXED(WishToQuit), Common::Point((_surface.width() - _surface.stringWidth(FIXED(WishToQuit))) / 2,
+ _surface.writeString(FIXED(AreYouSureYou), Common::Point((_surface.width() - firstLineWidth) / 2, 5), INFO_TOP);
+ _surface.writeString(FIXED(WishToQuit), Common::Point((_surface.width() - secondLineWidth) / 2,
_surface.fontHeight() + 9), INFO_TOP);
// Draw the horizontal bars separating the commands and the message
Commit: febd0cbb10853166502c82500ade950ff575df97
https://github.com/scummvm/scummvm/commit/febd0cbb10853166502c82500ade950ff575df97
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2026-02-28T19:12:59+02:00
Commit Message:
SHERLOCK: Use non-translated index for font glyph y-offset
Possible fix for bug #16237
Changed paths:
engines/sherlock/fonts.cpp
diff --git a/engines/sherlock/fonts.cpp b/engines/sherlock/fonts.cpp
index 0d1cc184735..20c22a36194 100644
--- a/engines/sherlock/fonts.cpp
+++ b/engines/sherlock/fonts.cpp
@@ -314,18 +314,18 @@ void Fonts::writeString(BaseSurface *surface, const Common::String &str,
curChar = '?';
}
- curChar = translateChar(curChar);
+ byte translCurChar = translateChar(curChar);
- if (curChar < _charCount) {
- ImageFrame &frame = (*_font)[curChar];
+ if (translCurChar < _charCount) {
+ ImageFrame &frame = (*_font)[translCurChar];
if (overrideColor) {
- surface->SHoverrideBlitFrom(frame, Common::Point(charPos.x, charPos.y + _yOffsets[curChar]), overrideColor);
+ surface->SHoverrideBlitFrom(frame, Common::Point(charPos.x, charPos.y - _yOffsets[curChar]), overrideColor);
} else {
- surface->SHtransBlitFrom(frame, Common::Point(charPos.x, charPos.y + _yOffsets[curChar]));
+ surface->SHtransBlitFrom(frame, Common::Point(charPos.x, charPos.y - _yOffsets[curChar]));
}
charPos.x += frame._frame.w + 1;
} else {
- warning("Invalid character encountered - %d", (int)curChar);
+ warning("Invalid character encountered - %d translated from %d", (int)translCurChar, (int)curChar);
}
}
}
More information about the Scummvm-git-logs
mailing list