src/station.h
changeset 7992 8ac3fcd8d570
parent 7970 204ece3a05d5
child 7994 d5e8a6a01c4d
equal deleted inserted replaced
7991:05dd904bb306 7992:8ac3fcd8d570
    63 	struct RoadStop  *next;                 ///< Next stop of the given type at this station
    63 	struct RoadStop  *next;                 ///< Next stop of the given type at this station
    64 
    64 
    65 	RoadStop(TileIndex tile = 0);
    65 	RoadStop(TileIndex tile = 0);
    66 	virtual ~RoadStop();
    66 	virtual ~RoadStop();
    67 
    67 
    68 	bool IsValid() const;
    68 	/**
       
    69 	 * Determines whether a road stop exists
       
    70 	 * @return true if and only is the road stop exists
       
    71 	 */
       
    72 	inline bool IsValid() const { return this->xy != 0; }
    69 
    73 
    70 	/* For accessing status */
    74 	/* For accessing status */
    71 	bool HasFreeBay() const;
    75 	bool HasFreeBay() const;
    72 	bool IsFreeBay(uint nr) const;
    76 	bool IsFreeBay(uint nr) const;
    73 	uint AllocateBay();
    77 	uint AllocateBay();
   173 	void MarkTilesDirty(bool cargo_change) const;
   177 	void MarkTilesDirty(bool cargo_change) const;
   174 	bool TileBelongsToRailStation(TileIndex tile) const;
   178 	bool TileBelongsToRailStation(TileIndex tile) const;
   175 	uint GetPlatformLength(TileIndex tile, DiagDirection dir) const;
   179 	uint GetPlatformLength(TileIndex tile, DiagDirection dir) const;
   176 	uint GetPlatformLength(TileIndex tile) const;
   180 	uint GetPlatformLength(TileIndex tile) const;
   177 	bool IsBuoy() const;
   181 	bool IsBuoy() const;
   178 	bool IsValid() const;
   182 
       
   183 	/**
       
   184 	 * Determines whether a station exists
       
   185 	 * @return true if and only is the station exists
       
   186 	 */
       
   187 	inline bool IsValid() const { return this->xy != 0; }
   179 };
   188 };
   180 
   189 
   181 enum StationType {
   190 enum StationType {
   182 	STATION_RAIL,
   191 	STATION_RAIL,
   183 	STATION_AIRPORT,
   192 	STATION_AIRPORT,