Files @ r5838:b3aab5e9d39e
Branch filter:

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

miham
(svn r8404) -Update: WebTranslator2 update to 2007-01-25 19:36:44
korean - 2 changed by leejaeuk5 (2)
slovak - 1 changed by lengyel (1)
slovenian - 290 changed by Necrolyte (290)
ukrainian - 1 fixed, 55 changed by mad (7), znikoz (49)
/* $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 (Sprite*)GetRawSprite(sprite);
}

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

void GfxInitSpriteMem(void);
void IncreaseSpriteLRU(void);

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

#endif /* SPRITECACHE_H */