view spritecache.h @ 5378:03582d19a51a draft

(svn r7563) -Fix (FS#468): removing towns in the scenario editor could leave subsidies with that town as source/destination, resulting in an assertion when displaying the Subsidies Window.
author rubidium <rubidium@openttd.org>
date Tue, 26 Dec 2006 15:28:11 +0000
parents f0e34d0b43fa
children
line wrap: on
line source

/* $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 */