summaryrefslogtreecommitdiff
path: root/src/fontcache.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2015-03-15 12:19:58 +0000
committerfrosch <frosch@openttd.org>2015-03-15 12:19:58 +0000
commitbed0370ad1cb1b1744b335a5f1d23821dcfd2cd1 (patch)
treee6a140b66e5da770478c8a13b322a1840f8e42ee /src/fontcache.cpp
parent67242d22692db147325f010c125a16123e3eded0 (diff)
downloadopenttd-bed0370ad1cb1b1744b335a5f1d23821dcfd2cd1.tar.xz
(svn r27187) -Fix: Code style.
Diffstat (limited to 'src/fontcache.cpp')
-rw-r--r--src/fontcache.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fontcache.cpp b/src/fontcache.cpp
index 4928b5377..6bea59c10 100644
--- a/src/fontcache.cpp
+++ b/src/fontcache.cpp
@@ -536,8 +536,8 @@ const Sprite *FreeTypeFontCache::GetGlyph(GlyphID key)
aa = (slot->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY);
/* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */
- unsigned int width = max(1U, (unsigned int)slot->bitmap.width + (this->fs == FS_NORMAL));
- unsigned int height = max(1U, (unsigned int)slot->bitmap.rows + (this->fs == FS_NORMAL));
+ uint width = max(1U, (uint)slot->bitmap.width + (this->fs == FS_NORMAL));
+ uint height = max(1U, (uint)slot->bitmap.rows + (this->fs == FS_NORMAL));
/* Limit glyph size to prevent overflows later on. */
if (width > 256 || height > 256) usererror("Font glyph is too large");
@@ -553,8 +553,8 @@ const Sprite *FreeTypeFontCache::GetGlyph(GlyphID key)
/* Draw shadow for medium size */
if (this->fs == FS_NORMAL && !aa) {
- for (unsigned int y = 0; y < (unsigned int)slot->bitmap.rows; y++) {
- for (unsigned int x = 0; x < (unsigned int)slot->bitmap.width; x++) {
+ for (uint y = 0; y < (uint)slot->bitmap.rows; y++) {
+ for (uint x = 0; x < (uint)slot->bitmap.width; x++) {
if (aa ? (slot->bitmap.buffer[x + y * slot->bitmap.pitch] > 0) : HasBit(slot->bitmap.buffer[(x / 8) + y * slot->bitmap.pitch], 7 - (x % 8))) {
sprite.data[1 + x + (1 + y) * sprite.width].m = SHADOW_COLOUR;
sprite.data[1 + x + (1 + y) * sprite.width].a = aa ? slot->bitmap.buffer[x + y * slot->bitmap.pitch] : 0xFF;
@@ -563,8 +563,8 @@ const Sprite *FreeTypeFontCache::GetGlyph(GlyphID key)
}
}
- for (unsigned int y = 0; y < (unsigned int)slot->bitmap.rows; y++) {
- for (unsigned int x = 0; x < (unsigned int)slot->bitmap.width; x++) {
+ for (uint y = 0; y < (uint)slot->bitmap.rows; y++) {
+ for (uint x = 0; x < (uint)slot->bitmap.width; x++) {
if (aa ? (slot->bitmap.buffer[x + y * slot->bitmap.pitch] > 0) : HasBit(slot->bitmap.buffer[(x / 8) + y * slot->bitmap.pitch], 7 - (x % 8))) {
sprite.data[x + y * sprite.width].m = FACE_COLOUR;
sprite.data[x + y * sprite.width].a = aa ? slot->bitmap.buffer[x + y * slot->bitmap.pitch] : 0xFF;