[Scummvm-cvs-logs] scummvm master -> 0c708ddcf7087967bcf7bc791c55c473b7278e6e

csnover csnover at users.noreply.github.com
Sat May 28 17:31:39 CEST 2016


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:
0c708ddcf7 SCI32: Simplify default text width equation


Commit: 0c708ddcf7087967bcf7bc791c55c473b7278e6e
    https://github.com/scummvm/scummvm/commit/0c708ddcf7087967bcf7bc791c55c473b7278e6e
Author: Colin Snover (github.com at zetafleet.com)
Date: 2016-05-28T10:31:23-05:00

Commit Message:
SCI32: Simplify default text width equation

Changed paths:
    engines/sci/graphics/text32.cpp



diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index e1b522a..d1c223d 100644
--- a/engines/sci/graphics/text32.cpp
+++ b/engines/sci/graphics/text32.cpp
@@ -545,12 +545,7 @@ Common::Rect GfxText32::getTextSize(const Common::String &text, int16 maxWidth,
 
 	if (maxWidth >= 0) {
 		if (maxWidth == 0) {
-			// TODO: This was hardcoded to 192, but guessing
-			// that it was originally 60% of the scriptWidth
-			// before the compiler took over.
-			// Verify this by looking at a game that uses a
-			// scriptWidth other than 320, like LSL7
-			maxWidth = (int16)(_scaledWidth * (scriptWidth * 0.6) / scriptWidth);
+			maxWidth = _scaledWidth * 3 / 5;
 		}
 
 		result.right = maxWidth;






More information about the Scummvm-git-logs mailing list