diff options
author | Matthew Hoops | 2013-10-17 23:07:47 -0400 |
---|---|---|
committer | Matthew Hoops | 2013-10-17 23:08:17 -0400 |
commit | 3c6c91a60446016af2554df2ef8eaa6d5f4140ec (patch) | |
tree | 82a37ed4d9c9db5f18bde3db45f8ffba3acde413 /engines | |
parent | 396808638d538e6c02f7ea111557928e4c6bdd71 (diff) | |
download | scummvm-rg350-3c6c91a60446016af2554df2ef8eaa6d5f4140ec.tar.gz scummvm-rg350-3c6c91a60446016af2554df2ef8eaa6d5f4140ec.tar.bz2 scummvm-rg350-3c6c91a60446016af2554df2ef8eaa6d5f4140ec.zip |
ZVISION: Make the line height be an int
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; |