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

Function TrackDirectionToTrackdir

src/track_func.h:498–504  ·  view source on GitHub ↗

* Maps a track and a full (8-way) direction to the trackdir that represents * the track running in the given direction. */

Source from the content-addressed store, hash-verified

496 * the track running in the given direction.
497 */
498inline Trackdir TrackDirectionToTrackdir(Track track, Direction dir)
499{
500 assert(IsValidTrack(track));
501 assert(IsValidDirection(dir));
502 extern const Trackdir _track_direction_to_trackdir[TRACK_END][DIR_END];
503 return _track_direction_to_trackdir[track][dir];
504}
505
506/**
507 * Maps a (4-way) direction to the diagonal track incidating with that diagdir

Callers 3

GetVehicleTrackdirMethod · 0.85
TrainControllerFunction · 0.85
GetVehicleTrackdirMethod · 0.85

Calls 2

IsValidTrackFunction · 0.85
IsValidDirectionFunction · 0.85

Tested by

no test coverage detected