#include "tile_cmd.h"
#include "road_type.h"
Go to the source code of this file.
Functions | |
RoadBits | CleanUpRoadBits (const TileIndex tile, RoadBits org_rb) |
Clean up unneccesary RoadBits of a planed tile. | |
bool | CheckAllowRemoveRoad (TileIndex tile, RoadBits remove, Owner owner, RoadType rt, DoCommandFlag flags, bool town_check=true) |
Is it allowed to remove the given road bits from the given tile? | |
void | DrawTramCatenary (const TileInfo *ti, RoadBits tram) |
Draw the catenary for tram road bits. |
Definition in file road_internal.h.
bool CheckAllowRemoveRoad | ( | TileIndex | tile, | |
RoadBits | remove, | |||
Owner | owner, | |||
RoadType | rt, | |||
DoCommandFlag | 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 | |
rt | the road type to remove the bits from | |
flags | command flags | |
town_check | Shall the town rating checked/affected |
Definition at line 119 of file road_cmd.cpp.
References _settings_game, ChangeTownRating(), CheckOwnership(), GameSettings::construction, ConstructionSettings::extra_dynamite, GetAnyRoadBits(), KillFirstBit(), Cheats::magic_bulldozer, OWNER_NONE, OWNER_TOWN, OWNER_WATER, RATING_ROAD_DOWN_STEP_EDGE, RATING_ROAD_DOWN_STEP_INNER, RATING_ROAD_MINIMUM, ROAD_NE, ROAD_NONE, ROAD_NW, ROAD_SE, ROAD_SW, ROADTYPE_ROAD, SetDParam(), TILE_ADDXY, and Cheat::value.
Referenced by CanRemoveRoadWithStop(), and RemoveRoad().
Clean up unneccesary RoadBits of a planed tile.
tile | current tile | |
org_rb | planed RoadBits |
Definition at line 39 of file road.cpp.
References CountBits(), DIAGDIR_BEGIN, DIAGDIR_END, DiagDirToAxis(), DiagDirToRoadBits(), GetAnyRoadBits(), GetTileType(), IsPossibleCrossing(), IsValidTile(), IsWater(), MirrorRoadBits(), MP_CLEAR, MP_RAILWAY, MP_ROAD, MP_STATION, MP_TREES, MP_TUNNELBRIDGE, MP_WATER, ROAD_NONE, ROADTYPE_ROAD, ROADTYPE_TRAM, and TileAddByDiagDir().
Referenced by GrowTownInTile().
Draw the catenary for tram road bits.
ti | information about the tile (position, slope) | |
tram | the roadbits to draw the catenary for |
ti | information about the tile (slopes, height etc) | |
tram | the roadbits for the tram |
Definition at line 1023 of file road_cmd.cpp.
References AddSortableSpriteToDraw(), BB_HEIGHT_UNDER_BRIDGE, GetBridgeHeight(), GetNorthernBridgeEnd(), GetTileMaxZ(), IsBridgeAbove(), IsInvisibilitySet(), IsTransparencySet(), MayHaveBridgeAbove(), SLOPE_FLAT, TileInfo::tile, TILE_HEIGHT, TileInfo::tileh, TO_CATENARY, TileInfo::x, TileInfo::y, and TileInfo::z.
Referenced by DrawRoadBits(), and DrawTile_Road().