[Scummvm-git-logs] scummvm master -> 841070fd8b782a176f09f6ae9ccff6ac3f869728

sev- noreply at scummvm.org
Fri Feb 6 22:41:18 UTC 2026


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:
841070fd8b PRINCE: Do not show subtiles if they are disabled from GUI


Commit: 841070fd8b782a176f09f6ae9ccff6ac3f869728
    https://github.com/scummvm/scummvm/commit/841070fd8b782a176f09f6ae9ccff6ac3f869728
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2026-02-06T23:41:13+01:00

Commit Message:
PRINCE: Do not show subtiles if they are disabled from GUI

Changed paths:
    engines/prince/prince.cpp


diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index 48147f67e1a..078393180a4 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -786,45 +786,47 @@ void PrinceEngine::showTexts(Graphics::Surface *screen) {
 			continue;
 		}
 
-		int x = text._x;
-		int y = text._y;
+		if (ConfMan.getBool("subtitles")) {
+			int x = text._x;
+			int y = text._y;
 
-		if (!_showInventoryFlag) {
-			x -= _picWindowX;
-			y -= _picWindowY;
-		}
+			if (!_showInventoryFlag) {
+				x -= _picWindowX;
+				y -= _picWindowY;
+			}
 
-		Common::Array<Common::String> lines;
-		_font->wordWrapText(text._str, _graph->_frontScreen->w, lines);
+			Common::Array<Common::String> lines;
+			_font->wordWrapText(text._str, _graph->_frontScreen->w, lines);
 
-		int wideLine = 0;
-		for (uint i = 0; i < lines.size(); i++) {
-			int textLen = getTextWidth(lines[i].c_str());
-			if (textLen > wideLine) {
-				wideLine = textLen;
+			int wideLine = 0;
+			for (uint i = 0; i < lines.size(); i++) {
+				int textLen = getTextWidth(lines[i].c_str());
+				if (textLen > wideLine) {
+					wideLine = textLen;
+				}
 			}
-		}
-
-		int leftBorderText = 6;
-		if (x + wideLine / 2 >  kNormalWidth - leftBorderText) {
-			x = kNormalWidth - leftBorderText - wideLine / 2;
-		}
 
-		if (x - wideLine / 2 < leftBorderText) {
-			x = leftBorderText + wideLine / 2;
-		}
+			int leftBorderText = 6;
+			if (x + wideLine / 2 >  kNormalWidth - leftBorderText) {
+				x = kNormalWidth - leftBorderText - wideLine / 2;
+			}
 
-		int textSkip = 2;
-		for (uint i = 0; i < lines.size(); i++) {
-			int drawX = x - getTextWidth(lines[i].c_str()) / 2;
-			int drawY = y - 10 - (lines.size() - i) * (_font->getFontHeight() - textSkip);
-			if (drawX < 0) {
-				drawX = 0;
+			if (x - wideLine / 2 < leftBorderText) {
+				x = leftBorderText + wideLine / 2;
 			}
-			if (drawY < 0) {
-				drawY = 0;
+
+			int textSkip = 2;
+			for (uint i = 0; i < lines.size(); i++) {
+				int drawX = x - getTextWidth(lines[i].c_str()) / 2;
+				int drawY = y - 10 - (lines.size() - i) * (_font->getFontHeight() - textSkip);
+				if (drawX < 0) {
+					drawX = 0;
+				}
+				if (drawY < 0) {
+					drawY = 0;
+				}
+				_font->drawString(screen, lines[i], drawX, drawY, screen->w, text._color);
 			}
-			_font->drawString(screen, lines[i], drawX, drawY, screen->w, text._color);
 		}
 
 		text._time--;




More information about the Scummvm-git-logs mailing list