2007-11-24 08:45:04 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2007-11-24 08:45:04 +00:00
|
|
|
/** @file water.h Functions related to water (management) */
|
|
|
|
|
|
|
|
#ifndef WATER_H
|
|
|
|
#define WATER_H
|
|
|
|
|
2010-01-15 16:41:15 +00:00
|
|
|
#include "tile_type.h"
|
|
|
|
#include "company_type.h"
|
|
|
|
#include "slope_type.h"
|
|
|
|
|
2010-07-10 12:45:34 +00:00
|
|
|
/**
|
|
|
|
* Describes the behaviour of a tile during flooding.
|
|
|
|
*/
|
|
|
|
enum FloodingBehaviour {
|
|
|
|
FLOOD_NONE, ///< The tile does not flood neighboured tiles.
|
|
|
|
FLOOD_ACTIVE, ///< The tile floods neighboured tiles.
|
|
|
|
FLOOD_PASSIVE, ///< The tile does not actively flood neighboured tiles, but it prevents them from drying up.
|
|
|
|
FLOOD_DRYUP, ///< The tile drys up if it is not constantly flooded from neighboured tiles.
|
|
|
|
};
|
|
|
|
|
|
|
|
FloodingBehaviour GetFloodingBehaviour(TileIndex tile);
|
|
|
|
|
2007-11-24 08:45:04 +00:00
|
|
|
void TileLoop_Water(TileIndex tile);
|
2008-01-22 17:48:08 +00:00
|
|
|
bool FloodHalftile(TileIndex t);
|
2009-01-21 02:31:55 +00:00
|
|
|
void DoFloodTile(TileIndex target);
|
2008-01-22 17:48:08 +00:00
|
|
|
|
|
|
|
void ConvertGroundTilesIntoWaterTiles();
|
|
|
|
|
2007-11-24 08:45:04 +00:00
|
|
|
void DrawShipDepotSprite(int x, int y, int image);
|
2008-02-06 16:12:23 +00:00
|
|
|
void DrawWaterClassGround(const struct TileInfo *ti);
|
2008-01-22 17:48:08 +00:00
|
|
|
void DrawShoreTile(Slope tileh);
|
|
|
|
|
2008-02-02 09:28:43 +00:00
|
|
|
void MakeWaterKeepingClass(TileIndex tile, Owner o);
|
2007-11-24 08:45:04 +00:00
|
|
|
|
|
|
|
#endif /* WATER_H */
|