peter1138@6417: /* $Id$ */ peter1138@6417: belugas@6449: /** @file cargotype.h */ belugas@6449: peter1138@6417: #ifndef CARGOTYPE_H peter1138@6417: #define CARGOTYPE_H peter1138@6417: peter1138@6417: peter1138@6417: typedef uint32 CargoLabel; peter1138@6417: peter1138@6417: peter1138@6417: typedef struct CargoSpec { peter1138@6417: uint8 bitnum; peter1138@6417: CargoLabel label; peter1138@6417: uint32 grfid; peter1138@6417: uint8 legend_colour; peter1138@6417: uint8 rating_colour; peter1138@6417: uint8 weight; peter1138@6417: uint16 initial_payment; peter1138@6417: uint8 transit_days[2]; peter1138@6417: peter1138@6417: bool is_freight; peter1138@6417: uint8 substitutetowngrowth; peter1138@6417: uint16 multipliertowngrowth; peter1138@6417: uint8 callbackflags; peter1138@6417: peter1138@6417: StringID name; peter1138@6417: StringID name_plural; peter1138@6417: StringID units_volume; peter1138@6417: StringID quantifier; peter1138@6417: StringID abbrev; peter1138@6417: peter1138@6417: SpriteID sprite; peter1138@6417: peter1138@6417: uint16 classes; peter1138@6448: peter1138@6448: bool IsValid() const; peter1138@6417: } CargoSpec; peter1138@6417: peter1138@6417: peter1138@6439: extern uint32 _cargo_mask; peter1138@6439: peter1138@6439: peter1138@6417: /* Set up the default cargo types for the given landscape type */ peter1138@6417: void SetupCargoForClimate(LandscapeID l); peter1138@6417: /* Retrieve cargo details for the given cargo ID */ peter1138@6417: const CargoSpec *GetCargo(CargoID c); peter1138@6439: /* Get the cargo ID of a cargo bitnum */ peter1138@6439: CargoID GetCargoIDByBitnum(byte bitnum); peter1138@6439: peter1138@6417: peter1138@6417: #endif /* CARGOTYPE_H */