author | KUDr |
Mon, 26 Mar 2007 21:31:37 +0000 | |
branch | cpp_gui |
changeset 6302 | bd80897189ba |
parent 6298 | c30fe89622df |
child 6303 | 84c215fc8eb8 |
permissions | -rw-r--r-- |
6268 | 1 |
/* $Id$ */ |
2 |
||
3 |
/** @file cargotype.h */ |
|
4 |
||
5 |
#ifndef CARGOTYPE_H |
|
6 |
#define CARGOTYPE_H |
|
7 |
||
8 |
||
9 |
typedef uint32 CargoLabel; |
|
10 |
||
11 |
||
6298
c30fe89622df
(svn r9119) [cpp_gui] -Sync with trunk (r9003:9100)
bjarni
parents:
6268
diff
changeset
|
12 |
struct CargoSpec { |
6268 | 13 |
uint8 bitnum; |
14 |
CargoLabel label; |
|
15 |
uint32 grfid; |
|
16 |
uint8 legend_colour; |
|
17 |
uint8 rating_colour; |
|
18 |
uint8 weight; |
|
19 |
uint16 initial_payment; |
|
20 |
uint8 transit_days[2]; |
|
21 |
||
22 |
bool is_freight; |
|
23 |
uint8 substitutetowngrowth; |
|
24 |
uint16 multipliertowngrowth; |
|
25 |
uint8 callbackflags; |
|
26 |
||
27 |
StringID name; |
|
28 |
StringID name_plural; |
|
29 |
StringID units_volume; |
|
30 |
StringID quantifier; |
|
31 |
StringID abbrev; |
|
32 |
||
33 |
SpriteID sprite; |
|
34 |
||
35 |
uint16 classes; |
|
36 |
||
37 |
bool IsValid() const; |
|
6298
c30fe89622df
(svn r9119) [cpp_gui] -Sync with trunk (r9003:9100)
bjarni
parents:
6268
diff
changeset
|
38 |
}; |
6268 | 39 |
|
40 |
||
41 |
extern uint32 _cargo_mask; |
|
42 |
||
43 |
||
44 |
/* Set up the default cargo types for the given landscape type */ |
|
45 |
void SetupCargoForClimate(LandscapeID l); |
|
46 |
/* Retrieve cargo details for the given cargo ID */ |
|
47 |
const CargoSpec *GetCargo(CargoID c); |
|
48 |
/* Get the cargo ID with the cargo label */ |
|
49 |
CargoID GetCargoIDByLabel(CargoLabel cl); |
|
50 |
||
51 |
||
52 |
#endif /* CARGOTYPE_H */ |