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/>.
17 #include "company_type.h"
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
33 * Zoning evaluation modes
36 ZMM_NOTHING
= 0, ///< No zoning mask
39 ZMM_ALL
= ZMM_INNER
| ZMM_OUTER
,
41 DECLARE_ENUM_AS_BIT_SET(ZoningModeMask
)
44 * Global Zoning state structure
47 ZoningEvaluationMode inner
;
48 ZoningEvaluationMode outer
;
51 extern Zoning _zoning
;
53 SpriteID
TileZoningSpriteEvaluation(TileIndex tile
, Owner owner
, ZoningEvaluationMode ev_mode
);
55 int TileZoningEvaluation(TileIndex tile
, Owner owner
, ZoningEvaluationMode ev_mode
);
57 void DrawTileZoning(const TileInfo
*ti
);
59 void ShowZoningToolbar();
61 void ZoningMarkDirtyStationCoverageArea(const Station
*st
, ZoningModeMask mask
= ZMM_ALL
);
62 inline void ZoningMarkDirtyStationCoverageArea(const Waypoint
*st
) { } // no-op
64 void SetZoningMode(bool inner
, ZoningEvaluationMode mode
);
66 void ClearZoningCaches();