spritecache.h
author tron
Sun, 28 Aug 2005 14:45:44 +0000
changeset 2374 e4443eab6293
parent 2340 e18ef06bc59a
child 2407 6c378ce4d469
permissions -rw-r--r--
(svn r2900) Fix a bug, which incremented the counter of a loop twice and therefore calculated wrong argument indices
/* $Id$ */

#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;

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 GfxInitSpriteMem(void);
void IncreaseSpriteLRU(void);

bool LoadNextSprite(int load_index, byte file_index);
void SkipSprites(uint count);

#endif