OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

pathfinder_type.h
Go to the documentation of this file.
1 /* $Id: pathfinder_type.h 24900 2013-01-08 22:46:42Z planetmaker $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
9
12 #ifndef PATHFINDER_TYPE_H
13 #define PATHFINDER_TYPE_H
14
15 #include "../tile_type.h"
16
18 static const int NPF_TILE_LENGTH = 100;
19
26 static const int NPF_INFINITE_PENALTY = 1000 * NPF_TILE_LENGTH;
27
28
30 static const int YAPF_TILE_LENGTH = 100;
31
33 static const int YAPF_TILE_CORNER_LENGTH = 71;
34
41 static const int YAPF_INFINITE_PENALTY = 1000 * YAPF_TILE_LENGTH;
42
46 struct FindDepotData {
47 TileIndex tile;
48 uint best_length;
49 bool reverse;
50
57 FindDepotData(TileIndex tile = INVALID_TILE, uint best_length = UINT_MAX, bool reverse = false) :
58 tile(tile), best_length(best_length), reverse(reverse)
59 {
60 }
61 };
62
63 #endif /* PATHFINDER_TYPE_H */