Add: INR currency (#8136)
[openttd-github.git] / src / town_kdtree.h
blob92416558541ad835463a5ccacf41d47327442f82
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
8 /** @file town_kdtree.h Declarations for accessing the k-d tree of towns */
10 #ifndef TOWN_KDTREE_H
11 #define TOWN_KDTREE_H
13 #include "core/kdtree.hpp"
14 #include "town.h"
16 inline uint16 Kdtree_TownXYFunc(TownID tid, int dim) { return (dim == 0) ? TileX(Town::Get(tid)->xy) : TileY(Town::Get(tid)->xy); }
17 typedef Kdtree<TownID, decltype(&Kdtree_TownXYFunc), uint16, int> TownKdtree;
19 extern TownKdtree _town_kdtree;
20 extern TownKdtree _town_local_authority_kdtree;
22 #endif