Files @ r6395:cb11d86befed
Branch filter:

Location: cpp/openttd-patchpack/source/src/spritecache.h

miham
(svn r9525) -Update: WebTranslator2 update to 2007-03-29 19:56:13
estonian - 3 fixed, 4 changed by kristjans (7)
finnish - 2 fixed by pallokala (2)
italian - 1 changed by lorenzodv (1)
traditional_chinese - 1 changed by xbddc (1)
turkish - 12 fixed by jnmbk (12)
/* $Id$ */

#ifndef SPRITECACHE_H
#define SPRITECACHE_H

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

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

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

static inline const byte *GetNonSprite(SpriteID sprite)
{
	return (byte*)GetRawSprite(sprite);
}

void GfxInitSpriteMem();
void IncreaseSpriteLRU();

bool LoadNextSprite(int load_index, byte file_index);
void DupSprite(SpriteID old_spr, SpriteID new_spr);
void SkipSprites(uint count);

#endif /* SPRITECACHE_H */