mirror of https://github.com/OpenTTD/OpenTTD
(svn r22348) -Codechange: split ship-specific part of yapf_node.hpp to yapf_node_ship.hpp
parent
64cd6a62a2
commit
6e011e9e68
|
@ -1079,6 +1079,7 @@
|
|||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node.hpp" />
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_rail.hpp" />
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_road.hpp" />
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_ship.hpp" />
|
||||
<ClCompile Include="..\src\pathfinder\yapf\yapf_rail.cpp" />
|
||||
<ClCompile Include="..\src\pathfinder\yapf\yapf_road.cpp" />
|
||||
<ClCompile Include="..\src\pathfinder\yapf\yapf_ship.cpp" />
|
||||
|
|
|
@ -2457,6 +2457,9 @@
|
|||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_road.hpp">
|
||||
<Filter>YAPF</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\pathfinder\yapf\yapf_node_ship.hpp">
|
||||
<Filter>YAPF</Filter>
|
||||
</ClInclude>
|
||||
<ClCompile Include="..\src\pathfinder\yapf\yapf_rail.cpp">
|
||||
<Filter>YAPF</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -3682,6 +3682,10 @@
|
|||
RelativePath=".\..\src\pathfinder\yapf\yapf_node_road.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_node_ship.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_rail.cpp"
|
||||
>
|
||||
|
|
|
@ -3679,6 +3679,10 @@
|
|||
RelativePath=".\..\src\pathfinder\yapf\yapf_node_road.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_node_ship.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\..\src\pathfinder\yapf\yapf_rail.cpp"
|
||||
>
|
||||
|
|
|
@ -880,6 +880,7 @@ pathfinder/yapf/yapf_destrail.hpp
|
|||
pathfinder/yapf/yapf_node.hpp
|
||||
pathfinder/yapf/yapf_node_rail.hpp
|
||||
pathfinder/yapf/yapf_node_road.hpp
|
||||
pathfinder/yapf/yapf_node_ship.hpp
|
||||
pathfinder/yapf/yapf_rail.cpp
|
||||
pathfinder/yapf/yapf_road.cpp
|
||||
pathfinder/yapf/yapf_ship.cpp
|
||||
|
|
|
@ -81,21 +81,4 @@ struct CYapfNodeT {
|
|||
}
|
||||
};
|
||||
|
||||
/** Yapf Node for ships */
|
||||
template <class Tkey_>
|
||||
struct CYapfShipNodeT
|
||||
: CYapfNodeT<Tkey_, CYapfShipNodeT<Tkey_> >
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
/* now define two major node types (that differ by key type) */
|
||||
typedef CYapfShipNodeT<CYapfNodeKeyExitDir> CYapfShipNodeExitDir;
|
||||
typedef CYapfShipNodeT<CYapfNodeKeyTrackDir> CYapfShipNodeTrackDir;
|
||||
|
||||
/* Default NodeList types */
|
||||
typedef CNodeList_HashTableT<CYapfShipNodeExitDir , 14, 16> CShipNodeListExitDir;
|
||||
typedef CNodeList_HashTableT<CYapfShipNodeTrackDir, 16, 20> CShipNodeListTrackDir;
|
||||
|
||||
|
||||
#endif /* YAPF_NODE_HPP */
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* 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.
|
||||
* 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.
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/** @file yapf_node_ship.hpp Node tailored for ship pathfinding. */
|
||||
|
||||
#ifndef YAPF_NODE_SHIP_HPP
|
||||
#define YAPF_NODE_SHIP_HPP
|
||||
|
||||
/** Yapf Node for ships */
|
||||
template <class Tkey_>
|
||||
struct CYapfShipNodeT
|
||||
: CYapfNodeT<Tkey_, CYapfShipNodeT<Tkey_> >
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
/* now define two major node types (that differ by key type) */
|
||||
typedef CYapfShipNodeT<CYapfNodeKeyExitDir> CYapfShipNodeExitDir;
|
||||
typedef CYapfShipNodeT<CYapfNodeKeyTrackDir> CYapfShipNodeTrackDir;
|
||||
|
||||
/* Default NodeList types */
|
||||
typedef CNodeList_HashTableT<CYapfShipNodeExitDir , 14, 16> CShipNodeListExitDir;
|
||||
typedef CNodeList_HashTableT<CYapfShipNodeTrackDir, 16, 20> CShipNodeListTrackDir;
|
||||
|
||||
|
||||
#endif /* YAPF_NODE_SHIP_HPP */
|
|
@ -13,6 +13,7 @@
|
|||
#include "../../ship.h"
|
||||
|
||||
#include "yapf.hpp"
|
||||
#include "yapf_node_ship.hpp"
|
||||
|
||||
/** Node Follower module of YAPF for ships */
|
||||
template <class Types>
|
||||
|
|
Loading…
Reference in New Issue