1
0
Fork 0

(svn r16758) -Document: some station related types/enums

release/1.0
rubidium 2009-07-07 11:21:14 +00:00
parent 2fcb588c87
commit b350c5faef
1 changed files with 22 additions and 18 deletions

View File

@ -34,23 +34,26 @@ enum RoadStopType {
ROADSTOP_TRUCK ///< A standard stop for trucks ROADSTOP_TRUCK ///< A standard stop for trucks
}; };
/** The facilities a station might be having */
enum StationFacility { enum StationFacility {
FACIL_TRAIN = 0x01, FACIL_NONE = 0, ///< The station has no facilities at all
FACIL_TRUCK_STOP = 0x02, FACIL_TRAIN = 1 << 0, ///< Station with train station
FACIL_BUS_STOP = 0x04, FACIL_TRUCK_STOP = 1 << 1, ///< Station with truck stops
FACIL_AIRPORT = 0x08, FACIL_BUS_STOP = 1 << 2, ///< Station with bus stops
FACIL_DOCK = 0x10, FACIL_AIRPORT = 1 << 3, ///< Station with an airport
FACIL_DOCK = 1 << 4, ///< Station with a dock
}; };
DECLARE_ENUM_AS_BIT_SET(StationFacility); DECLARE_ENUM_AS_BIT_SET(StationFacility);
typedef SimpleTinyEnumT<StationFacility, byte> StationFacilityByte; typedef SimpleTinyEnumT<StationFacility, byte> StationFacilityByte;
/** The vehicles that may have visited a station */
enum StationHadVehicleOfType { enum StationHadVehicleOfType {
// HVOT_PENDING_DELETE = 1 << 0, // not needed anymore HVOT_NONE = 0, ///< Station has seen no vehicles
HVOT_TRAIN = 1 << 1, HVOT_TRAIN = 1 << 1, ///< Station has seen a train
HVOT_BUS = 1 << 2, HVOT_BUS = 1 << 2, ///< Station has seen a bus
HVOT_TRUCK = 1 << 3, HVOT_TRUCK = 1 << 3, ///< Station has seen a truck
HVOT_AIRCRAFT = 1 << 4, HVOT_AIRCRAFT = 1 << 4, ///< Station has seen an aircraft
HVOT_SHIP = 1 << 5, HVOT_SHIP = 1 << 5, ///< Station has seen a ship
/* This bit is used to mark stations. No, it does not belong here, but what /* This bit is used to mark stations. No, it does not belong here, but what
* can we do? ;-) */ * can we do? ;-) */
HVOT_BUOY = 1 << 6 HVOT_BUOY = 1 << 6
@ -58,16 +61,17 @@ enum StationHadVehicleOfType {
DECLARE_ENUM_AS_BIT_SET(StationHadVehicleOfType); DECLARE_ENUM_AS_BIT_SET(StationHadVehicleOfType);
typedef SimpleTinyEnumT<StationHadVehicleOfType, byte> StationHadVehicleOfTypeByte; typedef SimpleTinyEnumT<StationHadVehicleOfType, byte> StationHadVehicleOfTypeByte;
/** The different catchment areas used */
enum CatchmentArea { enum CatchmentArea {
CA_NONE = 0, CA_NONE = 0, ///< Catchment when the station has no facilities
CA_BUS = 3, CA_BUS = 3, ///< Catchment for bus stops with "modified catchment" enabled
CA_TRUCK = 3, CA_TRUCK = 3, ///< Catchment for truck stops with "modified catchment" enabled
CA_TRAIN = 4, CA_TRAIN = 4, ///< Catchment for train stations with "modified catchment" enabled
CA_DOCK = 5, CA_DOCK = 5, ///< Catchment for docks with "modified catchment" enabled
CA_UNMODIFIED = 4, ///< Used when _settings_game.station.modified_catchment is false CA_UNMODIFIED = 4, ///< Catchment for all stations with "modified catchment" disabled
MAX_CATCHMENT = 10, ///< Airports have a catchment up to this number. MAX_CATCHMENT = 10, ///< Maximum catchment for airports with "modified catchment" enabled
}; };
enum { enum {