From c3589551274ffbef4b39cd69a9d878e51eec0cd1 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 2 Sep 2008 15:20:38 +0000 Subject: (svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites. --- src/fontcache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fontcache.h') 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 */ -- cgit v1.2.3-54-g00ecf