|
OpenTTD Source 20260421-master-gc2fbc6fdeb
|
Functions used internally by the roads. More...
Go to the source code of this file.
Functions | |
| RoadBits | CleanUpRoadBits (const TileIndex tile, RoadBits org_rb) |
| Clean up unnecessary RoadBits of a planned tile. | |
| CommandCost | CheckAllowRemoveRoad (TileIndex tile, RoadBits remove, Owner owner, RoadTramType rtt, DoCommandFlags flags, bool town_check=true) |
| Is it allowed to remove the given road bits from the given tile? | |
| void | DrawRoadCatenary (const TileInfo *ti) |
| Draws the catenary for the given tile. | |
Functions used internally by the roads.
Definition in file road_internal.h.
| CommandCost CheckAllowRemoveRoad | ( | TileIndex | tile, |
| RoadBits | remove, | ||
| Owner | owner, | ||
| RoadTramType | rtt, | ||
| DoCommandFlags | flags, | ||
| bool | town_check ) |
Is it allowed to remove the given road bits from the given tile?
| tile | the tile to remove the road from |
| remove | the roadbits that are going to be removed |
| owner | the actual owner of the roadbits of the tile |
| rtt | The road type to remove the bits from. |
| flags | command flags |
| town_check | Shall the town rating checked/affected |
Definition at line 255 of file road_cmd.cpp.
References _cheats, _current_company, _settings_game, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any(), ChangeTownRating(), CheckforTownRating(), CheckOwnership(), ClosestTownFromTile(), CommandCostWithParam(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Count(), CommandCost::Failed(), GetAnyRoadBits(), NE, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::None(), NW, OWNER_NONE, OWNER_TOWN, OWNER_WATER, RATING_ROAD_DOWN_STEP_EDGE, RATING_ROAD_DOWN_STEP_INNER, RATING_ROAD_MINIMUM, Road, RoadRemove, SE, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set(), SW, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), and TileAddXY().
Referenced by CanRemoveRoadWithStop(), and RemoveRoad().
Clean up unnecessary RoadBits of a planned tile.
| tile | current tile |
| org_rb | planned RoadBits |
Definition at line 59 of file road.cpp.
References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any(), Clear, DIAGDIR_BEGIN, DIAGDIR_END, DiagDirToAxis(), DiagDirToRoadBits(), BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Flip(), GetAnyRoadBits(), GetTileType(), IsNormalRoadTile(), IsPossibleCrossing(), IsValidTile(), IsWater(), MirrorRoadBits(), Railway, Road, Station, TileAddByDiagDir(), Tram, Trees, TunnelBridge, and Water.
Referenced by GrowTownInTile(), and TileLoop_Road().
| void DrawRoadCatenary | ( | const TileInfo * | ti | ) |
Draws the catenary for the given tile.
| ti | information about the tile (slopes, height etc) |
Definition at line 1442 of file road_cmd.cpp.
References AXIS_X, AXIS_Y, DiagDirToRoadBits(), DrawRoadTypeCatenary(), GetBayRoadStopDir(), GetCrossingRailAxis(), GetDriveThroughStopAxis(), GetRoadBits(), GetRoadTypeRoad(), GetRoadTypeTram(), HasRoadCatenaryDrawn(), INVALID_ROADTYPE, IsAnyRoadStop(), IsDriveThroughStopTile(), IsLevelCrossing(), IsNormalRoad(), IsTileType(), Road, ROAD_X, ROAD_Y, Station, TileInfo::tile, and Tram.
Referenced by DrawRoadBits(), DrawTile_Road(), and DrawTile_Station().