Add: INR currency (#8136)
[openttd-github.git] / src / pathfinder / yapf / yapf_node_ship.hpp
blob63e21987a34f765fd7b14e2754abfc12dc953258
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file yapf_node_ship.hpp Node tailored for ship pathfinding. */
10 #ifndef YAPF_NODE_SHIP_HPP
11 #define YAPF_NODE_SHIP_HPP
13 /** Yapf Node for ships */
14 template <class Tkey_>
15 struct CYapfShipNodeT : CYapfNodeT<Tkey_, CYapfShipNodeT<Tkey_> > {
16 typedef CYapfNodeT<Tkey_, CYapfShipNodeT<Tkey_> > base;
18 TileIndex m_segment_last_tile;
19 Trackdir m_segment_last_td;
21 void Set(CYapfShipNodeT *parent, TileIndex tile, Trackdir td, bool is_choice)
23 base::Set(parent, tile, td, is_choice);
24 m_segment_last_tile = tile;
25 m_segment_last_td = td;
29 /* now define two major node types (that differ by key type) */
30 typedef CYapfShipNodeT<CYapfNodeKeyExitDir> CYapfShipNodeExitDir;
31 typedef CYapfShipNodeT<CYapfNodeKeyTrackDir> CYapfShipNodeTrackDir;
33 /* Default NodeList types */
34 typedef CNodeList_HashTableT<CYapfShipNodeExitDir , 10, 12> CShipNodeListExitDir;
35 typedef CNodeList_HashTableT<CYapfShipNodeTrackDir, 10, 12> CShipNodeListTrackDir;
37 #endif /* YAPF_NODE_SHIP_HPP */