Add support for deleted functions
[openttd/fttd.git] / src / water.h
blobbefd334ccb78b258e43584306d4663a569537472
1 /* $Id$ */
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
10 /** @file water.h Functions related to water (management) */
12 #ifndef WATER_H
13 #define WATER_H
15 #include "direction_type.h"
16 #include "map/water.h"
17 #include "economy_func.h"
19 /**
20 * Describes the behaviour of a tile during flooding.
22 enum FloodingBehaviour {
23 FLOOD_NONE, ///< The tile does not flood neighboured tiles.
24 FLOOD_ACTIVE, ///< The tile floods neighboured tiles.
25 FLOOD_PASSIVE, ///< The tile does not actively flood neighboured tiles, but it prevents them from drying up.
26 FLOOD_DRYUP, ///< The tile drys up if it is not constantly flooded from neighboured tiles.
29 FloodingBehaviour GetFloodingBehaviour(TileIndex tile);
31 void TileLoop_Water(TileIndex tile);
32 bool FloodHalftile(TileIndex t);
33 void DoFloodTile(TileIndex target);
35 void ConvertGroundTilesIntoWaterTiles();
37 void DrawShipDepotSprite(int x, int y, DiagDirection dir);
38 void DrawWaterClassGround(const struct TileInfo *ti);
39 void DrawShoreTile(Slope tileh);
41 void MakeWaterKeepingClass(TileIndex tile, Owner o);
43 bool RiverModifyDesertZone(TileIndex tile, void *data);
45 bool IsWateredTile(TileIndex tile, Direction from);
47 /**
48 * Calculates the maintenance cost of a number of canal tiles.
49 * @param num Number of canal tiles.
50 * @return Total cost.
52 static inline Money CanalMaintenanceCost(uint32 num)
54 return (_price[PR_INFRASTRUCTURE_WATER] * num * (1 + IntSqrt(num))) >> 6; // 6 bits scaling.
57 #endif /* WATER_H */