summaryrefslogtreecommitdiff
path: root/src/fontcache.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-09-02 15:20:38 +0000
committerrubidium <rubidium@openttd.org>2008-09-02 15:20:38 +0000
commitc8e8911ef676f503ac5789d3fefac1278cdef971 (patch)
treee7050537d14303dbc6bc9a461ff38931861cc4aa /src/fontcache.h
parentcbe397388f0ef537b61095b05ee4edfe9dd92202 (diff)
downloadopenttd-c8e8911ef676f503ac5789d3fefac1278cdef971.tar.xz
(svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites.
Diffstat (limited to 'src/fontcache.h')
-rw-r--r--src/fontcache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fontcache.h b/src/fontcache.h
index 14181a400..bf32c2927 100644
--- a/src/fontcache.h
+++ b/src/fontcache.h
@@ -46,7 +46,7 @@ static inline const Sprite *GetGlyph(FontSize size, uint32 key)
{
SpriteID sprite = GetUnicodeGlyph(size, key);
if (sprite == 0) sprite = GetUnicodeGlyph(size, '?');
- return GetSprite(sprite);
+ return GetSprite(sprite, ST_FONT);
}
@@ -55,7 +55,7 @@ static inline uint GetGlyphWidth(FontSize size, uint32 key)
{
SpriteID sprite = GetUnicodeGlyph(size, key);
if (sprite == 0) sprite = GetUnicodeGlyph(size, '?');
- return SpriteExists(sprite) ? GetSprite(sprite)->width + (size != FS_NORMAL) : 0;
+ return SpriteExists(sprite) ? GetSprite(sprite, ST_FONT)->width + (size != FS_NORMAL) : 0;
}
#endif /* WITH_FREETYPE */