Files
@ r7882:cdf03a4ac84a
Branch filter:
Location: cpp/openttd-patchpack/source/src/cargotype.h - annotation
r7882:cdf03a4ac84a
1.2 KiB
text/x-c
(svn r11433) -Fix: starting OpenTTD with DOS files made it look weird out of the box.
-Change: make extra sprites (the ones not in the TTD GRFs) replaceable using Action 5.
-Feature: make replacing contiguous subsets of sprites in for some types possible in Action 5.
Note to GRF authors: when you replaced OpenTTD sprites that are not from the TTD GRF files using Action A, your GRF will not have the intended result anymore as the sprite numbers have changed. You should replace the Action A with an Action 5 from now on.
-Change: make extra sprites (the ones not in the TTD GRFs) replaceable using Action 5.
-Feature: make replacing contiguous subsets of sprites in for some types possible in Action 5.
Note to GRF authors: when you replaced OpenTTD sprites that are not from the TTD GRF files using Action A, your GRF will not have the intended result anymore as the sprite numbers have changed. You should replace the Action A with an Action 5 from now on.
r6091:2faa7d307565 r6091:2faa7d307565 r6123:049e9624d068 r6123:049e9624d068 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6311:78f38fcd68ca r6311:78f38fcd68ca r6311:78f38fcd68ca r6311:78f38fcd68ca r6311:78f38fcd68ca r6311:78f38fcd68ca r6311:78f38fcd68ca r6311:78f38fcd68ca r6311:78f38fcd68ca r6091:2faa7d307565 r6248:b940b09d7ab8 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6311:78f38fcd68ca r6091:2faa7d307565 r6359:99cac4de410b r6091:2faa7d307565 r6091:2faa7d307565 r7287:30755c9bfe22 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6365:410001496130 r6122:508316e17f8e r6122:508316e17f8e r6248:b940b09d7ab8 r6091:2faa7d307565 r6091:2faa7d307565 r6113:c77736e8b915 r6359:99cac4de410b r6113:c77736e8b915 r6113:c77736e8b915 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6091:2faa7d307565 r6143:9ed364174dfd r6143:9ed364174dfd r6460:74b53af67ae0 r6113:c77736e8b915 r6329:73b25d0f4ee2 r6329:73b25d0f4ee2 r6335:0f64aac189b1 r6329:73b25d0f4ee2 r6329:73b25d0f4ee2 r6091:2faa7d307565 r6091:2faa7d307565 | /* $Id$ */
/** @file cargotype.h */
#ifndef CARGOTYPE_H
#define CARGOTYPE_H
typedef uint32 CargoLabel;
enum TownEffect {
TE_NONE,
TE_PASSENGERS,
TE_MAIL,
TE_GOODS,
TE_WATER,
TE_FOOD,
};
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;
TownEffect town_effect; ///< The effect this cargo type has on towns
uint16 multipliertowngrowth;
uint8 callback_mask;
StringID name;
StringID name_single;
StringID units_volume;
StringID quantifier;
StringID abbrev;
SpriteID sprite;
uint16 classes;
const struct SpriteGroup *group;
bool IsValid() const;
};
extern uint32 _cargo_mask;
extern CargoSpec _cargo[NUM_CARGO];
/* 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 with the cargo label */
CargoID GetCargoIDByLabel(CargoLabel cl);
CargoID GetCargoIDByBitnum(uint8 bitnum);
static inline bool IsCargoInClass(CargoID c, uint16 cc)
{
return (GetCargo(c)->classes & cc) != 0;
}
#endif /* CARGOTYPE_H */
|