spritecache.h
author peter1138
Wed, 19 Apr 2006 07:17:00 +0000
changeset 3587 c434d5c3dcaa
parent 3565 ef0a9ef56fa0
permissions -rw-r--r--
(svn r4473) - Newstations:
- Alter parameters of CMD_BUILD_RAILROAD_STATION to accept a custom station class and id.
- Add a dynamically allocated list of custom stations that the SpecIndex (m4) references.
/* $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 */