spritecache.h
author tron
Fri, 11 Feb 2005 15:18:09 +0000
changeset 1356 291c2802243f
parent 1352 5880ab4de192
child 1357 a5acbb1f20fe
permissions -rw-r--r--
(svn r1860) The sprite header endianness issue was solved in r1855
1349
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
     1
#ifndef SPRITECACHE_H
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
     2
#define SPRITECACHE_H
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
     3
1350
067b22970f19 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
tron
parents: 1349
diff changeset
     4
typedef struct Sprite {
067b22970f19 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
tron
parents: 1349
diff changeset
     5
	byte info;
067b22970f19 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
tron
parents: 1349
diff changeset
     6
	byte height;
1356
291c2802243f (svn r1860) The sprite header endianness issue was solved in r1855
tron
parents: 1352
diff changeset
     7
	uint16 width;
291c2802243f (svn r1860) The sprite header endianness issue was solved in r1855
tron
parents: 1352
diff changeset
     8
	int16 x_offs;
291c2802243f (svn r1860) The sprite header endianness issue was solved in r1855
tron
parents: 1352
diff changeset
     9
	int16 y_offs;
1350
067b22970f19 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
tron
parents: 1349
diff changeset
    10
	byte data[VARARRAY_SIZE];
067b22970f19 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
tron
parents: 1349
diff changeset
    11
} Sprite;
067b22970f19 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
tron
parents: 1349
diff changeset
    12
assert_compile(sizeof(Sprite) == 8);
067b22970f19 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
tron
parents: 1349
diff changeset
    13
1349
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    14
typedef struct {
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    15
	int xoffs, yoffs;
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    16
	int xsize, ysize;
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    17
} SpriteDimension;
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    18
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    19
const SpriteDimension *GetSpriteDimension(SpriteID sprite);
1350
067b22970f19 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
tron
parents: 1349
diff changeset
    20
Sprite *GetSprite(SpriteID sprite);
067b22970f19 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
tron
parents: 1349
diff changeset
    21
byte *GetNonSprite(SpriteID sprite);
1349
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    22
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    23
void GfxLoadSprites(void);
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    24
void IncreaseSpriteLRU(void);
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    25
07514c2cc6d1 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
tron
parents:
diff changeset
    26
#endif