author | truelight |
Thu, 24 Mar 2005 14:43:40 +0000 | |
changeset 1540 | 6eef12dab5bf |
parent 1477 | 9389baf2bf3c |
child 2186 | db48cf29b983 |
permissions | -rw-r--r-- |
455 | 1 |
#ifndef NEWGRF_H |
2 |
#define NEWGRF_H |
|
3 |
||
463
97ec66c280f2
(svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents:
455
diff
changeset
|
4 |
#include "sprite.h" |
97ec66c280f2
(svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents:
455
diff
changeset
|
5 |
#include "station.h" |
97ec66c280f2
(svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents:
455
diff
changeset
|
6 |
|
1477 | 7 |
typedef struct GRFFile GRFFile; |
455 | 8 |
struct GRFFile { |
9 |
char *filename; |
|
10 |
uint32 grfid; |
|
11 |
uint16 flags; |
|
12 |
uint16 sprite_offset; |
|
1477 | 13 |
GRFFile *next; |
455 | 14 |
|
15 |
/* A sprite group contains all sprites of a given vehicle (or multiple |
|
16 |
* vehicles) when carrying given cargo. It consists of several sprite |
|
17 |
* sets. Group ids are refered as "cargo id"s by TTDPatch |
|
18 |
* documentation, contributing to the global confusion. |
|
19 |
* |
|
20 |
* A sprite set contains all sprites of a given vehicle carrying given |
|
21 |
* cargo at a given *stage* - that is usually its load stage. Ie. you |
|
22 |
* can have a spriteset for an empty wagon, wagon full of coal, |
|
23 |
* half-filled wagon etc. Each spriteset contains eight sprites (one |
|
24 |
* per direction) or four sprites if the vehicle is symmetric. */ |
|
25 |
||
26 |
int spriteset_start; |
|
27 |
int spriteset_numsets; |
|
28 |
int spriteset_numents; |
|
29 |
int spriteset_feature; |
|
30 |
||
31 |
int spritegroups_count; |
|
1477 | 32 |
SpriteGroup *spritegroups; |
455 | 33 |
|
1477 | 34 |
StationSpec stations[256]; |
455 | 35 |
}; |
36 |
||
37 |
extern int _grffile_count; |
|
1477 | 38 |
extern GRFFile *_first_grffile; |
455 | 39 |
|
463
97ec66c280f2
(svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents:
455
diff
changeset
|
40 |
void InitNewGRFFile(const char *filename, int sprite_offset); |
97ec66c280f2
(svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents:
455
diff
changeset
|
41 |
void DecodeSpecialSprite(const char *filename, int num, int spriteid, int stage); |
97ec66c280f2
(svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents:
455
diff
changeset
|
42 |
|
455 | 43 |
|
44 |
#endif /* NEWGRF_H */ |
|
45 |