Changeset - r17574:8f948fe83988
[Not reviewed]
master
0 7 1
smatz - 14 years ago 2011-04-19 15:00:11
smatz@openttd.org
(svn r22348) -Codechange: split ship-specific part of yapf_node.hpp to yapf_node_ship.hpp
8 files changed with 46 insertions and 17 deletions:
0 comments (0 inline, 0 general)
projects/openttd_vs100.vcxproj
Show inline comments
 
@@ -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" />
projects/openttd_vs100.vcxproj.filters
Show inline comments
 
@@ -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>
projects/openttd_vs80.vcproj
Show inline comments
 
@@ -3683,6 +3683,10 @@
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\pathfinder\yapf\yapf_node_ship.hpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\pathfinder\yapf\yapf_rail.cpp"
 
				>
 
			</File>
projects/openttd_vs90.vcproj
Show inline comments
 
@@ -3680,6 +3680,10 @@
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\pathfinder\yapf\yapf_node_ship.hpp"
 
				>
 
			</File>
 
			<File
 
				RelativePath=".\..\src\pathfinder\yapf\yapf_rail.cpp"
 
				>
 
			</File>
source.list
Show inline comments
 
@@ -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
src/pathfinder/yapf/yapf_node.hpp
Show inline comments
 
@@ -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 */
src/pathfinder/yapf/yapf_node_ship.hpp
Show inline comments
 
new file 100644
 
/* $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 */
src/pathfinder/yapf/yapf_ship.cpp
Show inline comments
 
@@ -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>
0 comments (0 inline, 0 general)