summaryrefslogtreecommitdiff
path: root/spritecache.h
blob: c5b50cb41dd12e21612aec36c41eaa5f188c7212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#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;
assert_compile(sizeof(Sprite) == 8);

typedef struct {
	int xoffs, yoffs;
	int xsize, ysize;
} SpriteDimension;

const SpriteDimension *GetSpriteDimension(SpriteID sprite);
const Sprite *GetSprite(SpriteID sprite);
const byte *GetNonSprite(SpriteID sprite);

void GfxLoadSprites(void);
void IncreaseSpriteLRU(void);

#endif