author | matthijs |
Wed, 22 Mar 2006 22:26:16 +0000 | |
branch | 0.4.5 |
changeset 9958 | bed516c67d61 |
parent 2766 | 7658ddad65b9 |
child 3501 | cf7d2c33e7fc |
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; |
|
2625
66b3d632dcd2
(svn r3167) - NewGRF: Start moving custom station code to separate files.
peter1138
parents:
2548
diff
changeset
|
15 |
SpriteID first_spriteset; ///< Holds the first spriteset's sprite offset. |
1477 | 16 |
GRFFile *next; |
455 | 17 |
|
18 |
/* A sprite group contains all sprites of a given vehicle (or multiple |
|
19 |
* vehicles) when carrying given cargo. It consists of several sprite |
|
20 |
* sets. Group ids are refered as "cargo id"s by TTDPatch |
|
21 |
* documentation, contributing to the global confusion. |
|
22 |
* |
|
23 |
* A sprite set contains all sprites of a given vehicle carrying given |
|
24 |
* cargo at a given *stage* - that is usually its load stage. Ie. you |
|
25 |
* can have a spriteset for an empty wagon, wagon full of coal, |
|
26 |
* half-filled wagon etc. Each spriteset contains eight sprites (one |
|
27 |
* per direction) or four sprites if the vehicle is symmetric. */ |
|
28 |
||
29 |
int spriteset_start; |
|
30 |
int spriteset_numsets; |
|
31 |
int spriteset_numents; |
|
32 |
int spriteset_feature; |
|
33 |
||
34 |
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
|
35 |
SpriteGroup **spritegroups; |
455 | 36 |
|
1477 | 37 |
StationSpec stations[256]; |
2345 | 38 |
|
39 |
uint32 param[0x80]; |
|
40 |
uint param_end; /// one more than the highest set parameter |
|
455 | 41 |
}; |
42 |
||
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 */ |