2007-02-20 22:09:21 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2007-02-23 11:50:43 +00:00
|
|
|
/** @file cargotype.h */
|
|
|
|
|
2007-02-20 22:09:21 +00:00
|
|
|
#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;
|
2007-02-23 09:56:20 +00:00
|
|
|
|
|
|
|
bool IsValid() const;
|
2007-02-20 22:09:21 +00:00
|
|
|
} CargoSpec;
|
|
|
|
|
|
|
|
|
2007-02-22 22:09:51 +00:00
|
|
|
extern uint32 _cargo_mask;
|
|
|
|
|
|
|
|
|
2007-02-20 22:09:21 +00:00
|
|
|
/* 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);
|
2007-02-24 19:36:47 +00:00
|
|
|
/* Get the cargo ID with the cargo label */
|
|
|
|
CargoID GetCargoIDByLabel(CargoLabel cl);
|
2007-02-22 22:09:51 +00:00
|
|
|
|
2007-02-20 22:09:21 +00:00
|
|
|
|
|
|
|
#endif /* CARGOTYPE_H */
|