aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2016-05-28 10:12:54 -0500
committerColin Snover2016-05-28 10:31:23 -0500
commit0c708ddcf7087967bcf7bc791c55c473b7278e6e (patch)
treeac02a8a08c9f4b4a2455b6544caaa89ba9640a2c /engines/sci
parent35186ae5b008830d057fb15fc0195e22cce23fbd (diff)
downloadscummvm-rg350-0c708ddcf7087967bcf7bc791c55c473b7278e6e.tar.gz
scummvm-rg350-0c708ddcf7087967bcf7bc791c55c473b7278e6e.tar.bz2
scummvm-rg350-0c708ddcf7087967bcf7bc791c55c473b7278e6e.zip
SCI32: Simplify default text width equation
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/text32.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/engines/sci/graphics/text32.cpp b/engines/sci/graphics/text32.cpp
index e1b522af68..d1c223d5d5 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;