src/cargotype.h
branchcpp_gui
changeset 6268 4b5241e5dd10
child 6298 c30fe89622df
equal deleted inserted replaced
6267:7c8ec33959b1 6268:4b5241e5dd10
       
     1 /* $Id$ */
       
     2 
       
     3 /** @file cargotype.h */
       
     4 
       
     5 #ifndef CARGOTYPE_H
       
     6 #define CARGOTYPE_H
       
     7 
       
     8 
       
     9 typedef uint32 CargoLabel;
       
    10 
       
    11 
       
    12 typedef struct CargoSpec {
       
    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;
       
    38 } CargoSpec;
       
    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 */