diff options
Diffstat (limited to 'src/spritecache.h')
-rw-r--r-- | src/spritecache.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/spritecache.h b/src/spritecache.h new file mode 100644 index 000000000..3a5676a63 --- /dev/null +++ b/src/spritecache.h @@ -0,0 +1,35 @@ +/* $Id$ */ + +#ifndef SPRITECACHE_H +#define SPRITECACHE_H + +typedef struct Sprite { + byte info; + byte height; + uint16 width; + int16 x_offs; + int16 y_offs; + byte data[VARARRAY_SIZE]; +} Sprite; + +const void *GetRawSprite(SpriteID sprite); +bool SpriteExists(SpriteID sprite); + +static inline const Sprite *GetSprite(SpriteID sprite) +{ + return GetRawSprite(sprite); +} + +static inline const byte *GetNonSprite(SpriteID sprite) +{ + return GetRawSprite(sprite); +} + +void GfxInitSpriteMem(void); +void IncreaseSpriteLRU(void); + +bool LoadNextSprite(int load_index, byte file_index); +void DupSprite(SpriteID old, SpriteID new); +void SkipSprites(uint count); + +#endif /* SPRITECACHE_H */ |