blob: 0e43795173703851d7784b740e8122b513622ae7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/* $Id$ */
/** @file cargotype.h */
#ifndef CARGOTYPE_H
#define CARGOTYPE_H
typedef uint32 CargoLabel;
typedef struct CargoSpec {
uint8 bitnum;
CargoLabel label;
uint32 grfid;
uint8 legend_colour;
uint8 rating_colour;
uint8 weight;
uint16 initial_payment;
uint8 transit_days[2];
bool is_freight;
uint8 substitutetowngrowth;
uint16 multipliertowngrowth;
uint8 callbackflags;
StringID name;
StringID name_plural;
StringID units_volume;
StringID quantifier;
StringID abbrev;
SpriteID sprite;
uint16 classes;
bool IsValid() const;
} CargoSpec;
extern uint32 _cargo_mask;
/* Set up the default cargo types for the given landscape type */
void SetupCargoForClimate(LandscapeID l);
/* Retrieve cargo details for the given cargo ID */
const CargoSpec *GetCargo(CargoID c);
/* Get the cargo ID of a cargo bitnum */
CargoID GetCargoIDByBitnum(byte bitnum);
#endif /* CARGOTYPE_H */
|