src/spritecache.h
changeset 5726 8f399788f6c9
parent 3565 03d870cc3dcd
child 5650 aefc131bf5ce
equal deleted inserted replaced
5725:8ad0e96437e0 5726:8f399788f6c9
       
     1 /* $Id$ */
       
     2 
       
     3 #ifndef SPRITECACHE_H
       
     4 #define SPRITECACHE_H
       
     5 
       
     6 typedef struct Sprite {
       
     7 	byte info;
       
     8 	byte height;
       
     9 	uint16 width;
       
    10 	int16 x_offs;
       
    11 	int16 y_offs;
       
    12 	byte data[VARARRAY_SIZE];
       
    13 } Sprite;
       
    14 
       
    15 const void *GetRawSprite(SpriteID sprite);
       
    16 bool SpriteExists(SpriteID sprite);
       
    17 
       
    18 static inline const Sprite *GetSprite(SpriteID sprite)
       
    19 {
       
    20 	return GetRawSprite(sprite);
       
    21 }
       
    22 
       
    23 static inline const byte *GetNonSprite(SpriteID sprite)
       
    24 {
       
    25 	return GetRawSprite(sprite);
       
    26 }
       
    27 
       
    28 void GfxInitSpriteMem(void);
       
    29 void IncreaseSpriteLRU(void);
       
    30 
       
    31 bool LoadNextSprite(int load_index, byte file_index);
       
    32 void DupSprite(SpriteID old, SpriteID new);
       
    33 void SkipSprites(uint count);
       
    34 
       
    35 #endif /* SPRITECACHE_H */