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
commitc3589551274ffbef4b39cd69a9d878e51eec0cd1 (patch)
treee7050537d14303dbc6bc9a461ff38931861cc4aa /src/fontcache.h
parent2c58a87f4ce849cdd93c0a008baa60bf37e74463 (diff)
downloadopenttd-c3589551274ffbef4b39cd69a9d878e51eec0cd1.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 */