Skip to content

Commit

Permalink
TITANIC: Fix writeString character placement
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Feb 23, 2017
1 parent efadb34 commit da30e1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engines/titanic/support/font.cpp
Expand Up @@ -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
Expand All @@ -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;
}
}

Expand Down

0 comments on commit da30e1a

Please sign in to comment.