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

sluicebox noreply at scummvm.org
Fri Dec 5 03:52:04 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:
dd3b51e65b AGI: Update function signature in RTL code


Commit: dd3b51e65b7115f2d9fbe7ac32d71d8e2e5f0748
    https://github.com/scummvm/scummvm/commit/dd3b51e65b7115f2d9fbe7ac32d71d8e2e5f0748
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2025-12-04T19:49:52-08:00

Commit Message:
AGI: Update function signature in RTL code

Changed paths:
    engines/agi/text.cpp
    engines/agi/text.h


diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 33ea9f9be2a..cc02816bce7 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -253,7 +253,7 @@ void TextMgr::display(int16 textNr, int16 textRow, int16 textColumn) {
 
 		if (_vm->isLanguageRTL()) {
 			// handles setting cursor position and processing string for proper RTL alignment
-			processedTextPtr = displayAdjustRTL(textRow, textColumn, processedTextPtr, calculatedWidth);
+			displayAdjustRTL(textRow, textColumn, processedTextPtr, calculatedWidth);
 		} 
 
 #ifdef USE_TTS
@@ -286,7 +286,7 @@ void TextMgr::display(int16 textNr, int16 textRow, int16 textColumn) {
 	charPos_Pop();
 }
 
-char *TextMgr::displayAdjustRTL(int16 textRow, int16 textColumn, char *text, int16 calculatedWidth) {
+void TextMgr::displayAdjustRTL(int16 textRow, int16 textColumn, char *text, int16 calculatedWidth) {
 	if (strchr(text, '\n') != nullptr) {
 		// For multi-line strings, we rely on rightAlign() in displayText() 
 		// to pad each line to get proper right-alignment appearance.
@@ -304,7 +304,7 @@ char *TextMgr::displayAdjustRTL(int16 textRow, int16 textColumn, char *text, int
 		// is autogenerated by word-wrapping because that happens before the
 		// indent is set. In that case, use a manual line break in your
 		// message to ensure you don't have more text than your indent
-		// position can accomodate
+		// position can accommodate
 		Common::String padded;
 		for (int16 i = 0; i < textColumn; i++)
 			padded += ' ';
@@ -315,7 +315,6 @@ char *TextMgr::displayAdjustRTL(int16 textRow, int16 textColumn, char *text, int
 		textColumn = MAX<int16>(0, 40 - textColumn - calculatedWidth);
 		charPos_Set(textRow, textColumn);
 	}
-	return text;
 }
 
 void TextMgr::displayTextInsideWindow(const char *textPtr, int16 windowRow, int16 windowColumn) {
diff --git a/engines/agi/text.h b/engines/agi/text.h
index ef0f4001256..54d61530ed3 100644
--- a/engines/agi/text.h
+++ b/engines/agi/text.h
@@ -120,7 +120,7 @@ public:
 	byte calculateTextBackground(byte background);
 
 	void display(int16 textNr, int16 textRow, int16 textColumn);
-	char *displayAdjustRTL(int16 textRow, int16 textColumn, char *text, int16 calculatedWidth);
+	void displayAdjustRTL(int16 textRow, int16 textColumn, char *text, int16 calculatedWidth);
 	void displayText(const char *textPtr, bool disabledLook = false);
 	void displayCharacter(byte character, bool disabledLook = false);
 




More information about the Scummvm-git-logs mailing list