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