NewGRF handling of rail types. More...
#include "rail.h"#include "newgrf_commons.h"Go to the source code of this file.
Functions | |
| SpriteID | GetCustomRailSprite (const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context=TCX_NORMAL) |
| Get the sprite to draw for the given tile. | |
| uint8 | GetReverseRailTypeTranslation (RailType railtype, const GRFFile *grffile) |
| Perform a reverse railtype lookup to get the GRF internal ID. | |
NewGRF handling of rail types.
Definition in file newgrf_railtype.h.
| SpriteID GetCustomRailSprite | ( | const RailtypeInfo * | rti, | |
| TileIndex | tile, | |||
| RailTypeSpriteGroup | rtsg, | |||
| TileContext | context | |||
| ) |
Get the sprite to draw for the given tile.
| rti | The rail 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? |
Definition at line 107 of file newgrf_railtype.cpp.
References RailtypeInfo::grffile, RailtypeInfo::group, and SpriteGroup::Resolve().
Referenced by DrawBridgeMiddle(), DrawTile_Road(), DrawTile_TunnelBridge(), GetPylonBase(), and GetWireBase().
Perform a reverse railtype lookup to get the GRF internal ID.
| railtype | The global (OpenTTD) railtype. | |
| grffile | The GRF to do the lookup for. |
Definition at line 130 of file newgrf_railtype.cpp.
References GetRailTypeInfo(), and RailtypeInfo::label.
1.7.1