|
OpenTTD Source
1.11.0-beta2
|
#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... | |
| RoadType | GetRoadTypeTranslation (RoadTramType rtt, uint8 tracktype, const GRFFile *grffile) |
| Translate an index to the GRF-local road/tramtype-translation table into a RoadType. 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 120 of file newgrf_roadtype.cpp.
Referenced by DrawRoadOverlays(), and GetBridgeRoadCatenary().
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 172 of file newgrf_roadtype.cpp.
Translate an index to the GRF-local road/tramtype-translation table into a RoadType.
| rtt | Whether to index the road- or tramtype-table. |
| tracktype | Index into GRF-local translation table. |
| grffile | Originating GRF file. |
Definition at line 142 of file newgrf_roadtype.cpp.
References INVALID_ROADTYPE.