author | tron |
Sat, 22 Oct 2005 06:39:32 +0000 | |
changeset 2548 | 97ada3bd2702 |
parent 2444 | e618726432a4 |
child 2625 | 66b3d632dcd2 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
455 | 3 |
#ifndef NEWGRF_H |
4 |
#define NEWGRF_H |
|
5 |
||
463
91bcad840bcd
(svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents:
455
diff
changeset
|
6 |
#include "sprite.h" |
91bcad840bcd
(svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents:
455
diff
changeset
|
7 |
#include "station.h" |
91bcad840bcd
(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; |
|
2444
e618726432a4
(svn r2970) - Newgrf: Allocate spritegroups dynamically; this allows a cargo ID to reference the previous definition of the same cargo ID, instead of causing loops.
peter1138
parents:
2345
diff
changeset
|
34 |
SpriteGroup **spritegroups; |
455 | 35 |
|
1477 | 36 |
StationSpec stations[256]; |
2345 | 37 |
|
38 |
uint32 param[0x80]; |
|
39 |
uint param_end; /// one more than the highest set parameter |
|
455 | 40 |
}; |
41 |
||
42 |
extern int _grffile_count; |
|
1477 | 43 |
extern GRFFile *_first_grffile; |
455 | 44 |
|
463
91bcad840bcd
(svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly.
pasky
parents:
455
diff
changeset
|
45 |
|
2342
c19fb4f2df30
(svn r2868) Change the way NewGRFs are loaded: The loading process i no longer bolted onto the normal graphics loading.
tron
parents:
2186
diff
changeset
|
46 |
void LoadNewGRF(uint load_index, uint file_index); |
455 | 47 |
|
48 |
#endif /* NEWGRF_H */ |