You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
886 B
C
32 lines
886 B
C
19 years ago
|
/* $Id$ */
|
||
|
|
||
15 years ago
|
/** @file waypoint_base.h Base of waypoints. */
|
||
17 years ago
|
|
||
20 years ago
|
#ifndef WAYPOINT_H
|
||
|
#define WAYPOINT_H
|
||
|
|
||
16 years ago
|
#include "waypoint_type.h"
|
||
15 years ago
|
#include "station_base.h"
|
||
20 years ago
|
|
||
15 years ago
|
struct Waypoint : SpecializedStation<Waypoint, true> {
|
||
17 years ago
|
uint16 town_cn; ///< The Nth waypoint for this town (consecutive number)
|
||
20 years ago
|
|
||
15 years ago
|
Waypoint(TileIndex tile = INVALID_TILE) : SpecializedStation<Waypoint, true>(tile) { }
|
||
17 years ago
|
~Waypoint();
|
||
15 years ago
|
|
||
|
void UpdateVirtCoord();
|
||
15 years ago
|
|
||
15 years ago
|
/* virtual */ FORCEINLINE bool TileBelongsToRailStation(TileIndex tile) const
|
||
|
{
|
||
15 years ago
|
return IsRailWaypointTile(tile) && GetStationIndex(tile) == this->index;
|
||
15 years ago
|
}
|
||
|
|
||
|
/* virtual */ uint32 GetNewGRFVariable(const struct ResolverObject *object, byte variable, byte parameter, bool *available) const;
|
||
|
|
||
15 years ago
|
/* virtual */ void GetTileArea(TileArea *ta, StationType type) const;
|
||
17 years ago
|
};
|
||
18 years ago
|
|
||
15 years ago
|
#define FOR_ALL_WAYPOINTS(var) FOR_ALL_BASE_STATIONS_OF_TYPE(Waypoint, var)
|
||
20 years ago
|
|
||
|
#endif /* WAYPOINT_H */
|