diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/truetype_font.cpp | 4 | ||||
-rw-r--r-- | engines/zvision/truetype_font.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/zvision/truetype_font.cpp b/engines/zvision/truetype_font.cpp index 8d6aaca51e..289b5fbbaf 100644 --- a/engines/zvision/truetype_font.cpp +++ b/engines/zvision/truetype_font.cpp @@ -94,7 +94,7 @@ Graphics::Surface *TruetypeFont::drawTextToSurface(const Common::String &text, u Common::Array<Common::String> lines; _font->wordWrapText(text, maxWidth, lines); - while (maxHeight > 0 && lines.size() * _lineHeight > maxHeight) { + while (maxHeight > 0 && (int)lines.size() * _lineHeight > maxHeight) { lines.pop_back(); } if (lines.size() == 0) { @@ -107,7 +107,7 @@ Graphics::Surface *TruetypeFont::drawTextToSurface(const Common::String &text, u int heightOffset = 0; for (Common::Array<Common::String>::iterator it = lines.begin(); it != lines.end(); it++) { _font->drawString(surface, *it, 0, 0 + heightOffset, maxWidth, textColor, align); - heightOffset += (int)_lineHeight; + heightOffset += _lineHeight; } return surface; diff --git a/engines/zvision/truetype_font.h b/engines/zvision/truetype_font.h index 4f2ff864a8..33f016cffd 100644 --- a/engines/zvision/truetype_font.h +++ b/engines/zvision/truetype_font.h @@ -45,7 +45,7 @@ public: private: ZVision *_engine; Graphics::Font *_font; - float _lineHeight; + int _lineHeight; size_t _maxCharWidth; size_t _maxCharHeight; |