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

sev- sev at scummvm.org
Sat Feb 4 17:52:43 CET 2017


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

Summary:
a8c9e47d66 DIRECTOR: Removed text cast width hack. It is incorrect.


Commit: a8c9e47d66603275af4c5b5d1b5de85d6cbe7ee9
    https://github.com/scummvm/scummvm/commit/a8c9e47d66603275af4c5b5d1b5de85d6cbe7ee9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-02-04T17:52:22+01:00

Commit Message:
DIRECTOR: Removed text cast width hack. It is incorrect.

Changed paths:
    engines/director/frame.cpp


diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 7ea9ec6..8992806 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -899,10 +899,10 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
 	if (_vm->getVersion() >= 4 && !isButtonLabel) height = textCast->initialRect.bottom;
 	height += textShadow;
 
-	// WORKAROUND: TODO: Check what is the actual size in the original
-	//  4 is for the horizontal bars space, 1 on the left edge, 2 on the right edge
-	int width = _sprites[spriteId]->_width - 7;
-	if (_vm->getVersion() >= 4 && !isButtonLabel) width = textCast->initialRect.right;
+	int width = _sprites[spriteId]->_width;
+
+	if (_vm->getVersion() >= 4 && !isButtonLabel)
+		width = textCast->initialRect.right;
 
 	if (_vm->_currentScore->_fontMap.contains(textCast->fontId)) {
 		// We need to make sure that teh Shared Cast fonts have been loaded in?





More information about the Scummvm-git-logs mailing list