(svn r18364) -Codechange: move the pathfinders and their related files into a separate directory

pull/155/head
rubidium 15 years ago
parent 501d2ba0d8
commit 2f3053508d

@ -3,7 +3,6 @@ airport.cpp
animated_tile.cpp
articulated_vehicles.cpp
autoreplace.cpp
aystar.cpp
bmp.cpp
callback_table.cpp
cargopacket.cpp
@ -45,12 +44,9 @@ network/network_content.cpp
network/network_gamelist.cpp
network/network_server.cpp
network/network_udp.cpp
npf.cpp
openttd.cpp
os_timer.cpp
pathfind.cpp
pbs.cpp
queue.cpp
rail.cpp
rev.cpp
road.cpp
@ -111,7 +107,6 @@ autoreplace_func.h
autoreplace_gui.h
autoreplace_type.h
autoslope.h
aystar.h
base_media_base.h
base_media_func.h
base_station_base.h
@ -223,7 +218,6 @@ newgrf_townname.h
news_func.h
news_gui.h
news_type.h
npf.h
music/null_m.h
sound/null_s.h
video/null_v.h
@ -231,10 +225,8 @@ openttd.h
order_base.h
order_func.h
order_type.h
pathfind.h
pbs.h
querystring_gui.h
queue.h
rail.h
rail_gui.h
rail_type.h
@ -821,23 +813,36 @@ network/core/tcp_game.h
network/core/udp.cpp
network/core/udp.h
# Pathfinder
pathfinder/opf/opf_ship.cpp
pathfinder/opf/opf_ship.h
pathfinder/pathfinder_func.h
# NPF
pathfinder/npf/aystar.cpp
pathfinder/npf/aystar.h
pathfinder/npf/queue.cpp
pathfinder/npf/queue.h
pathfinder/npf/npf.cpp
pathfinder/npf/npf.h
# YAPF
yapf/follow_track.hpp
yapf/nodelist.hpp
yapf/yapf.h
yapf/yapf.hpp
yapf/yapf_base.hpp
yapf/yapf_common.hpp
yapf/yapf_costbase.hpp
yapf/yapf_costcache.hpp
yapf/yapf_costrail.hpp
yapf/yapf_destrail.hpp
yapf/yapf_node.hpp
yapf/yapf_node_rail.hpp
yapf/yapf_node_road.hpp
yapf/yapf_rail.cpp
yapf/yapf_road.cpp
yapf/yapf_ship.cpp
pathfinder/yapf/follow_track.hpp
pathfinder/yapf/nodelist.hpp
pathfinder/yapf/yapf.h
pathfinder/yapf/yapf.hpp
pathfinder/yapf/yapf_base.hpp
pathfinder/yapf/yapf_common.hpp
pathfinder/yapf/yapf_costbase.hpp
pathfinder/yapf/yapf_costcache.hpp
pathfinder/yapf/yapf_costrail.hpp
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_rail.cpp
pathfinder/yapf/yapf_road.cpp
pathfinder/yapf/yapf_ship.cpp
# Video
video/dedicated_v.cpp

@ -25,9 +25,9 @@
* should call clear() yourself!
*/
#include "stdafx.h"
#include "../../stdafx.h"
#include "../../core/alloc_func.hpp"
#include "aystar.h"
#include "core/alloc_func.hpp"
int _aystar_stats_open_size;
int _aystar_stats_closed_size;

@ -19,8 +19,8 @@
#define AYSTAR_H
#include "queue.h"
#include "tile_type.h"
#include "track_type.h"
#include "../../tile_type.h"
#include "../../track_type.h"
//#define AYSTAR_DEBUG
enum {

@ -9,18 +9,18 @@
/** @file npf.cpp Implementation of the NPF pathfinder. */
#include "stdafx.h"
#include "../../stdafx.h"
#include "../../debug.h"
#include "../../landscape.h"
#include "../../depot_base.h"
#include "../../network/network.h"
#include "../../tunnelbridge_map.h"
#include "../../functions.h"
#include "../../tunnelbridge.h"
#include "../../pbs.h"
#include "../../train.h"
#include "../pathfinder_func.h"
#include "npf.h"
#include "debug.h"
#include "landscape.h"
#include "depot_base.h"
#include "network/network.h"
#include "tunnelbridge_map.h"
#include "functions.h"
#include "tunnelbridge.h"
#include "pbs.h"
#include "pathfind.h"
#include "train.h"
static AyStar _npf_aystar;

@ -13,14 +13,14 @@
#define NPF_H
#include "aystar.h"
#include "station_type.h"
#include "rail_type.h"
#include "company_type.h"
#include "vehicle_type.h"
#include "tile_type.h"
#include "track_type.h"
#include "core/bitmath_func.hpp"
#include "transport_type.h"
#include "../../station_type.h"
#include "../../rail_type.h"
#include "../../company_type.h"
#include "../../vehicle_type.h"
#include "../../tile_type.h"
#include "../../track_type.h"
#include "../../core/bitmath_func.hpp"
#include "../../transport_type.h"
/* mowing grass */
enum {

@ -9,9 +9,9 @@
/** @file queue.cpp Implementation of the Queue/Hash. */
#include "stdafx.h"
#include "../../stdafx.h"
#include "../../core/alloc_func.hpp"
#include "queue.h"
#include "core/alloc_func.hpp"
/*

@ -9,12 +9,12 @@
/** @file pathfind.cpp Implementation of the oldest supported pathfinder. */
#include "stdafx.h"
#include "pathfind.h"
#include "debug.h"
#include "tunnelbridge_map.h"
#include "core/alloc_type.hpp"
#include "tunnelbridge.h"
#include "../../stdafx.h"
#include "../../debug.h"
#include "../../tunnelbridge_map.h"
#include "../../core/alloc_type.hpp"
#include "../../tunnelbridge.h"
#include "opf_ship.h"
struct RememberData {
uint16 cur_length;

@ -0,0 +1,21 @@
/* $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 opf_ship.h Original pathfinder for ships; very simple. */
#ifndef OPF_SHIP_H
#define OPF_SHIP_H
#include "../../direction_type.h"
typedef bool TPFEnumProc(TileIndex tile, void *data, Trackdir trackdir, uint length);
void OPFShipFollowTrack(TileIndex tile, DiagDirection direction, TPFEnumProc *enum_proc, void *data);
#endif /* OPF_SHIP_H */

@ -7,18 +7,13 @@
* 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 pathfind.h The oldest pathfinder that's supported. */
/** @file pathfinder_func.h General functions related to pathfinders. */
#ifndef PATHFIND_H
#define PATHFIND_H
#ifndef PATHFINDER_FUNC_H
#define PATHFINDER_FUNC_H
#include "direction_type.h"
#include "station_base.h"
#include "waypoint_base.h"
typedef bool TPFEnumProc(TileIndex tile, void *data, Trackdir trackdir, uint length);
void OPFShipFollowTrack(TileIndex tile, DiagDirection direction, TPFEnumProc *enum_proc, void *data);
#include "../station_base.h"
#include "../waypoint_base.h"
/**
* Calculates the tile of given station that is closest to a given tile
@ -51,4 +46,4 @@ static inline TileIndex CalcClosestStationTile(StationID station, TileIndex tile
return TileXY(x, y);
}
#endif /* PATHFIND_H */
#endif /* PATHFINDER_FUNC_H */

@ -13,9 +13,9 @@
#define FOLLOW_TRACK_HPP
#include "yapf.hpp"
#include "../depot_map.h"
#include "../roadveh.h"
#include "../train.h"
#include "../../depot_map.h"
#include "../../roadveh.h"
#include "../../train.h"
/** Track follower helper template class (can serve pathfinders and vehicle
* controllers). See 6 different typedefs below for 3 different transport

@ -12,9 +12,9 @@
#ifndef NODELIST_HPP
#define NODELIST_HPP
#include "../misc/array.hpp"
#include "../misc/hashtable.hpp"
#include "../misc/binaryheap.hpp"
#include "../../misc/array.hpp"
#include "../../misc/hashtable.hpp"
#include "../../misc/binaryheap.hpp"
/** Hash table based node list multi-container class.
* Implements open list, closed list and priority queue for A-star

@ -12,11 +12,11 @@
#ifndef YAPF_H
#define YAPF_H
#include "../debug.h"
#include "../depot_type.h"
#include "../direction_type.h"
#include "../station_type.h"
#include "../pbs.h"
#include "../../debug.h"
#include "../../depot_type.h"
#include "../../direction_type.h"
#include "../../station_type.h"
#include "../../pbs.h"
/** Finds the best path for given ship.
* @param v the ship that needs to find a path

@ -12,22 +12,22 @@
#ifndef YAPF_HPP
#define YAPF_HPP
#include "../openttd.h"
#include "../vehicle_base.h"
#include "../road_map.h"
#include "../tunnel_map.h"
#include "../bridge_map.h"
#include "../tunnelbridge_map.h"
#include "../bridge.h"
#include "../station_map.h"
#include "../tile_cmd.h"
#include "../landscape.h"
#include "../../openttd.h"
#include "../../vehicle_base.h"
#include "../../road_map.h"
#include "../../tunnel_map.h"
#include "../../bridge_map.h"
#include "../../tunnelbridge_map.h"
#include "../../bridge.h"
#include "../../station_map.h"
#include "../../tile_cmd.h"
#include "../../landscape.h"
#include "yapf.h"
#include "../pathfind.h"
#include "../waypoint_base.h"
#include "../debug.h"
#include "../settings_type.h"
#include "../tunnelbridge.h"
#include "../pathfinder_func.h"
#include "../../waypoint_base.h"
#include "../../debug.h"
#include "../../settings_type.h"
#include "../../tunnelbridge.h"
extern uint64 ottd_rdtsc();
@ -109,14 +109,14 @@ typedef CPerfStartFake CPerfStart;
//#undef FORCEINLINE
//#define FORCEINLINE inline
#include "../misc/crc32.hpp"
#include "../misc/blob.hpp"
#include "../misc/str.hpp"
#include "../misc/fixedsizearray.hpp"
#include "../misc/array.hpp"
#include "../misc/hashtable.hpp"
#include "../misc/binaryheap.hpp"
#include "../misc/dbg_helpers.h"
#include "../../misc/crc32.hpp"
#include "../../misc/blob.hpp"
#include "../../misc/str.hpp"
#include "../../misc/fixedsizearray.hpp"
#include "../../misc/array.hpp"
#include "../../misc/hashtable.hpp"
#include "../../misc/binaryheap.hpp"
#include "../../misc/dbg_helpers.h"
#include "nodelist.hpp"
#include "follow_track.hpp"
#include "yapf_base.hpp"

@ -12,8 +12,8 @@
#ifndef YAPF_BASE_HPP
#define YAPF_BASE_HPP
#include "../debug.h"
#include "../settings_type.h"
#include "../../debug.h"
#include "../../settings_type.h"
extern int _total_pf_time_us;

@ -12,7 +12,7 @@
#ifndef YAPF_COSTCACHE_HPP
#define YAPF_COSTCACHE_HPP
#include "../date_func.h"
#include "../../date_func.h"
/** CYapfSegmentCostCacheNoneT - the formal only yapf cost cache provider that implements
* PfNodeCacheFetch() and PfNodeCacheFlush() callbacks. Used when nodes don't have CachedData

@ -12,7 +12,7 @@
#ifndef YAPF_COSTRAIL_HPP
#define YAPF_COSTRAIL_HPP
#include "../pbs.h"
#include "../../pbs.h"
template <class Types>
class CYapfCostRailT

@ -9,13 +9,13 @@
/** @file yapf_rail.cpp The rail pathfinding. */
#include "../stdafx.h"
#include "../../stdafx.h"
#include "yapf.hpp"
#include "yapf_node_rail.hpp"
#include "yapf_costrail.hpp"
#include "yapf_destrail.hpp"
#include "../functions.h"
#include "../../functions.h"
#define DEBUG_YAPF_CACHE 0

@ -9,9 +9,9 @@
/** @file yapf_road.cpp The road pathfinding. */
#include "../stdafx.h"
#include "../roadstop_base.h"
#include "../cargotype.h"
#include "../../stdafx.h"
#include "../../roadstop_base.h"
#include "../../cargotype.h"
#include "yapf.hpp"
#include "yapf_node_road.hpp"

@ -9,7 +9,7 @@
/** @file yapf_ship.cpp Implementation of YAPF for ships. */
#include "../stdafx.h"
#include "../../stdafx.h"
#include "yapf.hpp"

@ -7,11 +7,12 @@
* 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 pbs.cpp */
/** @file pbs.cpp PBS support routines */
#include "stdafx.h"
#include "functions.h"
#include "vehicle_func.h"
#include "yapf/follow_track.hpp"
#include "pathfinder/yapf/follow_track.hpp"
/**
* Get the reserved trackbits for any tile, regardless of type.

@ -17,7 +17,7 @@
#include "command_func.h"
#include "engine_base.h"
#include "depot_base.h"
#include "yapf/yapf.h"
#include "pathfinder/yapf/yapf.h"
#include "newgrf_engine.h"
#include "landscape_type.h"
#include "newgrf_commons.h"

@ -16,7 +16,7 @@
#include "landscape.h"
#include "viewport_func.h"
#include "command_func.h"
#include "yapf/yapf.h"
#include "pathfinder/yapf/yapf.h"
#include "depot_base.h"
#include "newgrf.h"
#include "variables.h"

@ -14,14 +14,14 @@
#include "roadveh.h"
#include "command_func.h"
#include "news_func.h"
#include "pathfind.h"
#include "npf.h"
#include "pathfinder/npf/npf.h"
#include "station_base.h"
#include "company_func.h"
#include "vehicle_gui.h"
#include "articulated_vehicles.h"
#include "newgrf_engine.h"
#include "newgrf_sound.h"
#include "yapf/yapf.h"
#include "pathfinder/yapf/yapf.h"
#include "strings_func.h"
#include "tunnelbridge_map.h"
#include "functions.h"

@ -25,7 +25,7 @@
#include "../clear_map.h"
#include "../vehicle_func.h"
#include "../newgrf_station.h"
#include "../yapf/yapf.hpp"
#include "../pathfinder/yapf/yapf.hpp"
#include "../elrail_func.h"
#include "../signs_func.h"
#include "../aircraft.h"

@ -31,8 +31,8 @@
#include "settings_internal.h"
#include "command_func.h"
#include "console_func.h"
#include "npf.h"
#include "yapf/yapf.h"
#include "pathfinder/npf/npf.h"
#include "pathfinder/yapf/yapf.h"
#include "genworld.h"
#include "train.h"
#include "news_func.h"

@ -16,11 +16,12 @@
#include "command_func.h"
#include "news_func.h"
#include "company_func.h"
#include "npf.h"
#include "pathfinder/npf/npf.h"
#include "depot_base.h"
#include "station_base.h"
#include "vehicle_gui.h"
#include "newgrf_engine.h"
#include "yapf/yapf.h"
#include "pathfinder/yapf/yapf.h"
#include "newgrf_sound.h"
#include "spritecache.h"
#include "strings_func.h"
@ -33,7 +34,7 @@
#include "gfx_func.h"
#include "effectvehicle_func.h"
#include "ai/ai.hpp"
#include "pathfind.h"
#include "pathfinder/opf/opf_ship.h"
#include "landscape_type.h"
#include "table/strings.h"

@ -25,7 +25,7 @@
#include "newgrf_cargo.h"
#include "newgrf_station.h"
#include "newgrf_commons.h"
#include "yapf/yapf.h"
#include "pathfinder/yapf/yapf.h"
#include "road_internal.h" /* For drawing catenary/checking road removal */
#include "variables.h"
#include "autoslope.h"

@ -13,14 +13,14 @@
#include "gui.h"
#include "articulated_vehicles.h"
#include "command_func.h"
#include "npf.h"
#include "pathfinder/npf/npf.h"
#include "news_func.h"
#include "company_func.h"
#include "vehicle_gui.h"
#include "newgrf_engine.h"
#include "newgrf_sound.h"
#include "newgrf_text.h"
#include "yapf/follow_track.hpp"
#include "pathfinder/yapf/follow_track.hpp"
#include "group.h"
#include "table/sprites.h"
#include "strings_func.h"

@ -25,7 +25,7 @@
#include "ship.h"
#include "roadveh.h"
#include "water_map.h"
#include "yapf/yapf.h"
#include "pathfinder/yapf/yapf.h"
#include "newgrf_sound.h"
#include "autoslope.h"
#include "tunnelbridge_map.h"

@ -16,7 +16,7 @@
#include "bridge_map.h"
#include "town.h"
#include "waypoint_base.h"
#include "yapf/yapf.h"
#include "pathfinder/yapf/yapf.h"
#include "strings_func.h"
#include "functions.h"
#include "window_func.h"

Loading…
Cancel
Save