Files
@ r18114:26bb448df359
Branch filter:
Location: cpp/openttd-patchpack/source/src/station_type.h - annotation
r18114:26bb448df359
3.8 KiB
text/x-c
(svn r22949) -Fix [FS#4784]: Locale categories LC_NUMERIC and LC_MONETARY of cy_GB are identical to en_GB.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r12768:980ae0491352 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r13576:265d01d56c18 r14156:7136b6af34ec r12309:02ac22c76734 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r12415:2dc88f0e33b4 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8787:4e60a460f8ef r12528:f4d1c0776108 r8769:6c1f27d01bf5 r11640:aa6c71abbdce r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r10260:88d82a40120c r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r12425:833b231d2630 r12425:833b231d2630 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r8785:8312063c5ee4 r8785:8312063c5ee4 r8785:8312063c5ee4 r8785:8312063c5ee4 r8785:8312063c5ee4 r8785:8312063c5ee4 r12328:d35b3bf12ad6 r12309:02ac22c76734 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12432:c48499a7baa0 r8769:6c1f27d01bf5 r14900:c679fdaeebe6 r12309:02ac22c76734 r8769:6c1f27d01bf5 r12328:d35b3bf12ad6 r12309:02ac22c76734 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12462:a7cb564c6c56 r12462:a7cb564c6c56 r8769:6c1f27d01bf5 r14900:c679fdaeebe6 r12309:02ac22c76734 r8769:6c1f27d01bf5 r12328:d35b3bf12ad6 r8769:6c1f27d01bf5 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r12328:d35b3bf12ad6 r8769:6c1f27d01bf5 r12328:d35b3bf12ad6 r8769:6c1f27d01bf5 r12328:d35b3bf12ad6 r8769:6c1f27d01bf5 r8769:6c1f27d01bf5 r17569:79cc833a8f35 r9913:5ef437117969 r13576:265d01d56c18 r13576:265d01d56c18 r13576:265d01d56c18 r13576:265d01d56c18 r13576:265d01d56c18 r13576:265d01d56c18 r13576:265d01d56c18 r14157:8722b3bbfc4d r13576:265d01d56c18 r13576:265d01d56c18 r13576:265d01d56c18 r13576:265d01d56c18 r14157:8722b3bbfc4d r13576:265d01d56c18 r14157:8722b3bbfc4d r13576:265d01d56c18 r13576:265d01d56c18 r13576:265d01d56c18 r8769:6c1f27d01bf5 | /* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file station_type.h Types related to stations. */
#ifndef STATION_TYPE_H
#define STATION_TYPE_H
#include "core/smallvec_type.hpp"
#include "tilearea_type.h"
typedef uint16 StationID;
typedef uint16 RoadStopID;
struct BaseStation;
struct Station;
struct RoadStop;
struct StationSpec;
struct Waypoint;
static const StationID NEW_STATION = 0xFFFE;
static const StationID INVALID_STATION = 0xFFFF;
/** Station types */
enum StationType {
STATION_RAIL,
STATION_AIRPORT,
STATION_TRUCK,
STATION_BUS,
STATION_OILRIG,
STATION_DOCK,
STATION_BUOY,
STATION_WAYPOINT,
};
/** Types of RoadStops */
enum RoadStopType {
ROADSTOP_BUS, ///< A standard stop for buses
ROADSTOP_TRUCK ///< A standard stop for trucks
};
/** The facilities a station might be having */
enum StationFacility {
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
FACIL_WAYPOINT = 1 << 7, ///< Station is a waypoint
};
DECLARE_ENUM_AS_BIT_SET(StationFacility)
typedef SimpleTinyEnumT<StationFacility, byte> StationFacilityByte;
/** The vehicles that may have visited a station */
enum StationHadVehicleOfType {
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
HVOT_WAYPOINT = 1 << 6, ///< Station is a waypoint (NewGRF only!)
};
DECLARE_ENUM_AS_BIT_SET(StationHadVehicleOfType)
typedef SimpleTinyEnumT<StationHadVehicleOfType, byte> StationHadVehicleOfTypeByte;
/** The different catchment areas used */
enum CatchmentArea {
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
CA_UNMODIFIED = 4, ///< Catchment for all stations with "modified catchment" disabled
MAX_CATCHMENT = 10, ///< Maximum catchment for airports with "modified catchment" enabled
};
static const uint MAX_LENGTH_STATION_NAME_CHARS = 32; ///< The maximum length of a station name in characters including '\0'
/** List of stations */
typedef SmallVector<Station *, 2> StationList;
/**
* Structure contains cached list of stations nearby. The list
* is created upon first call to GetStations()
*/
class StationFinder : TileArea {
StationList stations; ///< List of stations nearby
public:
/**
* Constructs StationFinder
* @param area the area to search from
*/
StationFinder(const TileArea &area) : TileArea(area) {}
const StationList *GetStations();
};
#endif /* STATION_TYPE_H */
|