Road related functions. More...
#include "direction_type.h"
#include "road_type.h"
#include "tile_cmd.h"
#include "gfx_type.h"
Go to the source code of this file.
Functions | |
void | DrawRoadDepotSprite (int x, int y, DiagDirection dir, RoadType rt) |
Draw the road depot sprite. | |
void | UpdateNearestTownForRoadTiles (bool invalidate) |
Updates cached nearest town for all road tiles. | |
void | DrawRoadDetail (SpriteID img, TileInfo *ti, int dx, int dy, int h) |
Draws details on/around the road. |
Road related functions.
Definition in file road_cmd.h.
void DrawRoadDepotSprite | ( | int | x, | |
int | y, | |||
DiagDirection | dir, | |||
RoadType | rt | |||
) |
Draw the road depot sprite.
x | The x offset to draw at. | |
y | The y offset to draw at. | |
dir | The direction the depot must be facing. | |
rt | The road type of the depot to draw. |
Definition at line 1393 of file road_cmd.cpp.
References _local_company, DrawOrigTileSeqInGUI(), DrawSprite(), DrawTileSprites::ground, and PalSpriteID::sprite.
Referenced by BuildRoadDepotWindow::DrawWidget().
Draws details on/around the road.
img | the sprite to draw | |
ti | the tile to draw on | |
dx | the offset from the top of the BB of the tile | |
dy | the offset from the top of the BB of the tile | |
h | the height of the sprite to draw |
Definition at line 1195 of file road_cmd.cpp.
References AddSortableSpriteToDraw(), SLOPE_FLAT, TileInfo::tileh, TileInfo::x, TileInfo::y, and TileInfo::z.
Referenced by DrawRoadBits(), and DrawTrafficLights().
void UpdateNearestTownForRoadTiles | ( | bool | invalidate | ) |
Updates cached nearest town for all road tiles.
invalidate | are we just invalidating cached data? |
Definition at line 1410 of file road_cmd.cpp.
References _generating_world, CalcClosestTownFromTile(), HasTownOwnedRoad(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, IsRoadDepot(), IsTileType(), MapSize(), MP_ROAD, and SetTownIndex().
Referenced by AfterLoadGame(), CmdFoundTown(), and Town::PostDestructor().