From da30e1a0f5c0129694bb356d8fe556ed3c07247f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 22 Feb 2017 22:37:27 -0500 Subject: TITANIC: Fix writeString character placement --- engines/titanic/support/font.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/titanic/support/font.cpp') diff --git a/engines/titanic/support/font.cpp b/engines/titanic/support/font.cpp index f81251b10b..56f1af4718 100644 --- a/engines/titanic/support/font.cpp +++ b/engines/titanic/support/font.cpp @@ -214,6 +214,7 @@ void STFont::writeString(CVideoSurface *surface, const Point &destPos, Rect &cli // Form a rect of the area of the next character to draw Rect charRect(_chars[c]._offset, textRect.top, _chars[c]._offset + _chars[c]._width, textRect.bottom); + int textX = textPt.x; if (textPt.x < clipRect.left) { // Character is either partially or entirely left off-screen @@ -237,6 +238,7 @@ void STFont::writeString(CVideoSurface *surface, const Point &destPos, Rect &cli // At this point, we know we've got to draw at least part of a character, // and have figured out the area of the character to draw copyRect(surface, textPt, charRect); + textPt.x = textX + _chars[c]._width; } } -- cgit v1.2.3