10 #ifndef NEWGRF_CARGO_H
11 #define NEWGRF_CARGO_H
33 uint16_t GetCargoCallback(
CallbackID callback, uint32_t param1, uint32_t param2,
const CargoSpec *cs);
Types related to cargoes...
uint8_t CargoID
Cargo slots to indicate a cargo type within a game.
static const CargoID NUM_CARGO
Maximum number of cargo types in a game.
Types related to the graphics and/or input devices.
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
Sprite Group Cargo types.
static constexpr CargoID SG_DEFAULT
Default type used when no more-specific cargo matches.
static constexpr CargoID SG_PURCHASE
Used in purchase lists before an item exists.
static constexpr CargoID SG_DEFAULT_NA
Used only by stations and roads when no more-specific cargo matches.
Callbacks that NewGRFs could implement.
CallbackID
List of implemented NewGRF callbacks.
std::span< const CargoLabel > GetDefaultCargoTranslationTable(uint8_t grf_version)
Get default cargo translation table for a NewGRF, used if the NewGRF does not provide its own.
SpriteID GetCustomCargoSprite(const CargoSpec *cs)
Get the custom sprite for the given cargo type.
CargoID GetCargoTranslation(uint8_t cargo, const GRFFile *grffile, bool usebit=false)
Translate a GRF-local cargo slot/bitnum into a CargoID.
Specification of a cargo type.
Dynamic data of a loaded NewGRF.