OpenTTD Source
20241108-master-g80f628063a
|
Functions related to waypoints. More...
Go to the source code of this file.
Functions | |
enum StationClassID uint16_t CommandCost | RemoveBuoy (TileIndex tile, DoCommandFlag flags) |
Remove a buoy. More... | |
Axis | GetAxisForNewRailWaypoint (TileIndex tile) |
Get the axis for a new rail waypoint. More... | |
Axis | GetAxisForNewRoadWaypoint (TileIndex tile) |
Get the axis for a new road waypoint. More... | |
void | ShowWaypointWindow (const Waypoint *wp) |
Show the window for the given waypoint. More... | |
void | DrawWaypointSprite (int x, int y, StationClassID station_class, uint16_t station_type, RailType railtype) |
Draw a waypoint. More... | |
Functions related to waypoints.
Definition in file waypoint_func.h.
void DrawWaypointSprite | ( | int | x, |
int | y, | ||
StationClassID | station_class, | ||
uint16_t | station_type, | ||
RailType | railtype | ||
) |
Draw a waypoint.
x | coordinate |
y | coordinate |
station_class | Station class. |
station_type | Station type within class. |
railtype | RailType to use for |
Definition at line 28 of file waypoint.cpp.
Get the axis for a new rail waypoint.
This means that if it is a valid tile to build a waypoint on it returns a valid Axis, otherwise an invalid one.
tile | the tile to look at. |
Definition at line 101 of file waypoint_cmd.cpp.
References AXIS_X, AXIS_Y, GetRailStationAxis(), GetRailTileType(), GetTrackBits(), INVALID_AXIS, IsRailWaypointTile(), IsTileType(), MP_RAILWAY, RAIL_TILE_NORMAL, TRACK_BIT_X, and TRACK_BIT_Y.
Referenced by PlaceRail_Waypoint().
Get the axis for a new road waypoint.
This means that if it is a valid tile to build a waypoint on it returns a valid Axis, otherwise an invalid one.
tile | the tile to look at. |
Definition at line 123 of file waypoint_cmd.cpp.
References AXIS_X, AXIS_Y, GetAllRoadBits(), GetDriveThroughStopAxis(), INVALID_AXIS, IsNormalRoadTile(), IsRoadWaypointTile(), ROAD_X, and ROAD_Y.
Referenced by PlaceRoad_Waypoint().
enum StationClassID uint16_t CommandCost RemoveBuoy | ( | TileIndex | tile, |
DoCommandFlag | flags | ||
) |
Remove a buoy.
tile | TileIndex been queried |
flags | operation to perform |
Definition at line 524 of file waypoint_cmd.cpp.
References _current_company, DC_BANKRUPT, DC_EXEC, EnsureNoVehicleOnGround(), FACIL_DOCK, BaseStation::facilities, CommandCost::Failed(), SpecializedStation< Waypoint, true >::GetByTile(), HasStationInUse(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, INVALID_STRING_ID, InvalidateWindowData(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), return_cmd_error, and WC_WAYPOINT_VIEW.
void ShowWaypointWindow | ( | const Waypoint * | wp | ) |
Show the window for the given waypoint.
wp | The waypoint to show the window for. |
Definition at line 223 of file waypoint_gui.cpp.
References _waypoint_view_desc, and Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index.