src/spritecache.h
branchcpp_gui
changeset 6298 c30fe89622df
parent 5838 9c3129cb019b
child 6307 f40e88cff863
equal deleted inserted replaced
6297:4bf29d14edba 6298:c30fe89622df
     1 /* $Id$ */
     1 /* $Id$ */
     2 
     2 
     3 #ifndef SPRITECACHE_H
     3 #ifndef SPRITECACHE_H
     4 #define SPRITECACHE_H
     4 #define SPRITECACHE_H
     5 
     5 
     6 typedef struct Sprite {
     6 struct Sprite {
     7 	byte info;
     7 	byte info;
     8 	byte height;
     8 	byte height;
     9 	uint16 width;
     9 	uint16 width;
    10 	int16 x_offs;
    10 	int16 x_offs;
    11 	int16 y_offs;
    11 	int16 y_offs;
    12 	byte data[VARARRAY_SIZE];
    12 	byte data[VARARRAY_SIZE];
    13 } Sprite;
    13 };
    14 
    14 
    15 const void *GetRawSprite(SpriteID sprite);
    15 const void *GetRawSprite(SpriteID sprite);
    16 bool SpriteExists(SpriteID sprite);
    16 bool SpriteExists(SpriteID sprite);
    17 
    17 
    18 static inline const Sprite *GetSprite(SpriteID sprite)
    18 static inline const Sprite *GetSprite(SpriteID sprite)
    23 static inline const byte *GetNonSprite(SpriteID sprite)
    23 static inline const byte *GetNonSprite(SpriteID sprite)
    24 {
    24 {
    25 	return (byte*)GetRawSprite(sprite);
    25 	return (byte*)GetRawSprite(sprite);
    26 }
    26 }
    27 
    27 
    28 void GfxInitSpriteMem(void);
    28 void GfxInitSpriteMem();
    29 void IncreaseSpriteLRU(void);
    29 void IncreaseSpriteLRU();
    30 
    30 
    31 bool LoadNextSprite(int load_index, byte file_index);
    31 bool LoadNextSprite(int load_index, byte file_index);
    32 void DupSprite(SpriteID old_spr, SpriteID new_spr);
    32 void DupSprite(SpriteID old_spr, SpriteID new_spr);
    33 void SkipSprites(uint count);
    33 void SkipSprites(uint count);
    34 
    34