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