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

Function FindFirstTrack

src/track_func.h:177–180  ·  view source on GitHub ↗

* Returns first Track from TrackBits or INVALID_TRACK * * This function returns the first Track found in the TrackBits value as Track-value. * It returns INVALID_TRACK if the parameter is TRACK_BIT_NONE. * * @param tracks The TrackBits value * @return The first Track found or INVALID_TRACK * @see RemoveFirstTrack */

Source from the content-addressed store, hash-verified

175 * @see RemoveFirstTrack
176 */
177inline Track FindFirstTrack(TrackBits tracks)
178{
179 return (tracks != TRACK_BIT_NONE) ? (Track)FindFirstBit(tracks) : INVALID_TRACK;
180}
181
182/**
183 * Converts TrackBits to Track.

Callers 13

GetVehicleTrackdirMethod · 0.85
ChooseShipTrackFunction · 0.85
FloodHalftileFunction · 0.85
ReverseTrainDirectionFunction · 0.85
ChooseTrainTrackFunction · 0.85
TrainControllerFunction · 0.85
TrainCheckIfLineEndsFunction · 0.85
GetVehicleTrackdirMethod · 0.85
GenericPlaceSignalsFunction · 0.85
BuildRailTrackMethod · 0.85
RemoveRailTrackMethod · 0.85

Calls 1

FindFirstBitFunction · 0.85

Tested by

no test coverage detected