aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/font.cpp
diff options
context:
space:
mode:
authorDenis Kasak2009-08-02 05:16:36 +0000
committerDenis Kasak2009-08-02 05:16:36 +0000
commit77033ca9a1a61e9de988849618ddd12ad28f7e7b (patch)
treee8b684341fae3a4ca2d09cf4cab60948672c9446 /engines/draci/font.cpp
parent6bd1cfa1bdec266574d26b3bf0c3c45fa09d760a (diff)
downloadscummvm-rg350-77033ca9a1a61e9de988849618ddd12ad28f7e7b.tar.gz
scummvm-rg350-77033ca9a1a61e9de988849618ddd12ad28f7e7b.tar.bz2
scummvm-rg350-77033ca9a1a61e9de988849618ddd12ad28f7e7b.zip
* Fixed bug in Font::getStringWidth() which made it miscalculate string widths (a temporary variable used for storing the width of the current line was not being reset).
* Temporarily disabled font transparency because the dragon's text is rendered hollow (transparency inside glyph bodies). svn-id: r42993
Diffstat (limited to 'engines/draci/font.cpp')
-rw-r--r--engines/draci/font.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/draci/font.cpp b/engines/draci/font.cpp
index b867bf4877..dcd312a280 100644
--- a/engines/draci/font.cpp
+++ b/engines/draci/font.cpp
@@ -179,7 +179,12 @@ void Font::drawChar(Surface *dst, uint8 chr, int tx, int ty, bool markDirty) con
}
// Paint pixel (if not transparent)
- if (colour != _transparent)
+ // HACK: Temporary turned off transparency because the dragon's colour of the
+ // font appears to be 255 (which should be transparent).
+ // This would not be a problem if the font background was also not colour
+ // 255 (apparently) so I don't know how to handle the background being
+ // transparent and at the same time a non-transparent font body.
+ //if (colour != _transparent)
ptr[x] = colour;
}
@@ -279,7 +284,8 @@ int Font::getStringWidth(const Common::String &str, int spacing) const {
if (tmp > width) {
width = tmp;
}
- continue;
+
+ tmp = 0;
}
}