2005-07-24 15:12:37 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-07-22 11:18:19 +01:00
|
|
|
/** @file waypoint_base.h Base of waypoints. */
|
2007-04-06 05:10:19 +01:00
|
|
|
|
2005-03-24 17:03:37 +00:00
|
|
|
#ifndef WAYPOINT_H
|
|
|
|
#define WAYPOINT_H
|
|
|
|
|
2008-03-28 16:41:12 +00:00
|
|
|
#include "waypoint_type.h"
|
2009-07-16 21:29:08 +01:00
|
|
|
#include "station_base.h"
|
2005-03-24 17:03:37 +00:00
|
|
|
|
2009-07-22 09:59:57 +01:00
|
|
|
struct Waypoint : SpecializedStation<Waypoint, true> {
|
2008-02-16 16:40:47 +00:00
|
|
|
uint16 town_cn; ///< The Nth waypoint for this town (consecutive number)
|
2005-03-24 17:03:37 +00:00
|
|
|
|
2009-07-18 19:39:17 +01:00
|
|
|
Waypoint(TileIndex tile = INVALID_TILE) : SpecializedStation<Waypoint, true>(tile) { }
|
2007-08-02 13:22:40 +01:00
|
|
|
~Waypoint();
|
2009-07-13 23:33:25 +01:00
|
|
|
|
|
|
|
void UpdateVirtCoord();
|
2009-07-17 21:21:24 +01:00
|
|
|
|
2009-07-17 22:06:06 +01:00
|
|
|
/* virtual */ FORCEINLINE bool TileBelongsToRailStation(TileIndex tile) const
|
|
|
|
{
|
2009-07-22 09:59:57 +01:00
|
|
|
return IsRailWaypointTile(tile) && GetStationIndex(tile) == this->index;
|
2009-07-17 22:06:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* virtual */ uint32 GetNewGRFVariable(const struct ResolverObject *object, byte variable, byte parameter, bool *available) const;
|
|
|
|
|
2009-07-21 12:11:05 +01:00
|
|
|
/* virtual */ void GetTileArea(TileArea *ta, StationType type) const;
|
2007-08-02 13:22:40 +01:00
|
|
|
};
|
2006-08-22 16:33:35 +01:00
|
|
|
|
2009-07-22 09:59:57 +01:00
|
|
|
#define FOR_ALL_WAYPOINTS(var) FOR_ALL_BASE_STATIONS_OF_TYPE(Waypoint, var)
|
2005-03-24 17:03:37 +00:00
|
|
|
|
|
|
|
#endif /* WAYPOINT_H */
|