2006-05-18 02:43:23 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2008-05-06 15:11:33 +00:00
|
|
|
/** @file newgrf_cargo.h Cargo support for NewGRFs. */
|
2007-03-21 03:06:21 +00:00
|
|
|
|
2006-05-18 02:43:23 +00:00
|
|
|
#ifndef NEWGRF_CARGO_H
|
|
|
|
#define NEWGRF_CARGO_H
|
|
|
|
|
2007-07-25 19:06:29 +00:00
|
|
|
#include "newgrf_callbacks.h"
|
2007-12-21 22:50:51 +00:00
|
|
|
#include "cargo_type.h"
|
2008-01-13 01:21:35 +00:00
|
|
|
#include "gfx_type.h"
|
2007-07-25 19:06:29 +00:00
|
|
|
|
2006-05-18 02:43:23 +00:00
|
|
|
enum {
|
2007-12-06 20:36:46 +00:00
|
|
|
CC_NOAVAILABLE = 0, ///< No cargo class has been specified
|
|
|
|
CC_PASSENGERS = 1 << 0, ///< Passengers
|
|
|
|
CC_MAIL = 1 << 1, ///< Mail
|
|
|
|
CC_EXPRESS = 1 << 2, ///< Express cargo (Goods, Food, Candy, but also possible for passengers)
|
|
|
|
CC_ARMOURED = 1 << 3, ///< Armoured cargo (Valuables, Gold, Diamonds)
|
|
|
|
CC_BULK = 1 << 4, ///< Bulk cargo (Coal, Grain etc., Ores, Fruit)
|
|
|
|
CC_PIECE_GOODS = 1 << 5, ///< Piece goods (Livestock, Wood, Steel, Paper)
|
|
|
|
CC_LIQUID = 1 << 6, ///< Liquids (Oil, Water, Rubber)
|
|
|
|
CC_REFRIGERATED = 1 << 7, ///< Refrigerated cargo (Food, Fruit)
|
2009-01-12 15:21:59 +00:00
|
|
|
CC_HAZARDOUS = 1 << 8, ///< Hazardous cargo (Nuclear Fuel, Explosives, etc.)
|
2007-12-06 20:36:46 +00:00
|
|
|
CC_COVERED = 1 << 9, ///< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.)
|
|
|
|
CC_SPECIAL = 1 << 15 ///< Special bit used for livery refit tricks instead of normal cargoes.
|
2006-05-18 02:43:23 +00:00
|
|
|
};
|
|
|
|
|
2007-02-24 23:36:40 +00:00
|
|
|
static const CargoID CT_DEFAULT = NUM_CARGO + 0;
|
|
|
|
static const CargoID CT_PURCHASE = NUM_CARGO + 1;
|
|
|
|
static const CargoID CT_DEFAULT_NA = NUM_CARGO + 2;
|
2006-05-18 02:43:23 +00:00
|
|
|
|
2007-04-13 19:32:18 +00:00
|
|
|
/* Forward declarations of structs used */
|
2007-03-24 16:09:39 +00:00
|
|
|
struct CargoSpec;
|
2007-04-13 19:32:18 +00:00
|
|
|
struct GRFFile;
|
2007-03-23 20:55:45 +00:00
|
|
|
|
|
|
|
SpriteID GetCustomCargoSprite(const CargoSpec *cs);
|
2007-07-25 19:06:29 +00:00
|
|
|
uint16 GetCargoCallback(CallbackID callback, uint32 param1, uint32 param2, const CargoSpec *cs);
|
2007-10-13 02:23:11 +00:00
|
|
|
CargoID GetCargoTranslation(uint8 cargo, const GRFFile *grffile, bool usebit = false);
|
2007-07-08 17:40:04 +00:00
|
|
|
uint8 GetReverseCargoTranslation(CargoID cargo, const GRFFile *grffile);
|
2007-03-23 20:55:45 +00:00
|
|
|
|
2006-05-18 02:43:23 +00:00
|
|
|
#endif /* NEWGRF_CARGO_H */
|