equal
deleted
inserted
replaced
6 #include "vehicle.h" |
6 #include "vehicle.h" |
7 |
7 |
8 //#define NPF_DEBUG |
8 //#define NPF_DEBUG |
9 //#define NPF_MARKROUTE //Mark the routes considered by the pathfinder by |
9 //#define NPF_MARKROUTE //Mark the routes considered by the pathfinder by |
10 //mowing grass |
10 //mowing grass |
|
11 enum { |
|
12 NPF_HASH_BITS = 12, /* The size of the hash used in pathfinding. Just changing this value should be sufficient to change the hash size. Should be an even value. */ |
|
13 /* Do no change below values */ |
|
14 NPF_HASH_SIZE = 1 << NPF_HASH_BITS, |
|
15 NPF_HASH_HALFBITS = NPF_HASH_BITS / 2, |
|
16 NPF_HASH_HALFMASK = (1 << NPF_HASH_HALFBITS) - 1 |
|
17 }; |
11 |
18 |
12 typedef struct NPFFindStationOrTileData { /* Meant to be stored in AyStar.targetdata */ |
19 typedef struct NPFFindStationOrTileData { /* Meant to be stored in AyStar.targetdata */ |
13 TileIndex dest_coords; /* An indication of where the station is, for heuristic purposes, or the target tile */ |
20 TileIndex dest_coords; /* An indication of where the station is, for heuristic purposes, or the target tile */ |
14 int station_index; /* station index we're heading for, or -1 when we're heading for a tile */ |
21 int station_index; /* station index we're heading for, or -1 when we're heading for a tile */ |
15 } NPFFindStationOrTileData; |
22 } NPFFindStationOrTileData; |