src/spritecache.h
author rubidium
Wed, 03 Jan 2007 08:55:13 +0000
branchcustombridgeheads
changeset 5644 ec96a5a38023
parent 5643 3778051e8095
child 5650 aefc131bf5ce
permissions -rw-r--r--
(svn r7791) [cbh] -Fix (r7790): forgot to run projects/generate, so the MSVC project files were not in sync with sources.list.
/* $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 */