File diff r9110:c1c12a8355e3 → r9111:983de9c5a848
src/spritecache.h
Show inline comments
 
/* $Id$ */
 

	
 
/** @file spritecache.h */
 
/** @file spritecache.h Functions to cache sprites in memory. */
 

	
 
#ifndef SPRITECACHE_H
 
#define SPRITECACHE_H
 

	
 
#include "gfx_type.h"
 

	
 
struct Sprite {
 
	byte height;
 
	uint16 width;
 
	int16 x_offs;
 
	int16 y_offs;
 
	byte data[VARARRAY_SIZE];
 
};
 

	
 
extern uint _sprite_cache_size;
 

	
 
const void *GetRawSprite(SpriteID sprite, bool real_sprite);
 
bool SpriteExists(SpriteID sprite);
 

	
 
static inline const Sprite *GetSprite(SpriteID sprite)
 
{
 
	return (Sprite*)GetRawSprite(sprite, true);
 
}