OpenTTD Source 20250924-master-gbec4e71d53
yapf_node_road.hpp
Go to the documentation of this file.
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 */
7
10#ifndef YAPF_NODE_ROAD_HPP
11#define YAPF_NODE_ROAD_HPP
12
13#include "../../tile_type.h"
14#include "../../track_type.h"
15#include "nodelist.hpp"
16#include "yapf_node.hpp"
17
19struct CYapfRoadNode : CYapfNodeT<CYapfNodeKeyExitDir, CYapfRoadNode> {
21
22 TileIndex segment_last_tile;
23 Trackdir segment_last_td;
24
25 void Set(CYapfRoadNode *parent, TileIndex tile, Trackdir td, bool is_choice)
26 {
27 this->base::Set(parent, tile, td, is_choice);
28 this->segment_last_tile = tile;
29 this->segment_last_td = td;
30 }
31};
32
34
35#endif /* YAPF_NODE_ROAD_HPP */
Hash table based node list multi-container class.
Definition nodelist.hpp:21
List of nodes used for the A-star pathfinder.
Yapf Node base.
Definition yapf_node.hpp:61
Yapf Node for road YAPF.
Trackdir
Enumeration for tracks and directions.
Definition track_type.h:66
Node in the pathfinder's graph.