2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2005-02-10 05:43:30 +00:00
|
|
|
#ifndef SPRITECACHE_H
|
|
|
|
#define SPRITECACHE_H
|
|
|
|
|
2005-02-10 12:14:38 +00:00
|
|
|
typedef struct Sprite {
|
|
|
|
byte info;
|
|
|
|
byte height;
|
2005-02-11 15:18:09 +00:00
|
|
|
uint16 width;
|
|
|
|
int16 x_offs;
|
|
|
|
int16 y_offs;
|
2005-02-10 12:14:38 +00:00
|
|
|
byte data[VARARRAY_SIZE];
|
|
|
|
} Sprite;
|
|
|
|
|
2005-02-13 08:12:03 +00:00
|
|
|
const void *GetRawSprite(SpriteID sprite);
|
2006-04-16 11:26:23 +00:00
|
|
|
bool SpriteExists(SpriteID sprite);
|
2005-02-13 08:12:03 +00:00
|
|
|
|
|
|
|
static inline const Sprite *GetSprite(SpriteID sprite)
|
|
|
|
{
|
2007-01-10 18:56:51 +00:00
|
|
|
return (Sprite*)GetRawSprite(sprite);
|
2005-02-13 08:12:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline const byte *GetNonSprite(SpriteID sprite)
|
|
|
|
{
|
2007-01-10 18:56:51 +00:00
|
|
|
return (byte*)GetRawSprite(sprite);
|
2005-02-13 08:12:03 +00:00
|
|
|
}
|
2005-02-10 05:43:30 +00:00
|
|
|
|
2005-08-14 18:10:18 +00:00
|
|
|
void GfxInitSpriteMem(void);
|
2005-02-10 05:43:30 +00:00
|
|
|
void IncreaseSpriteLRU(void);
|
|
|
|
|
2005-08-14 18:10:18 +00:00
|
|
|
bool LoadNextSprite(int load_index, byte file_index);
|
2007-01-10 18:56:51 +00:00
|
|
|
void DupSprite(SpriteID old_spr, SpriteID new_spr);
|
2005-08-14 18:10:18 +00:00
|
|
|
void SkipSprites(uint count);
|
|
|
|
|
2005-09-18 20:56:44 +00:00
|
|
|
#endif /* SPRITECACHE_H */
|