OpenTTD
|
NewGRF handling of road types. More...
#include "stdafx.h"
#include "debug.h"
#include "newgrf_roadtype.h"
#include "date_func.h"
#include "depot_base.h"
#include "town.h"
#include "safeguards.h"
Go to the source code of this file.
Functions | |
SpriteID | GetCustomRoadSprite (const RoadTypeInfo *rti, TileIndex tile, RoadTypeSpriteGroup rtsg, TileContext context, uint *num_results) |
Get the sprite to draw for the given tile. More... | |
uint8 | GetReverseRoadTypeTranslation (RoadType roadtype, const GRFFile *grffile) |
Perform a reverse roadtype lookup to get the GRF internal ID. More... | |
NewGRF handling of road types.
Definition in file newgrf_roadtype.cpp.
SpriteID GetCustomRoadSprite | ( | const RoadTypeInfo * | rti, |
TileIndex | tile, | ||
RoadTypeSpriteGroup | rtsg, | ||
TileContext | context, | ||
uint * | num_results | ||
) |
Get the sprite to draw for the given tile.
rti | The road type data (spec). | |
tile | The tile to get the sprite for. | |
rtsg | The type of sprite to draw. | |
content | Where are we drawing the tile? | |
[out] | num_results | If not nullptr, return the number of sprites in the spriteset. |
Definition at line 104 of file newgrf_roadtype.cpp.
Referenced by DrawRoadOverlays(), and RoadTypeResolverObject::GetScope().
Perform a reverse roadtype lookup to get the GRF internal ID.
roadtype | The global (OpenTTD) roadtype. |
grffile | The GRF to do the lookup for. |
Definition at line 125 of file newgrf_roadtype.cpp.
Referenced by RoadTypeResolverObject::GetScope().