From eb78cdb2d4feacbb5f4f44b958b6a01fe16c56f1 Mon Sep 17 00:00:00 2001 From: matthijs Date: Mon, 31 Jan 2005 11:23:10 +0000 Subject: (svn r1751) - Feature: New PathFinder (NPF). - Supports trains, road vehicles and ships. - Uses A* pathfinding (same codebase as the new ai). - Currently unlimited search depth, so might perform badly on large maps/networks (especially ships). - Will always find a route if there is one. - Allows custom penalties for obstacles to be set in openttd.cfg (npf_ values). - With NPF enabled, ships can have orders that are very far apart. Be careful, this will break (ships get lost) when the old pathfinder is used again. - Feature: Disabling 90 degree turns for trains and ships. - Requires NPF to be enabled. - Ships and trains can no longer make weird 90 degree turns on tile borders. - Codechange: Removed table/directions.h. - table/directions.h contained ugly static tables but was included more than once. The tables, along with a few new ones are in npf.[ch] now. Better suggestions for a location? - Fix: Binary heap in queue.c did not allocate enough space, resulting in a segfault. - Codechange: Rewritten FindFirstBit2x64, added KillFirstBit2x64. - Codechange: Introduced constant INVALID_TILE, to replace the usage of 0 as an invalid tile. Also replaces TILE_WRAPPED. - Codechange: Moved TileAddWrap() to map.[ch] - Add TileIndexDiffCByDir(), TileIndexDiffCByDir(). - Codechange: Moved IsTrainStationTile() to station.h - Add: IsRoadStationTile() and GetRoadStationDir(). --- station_cmd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'station_cmd.c') diff --git a/station_cmd.c b/station_cmd.c index c5a1475cc..98fe79fe6 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -16,7 +16,7 @@ #include "player.h" #include "airport.h" #include "sprite.h" -#include "table/directions.h" +#include "npf.h" // FIXME -- need to be embedded into Airport variable. Is dynamically // deducteable from graphics-tile array, so will not be needed @@ -2277,10 +2277,6 @@ static void ClickTile_Station(uint tile) } } -static inline bool IsTrainStationTile(uint tile) { - return IsTileType(tile, MP_STATION) && IS_BYTE_INSIDE(_map5[tile], 0, 8); -} - static const byte _enter_station_speedtable[12] = { 215, 195, 175, 155, 135, 115, 95, 75, 55, 35, 15, 0 }; -- cgit v1.2.3-54-g00ecf