summaryrefslogtreecommitdiff
path: root/src/spritecache.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-04-25 16:27:30 +0000
committerrubidium <rubidium@openttd.org>2010-04-25 16:27:30 +0000
commitc72e2dde603fe9ba0d57d2e6f259f32398b75a15 (patch)
treea4245990af5d20004a918d8b0131bd3a96e88613 /src/spritecache.h
parent4868fb988ff7373ac0b436511464434a310273fd (diff)
downloadopenttd-c72e2dde603fe9ba0d57d2e6f259f32398b75a15.tar.xz
(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.
Diffstat (limited to 'src/spritecache.h')
-rw-r--r--src/spritecache.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/spritecache.h b/src/spritecache.h
index 172702500..7801f5609 100644
--- a/src/spritecache.h
+++ b/src/spritecache.h
@@ -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);