@@ -801,25 +801,25 @@ static void *HandleInvalidSpriteRequest(
}
/**
* Reads a sprite (from disk or sprite cache).
* If the sprite is not available or of wrong type, a fallback sprite is returned.
* @param sprite Sprite to read.
* @param type Expected sprite type.
* @param allocator Allocator function to use. Set to NULL to use the usual sprite cache.
* @return Sprite raw data
*/
void *GetRawSprite(SpriteID sprite, SpriteType type, AllocatorProc *allocator)
{
assert(IsMapgenSpriteID(sprite) == (type == ST_MAPGEN));
assert(type != ST_MAPGEN || IsMapgenSpriteID(sprite));
assert(type < ST_INVALID);
if (!SpriteExists(sprite)) {
DEBUG(sprite, 1, "Tried to load non-existing sprite #%d. Probable cause: Wrong/missing NewGRFs", sprite);
/* SPR_IMG_QUERY is a BIG FAT RED ? */
sprite = SPR_IMG_QUERY;
SpriteCache *sc = GetSpriteCache(sprite);
if (sc->type != type) return HandleInvalidSpriteRequest(sprite, type, sc, allocator);
Status change: