tron@3069: /* $Id$ */ tron@3069: rubidium@8598: /** @file road_internal.h Functions used internally by the roads. */ rubidium@7157: rubidium@8598: #ifndef ROAD_INTERNAL_H rubidium@8598: #define ROAD_INTERNAL_H rubidium@6335: rubidium@8634: #include "tile_cmd.h" rubidium@8634: rubidium@6442: /** rubidium@8137: * Clean up unneccesary RoadBits of a planed tile. rubidium@8137: * @param tile current tile rubidium@8137: * @param org_rb planed RoadBits rubidium@8137: * @return optimised RoadBits rubidium@8137: */ rubidium@8137: RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb); rubidium@8137: rubidium@8137: /** rubidium@6442: * Is it allowed to remove the given road bits from the given tile? rubidium@6442: * @param tile the tile to remove the road from rubidium@6442: * @param remove the roadbits that are going to be removed rubidium@6442: * @param owner the actual owner of the roadbits of the tile rubidium@7157: * @param rt the road type to remove the bits from frosch@10690: * @param flags command flags frosch@10690: * @param town_check Shall the town rating checked/affected rubidium@6442: * @return true when it is allowed to remove the road bits rubidium@6442: */ frosch@10690: bool CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, RoadType rt, uint32 flags, bool town_check = true); rubidium@6442: rubidium@7891: /** rubidium@7891: * Draw the catenary for tram road bits rubidium@7891: * @param ti information about the tile (position, slope) rubidium@7891: * @param tram the roadbits to draw the catenary for rubidium@7891: */ smatz@9317: void DrawTramCatenary(const TileInfo *ti, RoadBits tram); rubidium@7187: rubidium@8598: #endif /* ROAD_INTERNAL_H */