2008-03-28 17:33:28 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
/** @file station_type.h Types related to stations. */
|
|
|
|
|
|
|
|
#ifndef STATION_TYPE_H
|
|
|
|
#define STATION_TYPE_H
|
|
|
|
|
2009-07-04 13:26:57 +02:00
|
|
|
#include "core/enum_type.hpp"
|
|
|
|
|
2008-03-28 17:33:28 +01:00
|
|
|
typedef uint16 StationID;
|
|
|
|
typedef uint16 RoadStopID;
|
|
|
|
|
2009-07-17 21:44:13 +02:00
|
|
|
struct BaseStation;
|
2008-03-28 17:33:28 +01:00
|
|
|
struct Station;
|
|
|
|
struct RoadStop;
|
2008-03-31 08:42:26 +02:00
|
|
|
struct StationSpec;
|
2008-03-28 17:33:28 +01:00
|
|
|
|
2009-04-11 00:47:19 +02:00
|
|
|
static const StationID NEW_STATION = 0xFFFE;
|
2008-03-28 17:33:28 +01:00
|
|
|
static const StationID INVALID_STATION = 0xFFFF;
|
|
|
|
|
2008-10-19 17:39:12 +02:00
|
|
|
/** Station types */
|
2008-03-28 17:33:28 +01:00
|
|
|
enum StationType {
|
|
|
|
STATION_RAIL,
|
|
|
|
STATION_AIRPORT,
|
|
|
|
STATION_TRUCK,
|
|
|
|
STATION_BUS,
|
|
|
|
STATION_OILRIG,
|
|
|
|
STATION_DOCK,
|
2009-07-18 12:01:31 +02:00
|
|
|
STATION_BUOY,
|
|
|
|
STATION_WAYPOINT,
|
2008-03-28 17:33:28 +01:00
|
|
|
};
|
|
|
|
|
2008-03-31 02:06:17 +02:00
|
|
|
/** Types of RoadStops */
|
|
|
|
enum RoadStopType {
|
|
|
|
ROADSTOP_BUS, ///< A standard stop for buses
|
|
|
|
ROADSTOP_TRUCK ///< A standard stop for trucks
|
|
|
|
};
|
|
|
|
|
2009-07-07 13:21:14 +02:00
|
|
|
/** The facilities a station might be having */
|
2009-07-04 13:26:57 +02:00
|
|
|
enum StationFacility {
|
2009-07-07 13:21:14 +02:00
|
|
|
FACIL_NONE = 0, ///< The station has no facilities at all
|
|
|
|
FACIL_TRAIN = 1 << 0, ///< Station with train station
|
|
|
|
FACIL_TRUCK_STOP = 1 << 1, ///< Station with truck stops
|
|
|
|
FACIL_BUS_STOP = 1 << 2, ///< Station with bus stops
|
|
|
|
FACIL_AIRPORT = 1 << 3, ///< Station with an airport
|
|
|
|
FACIL_DOCK = 1 << 4, ///< Station with a dock
|
2009-07-18 20:39:17 +02:00
|
|
|
FACIL_WAYPOINT = 1 << 7, ///< Station is a waypoint
|
2008-03-28 17:33:28 +01:00
|
|
|
};
|
2009-07-04 13:26:57 +02:00
|
|
|
DECLARE_ENUM_AS_BIT_SET(StationFacility);
|
|
|
|
typedef SimpleTinyEnumT<StationFacility, byte> StationFacilityByte;
|
2008-03-28 17:33:28 +01:00
|
|
|
|
2009-07-07 13:21:14 +02:00
|
|
|
/** The vehicles that may have visited a station */
|
2009-07-04 13:26:57 +02:00
|
|
|
enum StationHadVehicleOfType {
|
2009-07-07 13:21:14 +02:00
|
|
|
HVOT_NONE = 0, ///< Station has seen no vehicles
|
|
|
|
HVOT_TRAIN = 1 << 1, ///< Station has seen a train
|
|
|
|
HVOT_BUS = 1 << 2, ///< Station has seen a bus
|
|
|
|
HVOT_TRUCK = 1 << 3, ///< Station has seen a truck
|
|
|
|
HVOT_AIRCRAFT = 1 << 4, ///< Station has seen an aircraft
|
|
|
|
HVOT_SHIP = 1 << 5, ///< Station has seen a ship
|
2008-03-28 17:33:28 +01:00
|
|
|
/* This bit is used to mark stations. No, it does not belong here, but what
|
|
|
|
* can we do? ;-) */
|
|
|
|
HVOT_BUOY = 1 << 6
|
|
|
|
};
|
2009-07-04 13:26:57 +02:00
|
|
|
DECLARE_ENUM_AS_BIT_SET(StationHadVehicleOfType);
|
|
|
|
typedef SimpleTinyEnumT<StationHadVehicleOfType, byte> StationHadVehicleOfTypeByte;
|
2008-03-28 17:33:28 +01:00
|
|
|
|
2009-07-07 13:21:14 +02:00
|
|
|
/** The different catchment areas used */
|
2008-03-28 17:33:28 +01:00
|
|
|
enum CatchmentArea {
|
2009-07-07 13:21:14 +02:00
|
|
|
CA_NONE = 0, ///< Catchment when the station has no facilities
|
|
|
|
CA_BUS = 3, ///< Catchment for bus stops with "modified catchment" enabled
|
|
|
|
CA_TRUCK = 3, ///< Catchment for truck stops with "modified catchment" enabled
|
|
|
|
CA_TRAIN = 4, ///< Catchment for train stations with "modified catchment" enabled
|
|
|
|
CA_DOCK = 5, ///< Catchment for docks with "modified catchment" enabled
|
2008-03-28 17:33:28 +01:00
|
|
|
|
2009-07-07 13:21:14 +02:00
|
|
|
CA_UNMODIFIED = 4, ///< Catchment for all stations with "modified catchment" disabled
|
2008-03-28 17:33:28 +01:00
|
|
|
|
2009-07-07 13:21:14 +02:00
|
|
|
MAX_CATCHMENT = 10, ///< Maximum catchment for airports with "modified catchment" enabled
|
2008-03-28 17:33:28 +01:00
|
|
|
};
|
|
|
|
|
2008-08-13 08:05:01 +02:00
|
|
|
enum {
|
|
|
|
MAX_LENGTH_STATION_NAME_BYTES = 31, ///< The maximum length of a station name in bytes including '\0'
|
|
|
|
MAX_LENGTH_STATION_NAME_PIXELS = 180, ///< The maximum length of a station name in pixels
|
|
|
|
};
|
|
|
|
|
2008-03-28 17:33:28 +01:00
|
|
|
#endif /* STATION_TYPE_H */
|