aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/text/truetype_font.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2015-04-11 16:11:21 -0400
committerMatthew Hoops2015-04-11 16:12:47 -0400
commitddf170de4a33fac4cac3093bf6dd97d253216092 (patch)
tree1c2eb38f62d669b386f46bf660cc9d6ab2671c5e /engines/zvision/text/truetype_font.cpp
parent75acef75661cc4554ad0bf114d62bf553afae7ab (diff)
downloadscummvm-rg350-ddf170de4a33fac4cac3093bf6dd97d253216092.tar.gz
scummvm-rg350-ddf170de4a33fac4cac3093bf6dd97d253216092.tar.bz2
scummvm-rg350-ddf170de4a33fac4cac3093bf6dd97d253216092.zip
ZVISION: Silence gcc warnings
Diffstat (limited to 'engines/zvision/text/truetype_font.cpp')
-rw-r--r--engines/zvision/text/truetype_font.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/zvision/text/truetype_font.cpp b/engines/zvision/text/truetype_font.cpp
index 7ad8d6db61..acb053ea8d 100644
--- a/engines/zvision/text/truetype_font.cpp
+++ b/engines/zvision/text/truetype_font.cpp
@@ -199,12 +199,12 @@ void StyledTTFont::drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint
if (_font) {
_font->drawChar(dst, chr, x, y, color);
if (_style & TTF_STYLE_UNDERLINE) {
- int16 pos = floor(_font->getFontHeight() * 0.87);
+ int16 pos = (int16)floor(_font->getFontHeight() * 0.87);
int thk = MAX((int)(_font->getFontHeight() * 0.05), 1);
dst->fillRect(Common::Rect(x, y + pos, x + _font->getCharWidth(chr), y + pos + thk), color);
}
if (_style & TTF_STYLE_STRIKETHROUGH) {
- int16 pos = floor(_font->getFontHeight() * 0.60);
+ int16 pos = (int16)floor(_font->getFontHeight() * 0.60);
int thk = MAX((int)(_font->getFontHeight() * 0.05), 1);
dst->fillRect(Common::Rect(x, y + pos, x + _font->getCharWidth(chr), y + pos + thk), color);
}
@@ -216,7 +216,7 @@ void StyledTTFont::drawString(Graphics::Surface *dst, const Common::String &str,
Common::U32String u32str = convertUtf8ToUtf32(str);
_font->drawString(dst, u32str, x, y, w, color, align);
if (_style & TTF_STYLE_UNDERLINE) {
- int16 pos = floor(_font->getFontHeight() * 0.87);
+ int16 pos = (int16)floor(_font->getFontHeight() * 0.87);
int16 wd = MIN(_font->getStringWidth(u32str), w);
int16 stX = x;
if (align == Graphics::kTextAlignCenter)
@@ -229,7 +229,7 @@ void StyledTTFont::drawString(Graphics::Surface *dst, const Common::String &str,
dst->fillRect(Common::Rect(stX, y + pos, stX + wd, y + pos + thk), color);
}
if (_style & TTF_STYLE_STRIKETHROUGH) {
- int16 pos = floor(_font->getFontHeight() * 0.60);
+ int16 pos = (int16)floor(_font->getFontHeight() * 0.60);
int16 wd = MIN(_font->getStringWidth(u32str), w);
int16 stX = x;
if (align == Graphics::kTextAlignCenter)