spritecache.h
author Darkvater
Mon, 18 Jul 2005 00:17:19 +0000
changeset 2118 aec8042f000b
parent 2014 ccfe4fa81a14
child 2123 146517a6e3aa
permissions -rw-r--r--
(svn r2628) - Fix: Planting trees does not result in a MapSize() assertion anymore; introduced in r2598
#ifndef SPRITECACHE_H
#define SPRITECACHE_H

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

typedef struct {
	int xoffs, yoffs;
	int xsize, ysize;
} SpriteDimension;

const SpriteDimension *GetSpriteDimension(SpriteID sprite);
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);
}

void GfxLoadSprites(void);
void IncreaseSpriteLRU(void);

#endif