Fix station and town kdtrees with maps larger than 64k

This commit is contained in:
Jonathan G Rennison
2020-06-25 17:43:25 +01:00
parent 27b92c3526
commit 15c600d64f
2 changed files with 9 additions and 9 deletions

View File

@@ -13,8 +13,8 @@
#include "core/kdtree.hpp"
#include "town.h"
inline uint16 Kdtree_TownXYFunc(TownID tid, int dim) { return (dim == 0) ? TileX(Town::Get(tid)->xy) : TileY(Town::Get(tid)->xy); }
typedef Kdtree<TownID, decltype(&Kdtree_TownXYFunc), uint16, int> TownKdtree;
inline uint32 Kdtree_TownXYFunc(TownID tid, int dim) { return (dim == 0) ? TileX(Town::Get(tid)->xy) : TileY(Town::Get(tid)->xy); }
typedef Kdtree<TownID, decltype(&Kdtree_TownXYFunc), uint32, int> TownKdtree;
extern TownKdtree _town_kdtree;
extern TownKdtree _town_local_authority_kdtree;