author | tron |
Mon, 08 Aug 2005 21:35:27 +0000 | |
changeset 2319 | 9902d3ffa309 |
parent 2309 | 34824a8b336f |
child 2340 | 0a9f3eeccb96 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
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
|
3 |
#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
|
4 |
#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
|
5 |
|
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
|
6 |
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
|
7 |
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
|
8 |
byte height; |
1356
291c2802243f
(svn r1860) The sprite header endianness issue was solved in r1855
tron
parents:
1352
diff
changeset
|
9 |
uint16 width; |
291c2802243f
(svn r1860) The sprite header endianness issue was solved in r1855
tron
parents:
1352
diff
changeset
|
10 |
int16 x_offs; |
291c2802243f
(svn r1860) The sprite header endianness issue was solved in r1855
tron
parents:
1352
diff
changeset
|
11 |
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
|
12 |
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
|
13 |
} 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
|
14 |
|
1361 | 15 |
const void *GetRawSprite(SpriteID sprite); |
16 |
||
17 |
static inline const Sprite *GetSprite(SpriteID sprite) |
|
18 |
{ |
|
19 |
return GetRawSprite(sprite); |
|
20 |
} |
|
21 |
||
22 |
static inline const byte *GetNonSprite(SpriteID sprite) |
|
23 |
{ |
|
24 |
return GetRawSprite(sprite); |
|
25 |
} |
|
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
|
26 |
|
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
|
27 |
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
|
28 |
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
|
29 |
|
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
|
30 |
#endif |