spritecache.h
author tron
Sat, 24 Jun 2006 09:48:51 +0000
branch0.4
changeset 10045 ed89f9eb128d
parent 9959 984493ab6fff
permissions -rw-r--r--
(svn r5350) -Backport: r5327
Use DrawFoundation() for houses
-Fix: Some graphical glitches on house tiles with foundations
-Fix: The selection cursor is now aligned with the top of the foundation for house tiles
/* $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 DupSprite(SpriteID old, SpriteID new);
void SkipSprites(uint count);

#endif /* SPRITECACHE_H */