OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
26 inline int CalcHash()
const
28 return m_exitdir | (m_tile << 2);
33 return m_tile == other.m_tile && m_exitdir == other.m_exitdir;
46 inline int CalcHash()
const
48 return m_td | (m_tile << 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;
uint32 TileIndex
The index/ID of a Tile.
void WriteEnumT(const char *name, E e)
Dump given enum value (as a number and as named value)
void WriteTile(const char *name, TileIndex t)
Write name & TileIndex to the output.
static DiagDirection TrackdirToExitdir(Trackdir trackdir)
Maps a trackdir to the (4-way) direction the tile is exited when following that trackdir.
Class that represents the dump-into-string target.
@ INVALID_DIAGDIR
Flag for an invalid DiagDirection.
@ INVALID_TRACKDIR
Flag for an invalid trackdir.
DiagDirection
Enumeration for diagonal directions.
void WriteStructT(const char *name, const S *s)
Dump nested object (or only its name if this instance is already known).
Yapf Node Key that evaluates hash from (and compares) tile & exit dir.
void WriteValue(const char *name, int value)
Write 'name = value' with indent and new-line.
Trackdir
Enumeration for tracks and directions.