Functions related to waypoints. More...
#include "rail_type.h"#include "command_type.h"#include "station_type.h"Go to the source code of this file.
Functions | |
| CommandCost | RemoveBuoy (TileIndex tile, DoCommandFlag flags) |
| Remove a buoy. | |
| Axis | GetAxisForNewWaypoint (TileIndex tile) |
| Get the axis for a new waypoint. | |
| void | ShowWaypointWindow (const Waypoint *wp) |
| void | DrawWaypointSprite (int x, int y, int stat_id, RailType railtype) |
| Draw a waypoint. | |
Functions related to waypoints.
Definition in file waypoint_func.h.
| void DrawWaypointSprite | ( | int | x, | |
| int | y, | |||
| int | stat_id, | |||
| RailType | railtype | |||
| ) |
Draw a waypoint.
| x | coordinate | |
| y | coordinate | |
| stat_id | station id | |
| railtype | RailType to use for |
Definition at line 26 of file waypoint.cpp.
References AXIS_X, DrawStationTile(), INVALID_ROADTYPE, and STAT_CLASS_WAYP.
Referenced by BuildRailWaypointWindow::DrawWidget().
Get the axis for a new 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 79 of file waypoint_cmd.cpp.
References GetRailStationAxis(), GetRailTileType(), GetTrackBits(), IsRailWaypointTile(), IsTileType(), MP_RAILWAY, RAIL_TILE_NORMAL, TRACK_BIT_X, and TRACK_BIT_Y.
Referenced by IsValidTileForWaypoint(), and PlaceRail_Waypoint().
| CommandCost RemoveBuoy | ( | TileIndex | tile, | |
| DoCommandFlag | flags | |||
| ) |
Remove a buoy.
| tile | TileIndex been queried | |
| flags | operation to perform |
Definition at line 336 of file waypoint_cmd.cpp.
References _current_company, DC_BANKRUPT, DC_EXEC, BaseStation::delete_ctr, EnsureNoVehicleOnGround(), EXPENSES_CONSTRUCTION, BaseStation::facilities, CommandCost::Failed(), SpecializedStation< Waypoint, true >::GetByTile(), GetTileOwner(), HasStationInUse(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem< Tpool >::index, INVALID_STRING_ID, InvalidateWindowData(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), BaseStation::rect, return_cmd_error, and Waypoint::UpdateVirtCoord().
1.7.1