Add templated versions of CeilDiv and Ceil maths functions
[openttd-joker.git] / src / zoning.h
blob35502f1d897e0daf178b35295304ac5ec6bfd0b9
2 /* $Id$ */
4 /*
5 * This file is part of OpenTTD.
6 * 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.
7 * 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.
8 * 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/>.
9 */
11 /** @file zoning.h */
13 #ifndef ZONING_H
14 #define ZONING_H
16 #include "tile_cmd.h"
17 #include "company_type.h"
19 /**
20 * Zoning evaluation modes
22 enum ZoningEvaluationMode {
23 ZEM_NOTHING = 0, ///< No zoning action selected
24 ZEM_AUTHORITY, ///< Check the local authority's opinion.
25 ZEM_CAN_BUILD, ///< Check wither or not the player can build.
26 ZEM_STA_CATCH, ///< Check catchment area for stations
27 ZEM_BUL_UNSER, ///< Check for unserved buildings
28 ZEM_IND_UNSER, ///< Check for unserved industries
29 ZEM_TRACERESTRICT, ///< Check for restricted signals
32 /**
33 * Global Zoning state structure
35 struct Zoning {
36 ZoningEvaluationMode inner;
37 ZoningEvaluationMode outer;
40 extern Zoning _zoning;
42 SpriteID TileZoningSpriteEvaluation(TileIndex tile, Owner owner, ZoningEvaluationMode ev_mode);
44 int TileZoningEvaluation(TileIndex tile, Owner owner, ZoningEvaluationMode ev_mode);
46 void DrawTileZoning(const TileInfo *ti);
48 void ShowZoningToolbar();
50 void ZoningMarkDirtyStationCoverageArea(const Station *st);
51 inline void ZoningMarkDirtyStationCoverageArea(const Waypoint *st) { } // no-op
53 #endif /* ZONING_H */