# road_cmd.h File Reference

Road related functions. More...

`#include "direction_type.h"`

Go to the source code of this file.

## Functions
void | DrawRoadDepotSprite (int x, int y, DiagDirection dir, RoadType rt)
void | UpdateNearestTownForRoadTiles (bool invalidate)
| Updates cached nearest town for all road tiles.

## Detailed Description

Road related functions.

Definition in file road_cmd.h.

## Function Documentation

void UpdateNearestTownForRoadTiles | ( | bool | invalidate | ) |

Updates cached nearest town for all road tiles.

Parameters:

  | invalidate | are we just invalidating cached data?

Precondition:
  invalidate == true implies _generating_world == true

Definition at line 1248 of file road_cmd.cpp.

References HasTownOwnedRoad(), IsTileType(), MapSize(), MP_ROAD, and SetTownIndex().

Referenced by CmdBuildTown().