forked from mirror/OpenTTD
(svn r19723) -Add: a simple sprite alignment helper. It does not store the new offsets anywhere so as soon as the sprite is reloaded the offsets are gone (use a bigger sprite cache if this happens). Also anything that reloads NewGRFs (new games, loading games or (re)applying NewGRFs) clears the sprite cache and as such resets the offsets.
This commit is contained in:
@@ -28,6 +28,11 @@ extern uint _sprite_cache_size;
|
||||
void *GetRawSprite(SpriteID sprite, SpriteType type);
|
||||
bool SpriteExists(SpriteID sprite);
|
||||
|
||||
SpriteType GetSpriteType(SpriteID sprite);
|
||||
uint GetOriginFileSlot(SpriteID sprite);
|
||||
uint GetMaxSpriteID();
|
||||
|
||||
|
||||
static inline const Sprite *GetSprite(SpriteID sprite, SpriteType type)
|
||||
{
|
||||
assert(type != ST_RECOLOUR);
|
||||
|
Reference in New Issue
Block a user