(svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites.

This commit is contained in:
rubidium
2008-09-02 15:20:38 +00:00
parent cbe397388f
commit c8e8911ef6
19 changed files with 61 additions and 51 deletions

View File

@@ -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 */