spritecache.h
author miham
Wed, 21 Jun 2006 17:52:27 +0000
changeset 4054 112876fcc6be
parent 3565 ef0a9ef56fa0
permissions -rw-r--r--
(svn r5328) WebTranslator2 update to 2006-06-21 19:52:04
american - 1 fixed by WhiteRabbit (1)
dutch - 1 fixed, 1 changed by habell (2)
french - 1 fixed by glx (1)
german - 4 fixed by moewe2 (4)
italian - 1 fixed, 1 changed by sidew (2)
polish - 1 fixed by meush (1)
ukrainian - 1 fixed by znikoz (1)
/* $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);
bool SpriteExists(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 DupSprite(SpriteID old, SpriteID new);
void SkipSprites(uint count);

#endif /* SPRITECACHE_H */