MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetPlatformInfoHelper

Function GetPlatformInfoHelper

src/newgrf_station.cpp:181–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179
180
181static uint32_t GetPlatformInfoHelper(TileIndex tile, bool check_type, bool check_axis, bool centred)
182{
183 int tx = TileX(tile);
184 int ty = TileY(tile);
185 int sx = TileX(FindRailStationEnd(tile, TileDiffXY(-1, 0), check_type, check_axis));
186 int sy = TileY(FindRailStationEnd(tile, TileDiffXY( 0, -1), check_type, check_axis));
187 int ex = TileX(FindRailStationEnd(tile, TileDiffXY( 1, 0), check_type, check_axis)) + 1;
188 int ey = TileY(FindRailStationEnd(tile, TileDiffXY( 0, 1), check_type, check_axis)) + 1;
189
190 tx -= sx; ex -= sx;
191 ty -= sy; ey -= sy;
192
193 return GetPlatformInfo(GetRailStationAxis(tile), GetStationGfx(tile), ex, ey, tx, ty, centred);
194}
195
196
197static uint32_t GetRailContinuationInfo(TileIndex tile)

Callers 1

GetVariableMethod · 0.85

Calls 7

TileXFunction · 0.85
TileYFunction · 0.85
FindRailStationEndFunction · 0.85
TileDiffXYFunction · 0.85
GetPlatformInfoFunction · 0.85
GetRailStationAxisFunction · 0.85
GetStationGfxFunction · 0.85

Tested by

no test coverage detected