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

Function IsDiagonalTrack

src/track_func.h:619–623  ·  view source on GitHub ↗

* Checks if a given Track is diagonal * * @param track The given track to check * @return true if diagonal, else false */

Source from the content-addressed store, hash-verified

617 * @return true if diagonal, else false
618 */
619inline bool IsDiagonalTrack(Track track)
620{
621 assert(IsValidTrack(track));
622 return (track == TRACK_X) || (track == TRACK_Y);
623}
624
625/**
626 * Checks if a given Trackdir is diagonal.

Callers 2

ChooseShipTrackFunction · 0.85
IsDiagonalTrackdirFunction · 0.85

Calls 1

IsValidTrackFunction · 0.85

Tested by

no test coverage detected