OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
26 inline int CalcHash()
const
28 return m_exitdir | (m_tile.base() << 2);
33 return m_tile == other.m_tile && m_exitdir == other.m_exitdir;
46 inline int CalcHash()
const
48 return m_td | (m_tile.base() << 4);
53 return m_tile == other.m_tile && m_td == other.m_td;
58 template <
class Tkey_,
class Tnode>
73 m_hash_next =
nullptr;
77 m_is_choice = is_choice;
80 inline Node *GetHashNext()
85 inline void SetHashNext(Node *pNext)
100 inline const Tkey_ &GetKey()
const
105 inline int GetCost()
const
110 inline int GetCostEstimate()
const
115 inline bool GetIsChoice()
const
120 inline bool operator<(
const Node &other)
const
122 return m_estimate < other.m_estimate;
DiagDirection TrackdirToExitdir(Trackdir trackdir)
Maps a trackdir to the (4-way) direction the tile is exited when following that trackdir.
DiagDirection
Enumeration for diagonal directions.
@ INVALID_DIAGDIR
Flag for an invalid DiagDirection.
void WriteStructT(const std::string &name, const S *s)
Dump nested object (or only its name if this instance is already known).
Class that represents the dump-into-string target.
void WriteTile(const std::string &name, TileIndex t)
Write name & TileIndex to the output.
void WriteEnumT(const std::string &name, E e)
Dump given enum value (as a number and as named value)
Yapf Node Key that evaluates hash from (and compares) tile & exit dir.
Trackdir
Enumeration for tracks and directions.
@ INVALID_TRACKDIR
Flag for an invalid trackdir.
void WriteValue(const std::string &name, int value)
Write 'name = value' with indent and new-line.