NewGRF handling of rail types. More...
#include "stdafx.h"#include "debug.h"#include "newgrf_railtype.h"#include "date_func.h"#include "depot_base.h"#include "town.h"Go to the source code of this file.
Functions | |
| SpriteID | GetCustomRailSprite (const RailtypeInfo *rti, TileIndex tile, RailTypeSpriteGroup rtsg, TileContext context) |
| Get the sprite to draw for the given tile. | |
| SpriteID | GetCustomSignalSprite (const RailtypeInfo *rti, TileIndex tile, SignalType type, SignalVariant var, SignalState state, bool gui) |
| Get the sprite to draw for a given signal. | |
| 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.cpp.
| 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 101 of file newgrf_railtype.cpp.
References RailtypeInfo::grffile, RailtypeInfo::group, and SpriteGroup::Resolve().
Referenced by DrawBridgeMiddle(), DrawStationTile(), DrawTile_Road(), DrawTile_TunnelBridge(), GetPylonBase(), and GetWireBase().
| SpriteID GetCustomSignalSprite | ( | const RailtypeInfo * | rti, | |
| TileIndex | tile, | |||
| SignalType | type, | |||
| SignalVariant | var, | |||
| SignalState | state, | |||
| bool | gui | |||
| ) |
Get the sprite to draw for a given signal.
| rti | The rail type data (spec). | |
| tile | The tile to get the sprite for. | |
| type | Signal type. | |
| var | Signal variant. | |
| state | Signal state. | |
| gui | Is the sprite being used on the map or in the GUI? |
Definition at line 124 of file newgrf_railtype.cpp.
References RailtypeInfo::grffile, RailtypeInfo::group, SpriteGroup::Resolve(), RTSG_SIGNALS, and TCX_NORMAL.
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 144 of file newgrf_railtype.cpp.
References SmallVector< T, S >::FindIndex(), GetRailTypeInfo(), RailtypeInfo::label, SmallVector< T, S >::Length(), and GRFFile::railtype_list.
Referenced by StationScopeResolver::GetVariable().
1.7.1