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;
|
|
|
|
assert_compile(sizeof(Sprite) == 8);
|
|
|
|
|
2005-02-10 05:43:30 +00:00
|
|
|
typedef struct {
|
|
|
|
int xoffs, yoffs;
|
|
|
|
int xsize, ysize;
|
|
|
|
} SpriteDimension;
|
|
|
|
|
|
|
|
const SpriteDimension *GetSpriteDimension(SpriteID sprite);
|
2005-02-13 08:12:03 +00: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 05:43:30 +00:00
|
|
|
|
|
|
|
void GfxLoadSprites(void);
|
|
|
|
void IncreaseSpriteLRU(void);
|
|
|
|
|
|
|
|
#endif
|