AIWaypoint Class Reference

Class that handles all waypoint related functions. More...

#include <ai_waypoint.hpp>

Inheritance diagram for AIWaypoint:

AIBaseStation AIObject SimpleCountedObject

Static Public Member Functions

static const char * GetClassName ()
static bool IsValidWaypoint (StationID waypoint_id)
 Checks whether the given waypoint is valid and owned by you.
static StationID GetWaypointID (TileIndex tile)
 Get the StationID of a tile.

Detailed Description

Class that handles all waypoint related functions.

Definition at line 22 of file ai_waypoint.hpp.


Member Function Documentation

bool AIWaypoint::IsValidWaypoint ( StationID  waypoint_id  )  [static]

Checks whether the given waypoint is valid and owned by you.

Parameters:
waypoint_id The waypoint to check.
Returns:
True if and only if the waypoint is valid.

Definition at line 17 of file ai_waypoint.cpp.

StationID AIWaypoint::GetWaypointID ( TileIndex  tile  )  [static]

Get the StationID of a tile.

Parameters:
tile The tile to find the StationID of.
Precondition:
AIRail::IsRailWaypointTile(tile).
Returns:
StationID of the waypoint.

Definition at line 23 of file ai_waypoint.cpp.

References GetStationIndex(), AIRail::IsRailWaypointTile(), and AIBaseStation::STATION_INVALID.


The documentation for this class was generated from the following files:

Generated on Sat Dec 26 20:06:26 2009 for OpenTTD by  doxygen 1.5.6