2005-02-10 06:43:30 +01:00
|
|
|
#ifndef SPRITECACHE_H
|
|
|
|
#define SPRITECACHE_H
|
|
|
|
|
2005-02-10 13:14:38 +01:00
|
|
|
typedef struct Sprite {
|
|
|
|
byte info;
|
|
|
|
byte height;
|
2005-02-11 16:18:09 +01:00
|
|
|
uint16 width;
|
|
|
|
int16 x_offs;
|
|
|
|
int16 y_offs;
|
2005-02-10 13:14:38 +01:00
|
|
|
byte data[VARARRAY_SIZE];
|
|
|
|
} Sprite;
|
|
|
|
|
2005-02-10 06:43:30 +01:00
|
|
|
typedef struct {
|
|
|
|
int xoffs, yoffs;
|
|
|
|
int xsize, ysize;
|
|
|
|
} SpriteDimension;
|
|
|
|
|
|
|
|
const SpriteDimension *GetSpriteDimension(SpriteID sprite);
|
2005-02-13 09:12:03 +01:00
|
|
|
const void *GetRawSprite(SpriteID sprite);
|
|
|
|
|
|
|
|
static inline const Sprite *GetSprite(SpriteID sprite)
|
|
|
|
{
|
|
|
|
return GetRawSprite(sprite);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline const byte *GetNonSprite(SpriteID sprite)
|
|
|
|
{
|
|
|
|
return GetRawSprite(sprite);
|
|
|
|
}
|
2005-02-10 06:43:30 +01:00
|
|
|
|
|
|
|
void GfxLoadSprites(void);
|
|
|
|
void IncreaseSpriteLRU(void);
|
|
|
|
|
2005-07-19 08:54:13 +02:00
|
|
|
extern bool _cache_sprites;
|
|
|
|
|
2005-02-10 06:43:30 +01:00
|
|
|
#endif
|