author | rubidium |
Thu, 01 Feb 2007 15:49:12 +0000 | |
changeset 5893 | 7e431a4abebb |
parent 5587 | 167d9a91ef02 |
child 6247 | 7d81e3a5d803 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
1349
15979a2e9001
(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 |
15979a2e9001
(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 |
15979a2e9001
(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
fd0136012af1
(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 { |
fd0136012af1
(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; |
fd0136012af1
(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
fd5b13fafff3
(svn r1860) The sprite header endianness issue was solved in r1855
tron
parents:
1352
diff
changeset
|
9 |
uint16 width; |
fd5b13fafff3
(svn r1860) The sprite header endianness issue was solved in r1855
tron
parents:
1352
diff
changeset
|
10 |
int16 x_offs; |
fd5b13fafff3
(svn r1860) The sprite header endianness issue was solved in r1855
tron
parents:
1352
diff
changeset
|
11 |
int16 y_offs; |
1350
fd0136012af1
(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]; |
fd0136012af1
(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; |
fd0136012af1
(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); |
3565
ef0a9ef56fa0
(svn r4446) - Add function to determine if a Sprite ID exists.
peter1138
parents:
2436
diff
changeset
|
16 |
bool SpriteExists(SpriteID sprite); |
1361 | 17 |
|
18 |
static inline const Sprite *GetSprite(SpriteID sprite) |
|
19 |
{ |
|
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
20 |
return (Sprite*)GetRawSprite(sprite); |
1361 | 21 |
} |
22 |
||
23 |
static inline const byte *GetNonSprite(SpriteID sprite) |
|
24 |
{ |
|
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
25 |
return (byte*)GetRawSprite(sprite); |
1361 | 26 |
} |
1349
15979a2e9001
(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 |
|
2340
e18ef06bc59a
(svn r2866) Move all functions and tables which aren't directly involved in managing the sprite heap to a new file gfxinit.c.
tron
parents:
2319
diff
changeset
|
28 |
void GfxInitSpriteMem(void); |
1349
15979a2e9001
(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 |
void IncreaseSpriteLRU(void); |
15979a2e9001
(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 |
|
2340
e18ef06bc59a
(svn r2866) Move all functions and tables which aren't directly involved in managing the sprite heap to a new file gfxinit.c.
tron
parents:
2319
diff
changeset
|
31 |
bool LoadNextSprite(int load_index, byte file_index); |
5587
167d9a91ef02
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5475
diff
changeset
|
32 |
void DupSprite(SpriteID old_spr, SpriteID new_spr); |
2340
e18ef06bc59a
(svn r2866) Move all functions and tables which aren't directly involved in managing the sprite heap to a new file gfxinit.c.
tron
parents:
2319
diff
changeset
|
33 |
void SkipSprites(uint count); |
e18ef06bc59a
(svn r2866) Move all functions and tables which aren't directly involved in managing the sprite heap to a new file gfxinit.c.
tron
parents:
2319
diff
changeset
|
34 |
|
2436
7d5df545bd5d
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2407
diff
changeset
|
35 |
#endif /* SPRITECACHE_H */ |