spritecache.h
author Darkvater
Fri, 17 Mar 2006 08:06:56 +0000
changeset 3241 ffde1325bab8
parent 2436 177cb6a8339f
child 3565 03d870cc3dcd
permissions -rw-r--r--
(svn r3915) - Savegame version 23: Do not save the autosave interval anymore with savegames. Some people should be very happe atm ;)
/* $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 */