Mercurial > hg > openttd
changeset 11051:f50edf69c453 draft
(svn r15391) -Fix (r14997): loading font sprites should not trigger a palette conversion.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 07 Feb 2009 02:29:08 +0000 |
parents | db05160944a3 |
children | 457ecd1afb4b |
files | src/spritecache.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -246,7 +246,7 @@ return sc->ptr; } - assert(sprite_type == ST_NORMAL); + assert(sprite_type == ST_NORMAL || sprite_type == ST_FONT); SpriteLoaderGrf sprite_loader; SpriteLoader::Sprite sprite; @@ -490,7 +490,10 @@ }; SpriteType available = sc->type; - if (requested == ST_FONT && available == ST_NORMAL) return GetRawSprite(sprite, ST_NORMAL); + if (requested == ST_FONT && available == ST_NORMAL) { + if (sc->ptr == NULL) sc->type = ST_FONT; + return GetRawSprite(sprite, sc->type); + } byte warning_level = sc->warned ? 6 : 0; sc->warned = true;