Files @ r7463:838c9d05e229
Branch filter:

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

miham
(svn r10964) -Update: WebTranslator2 update to 2007-08-22 22:57:00
croatian - 9 fixed, 13 changed by knovak (22)
italian - 10 fixed by lorenzodv (10)
japanese - 5 fixed by ickoonite (5)
polish - 10 fixed, 1 changed by meush (11)
slovak - 77 changed by lengyel (77)
spanish - 5 fixed by eusebio (5)
/* $Id$ */

/** @file spritecache.h */

#ifndef SPRITECACHE_H
#define SPRITECACHE_H

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

extern uint _sprite_cache_size;

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

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

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

void GfxInitSpriteMem();
void IncreaseSpriteLRU();

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

#endif /* SPRITECACHE_H */