[Scummvm-cvs-logs] SF.net SVN: scummvm:[48778] scummvm/trunk/engines/sci/graphics/text16.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Fri Apr 23 23:18:17 CEST 2010


Revision: 48778
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48778&view=rev
Author:   m_kiewitz
Date:     2010-04-23 21:18:16 +0000 (Fri, 23 Apr 2010)

Log Message:
-----------
SCI: text16 ::Width() doesn't add ending spaces to the width anymore, sierra sci also doesn't do this - fixes windows being too large sometimes

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/text16.cpp

Modified: scummvm/trunk/engines/sci/graphics/text16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/text16.cpp	2010-04-23 13:51:59 UTC (rev 48777)
+++ scummvm/trunk/engines/sci/graphics/text16.cpp	2010-04-23 21:18:16 UTC (rev 48778)
@@ -267,6 +267,9 @@
 					break;
 				}
 			default:
+				// if last character is a space, don't add it to textWidth
+				if ((curChar == ' ') && (!len))
+					break;
 				textHeight = MAX<int16> (textHeight, _ports->_curPort->fontHeight);
 				textWidth += _font->getCharWidth(curChar);
 			}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list