OpenTTD
|
Functions related to water (management) More...
Go to the source code of this file.
Enumerations | |
enum | FloodingBehaviour { FLOOD_NONE, FLOOD_ACTIVE, FLOOD_PASSIVE, FLOOD_DRYUP } |
Describes the behaviour of a tile during flooding. More... | |
Functions | |
FloodingBehaviour | GetFloodingBehaviour (TileIndex tile) |
Returns the behaviour of a tile during flooding. More... | |
void | TileLoop_Water (TileIndex tile) |
Let a water tile floods its diagonal adjoining tiles called from tunnelbridge_cmd, and by TileLoop_Industry() and TileLoop_Track() More... | |
bool | FloodHalftile (TileIndex t) |
Called from water_cmd if a non-flat rail-tile gets flooded and should be converted to shore. More... | |
void | DoFloodTile (TileIndex target) |
Floods a tile. | |
void | ConvertGroundTilesIntoWaterTiles () |
void | DrawShipDepotSprite (int x, int y, Axis axis, DepotPart part) |
void | DrawWaterClassGround (const struct TileInfo *ti) |
void | DrawShoreTile (Slope tileh) |
void | MakeWaterKeepingClass (TileIndex tile, Owner o) |
bool | RiverModifyDesertZone (TileIndex tile, void *data) |
Callback to create non-desert around a river tile. More... | |
bool | IsWateredTile (TileIndex tile, Direction from) |
return true if a tile is a water tile wrt. More... | |
static Money | CanalMaintenanceCost (uint32 num) |
Calculates the maintenance cost of a number of canal tiles. More... | |
Functions related to water (management)
Definition in file water.h.
enum FloodingBehaviour |
Describes the behaviour of a tile during flooding.
|
inlinestatic |
Calculates the maintenance cost of a number of canal tiles.
num | Number of canal tiles. |
Definition at line 51 of file water.h.
Referenced by CompanyInfrastructureWindow::GetTotalMaintenanceCost().
bool FloodHalftile | ( | TileIndex | t | ) |
Called from water_cmd if a non-flat rail-tile gets flooded and should be converted to shore.
The function floods the lower halftile, if the tile has a halftile foundation.
t | The tile to flood. |
Definition at line 749 of file rail_cmd.cpp.
FloodingBehaviour GetFloodingBehaviour | ( | TileIndex | tile | ) |
Returns the behaviour of a tile during flooding.
Definition at line 1005 of file water_cmd.cpp.
References FLOOD_ACTIVE, FLOOD_DRYUP, FLOOD_NONE, GetTileSlope(), GetTileType(), GetWaterClass(), IsCoast(), IsSlopeWithOneCornerRaised(), MP_INDUSTRY, MP_OBJECT, MP_RAILWAY, MP_STATION, MP_WATER, and WATER_CLASS_SEA.
Referenced by CheckRailSlope(), and TileLoop_Water().
return true if a tile is a water tile wrt.
a certain direction.
tile | The tile of interest. |
from | The direction of interest. |
Definition at line 548 of file water_cmd.cpp.
References GetTileType(), GetWaterTileType(), and MP_WATER.
Referenced by CanalScopeResolver::GetVariable().
bool RiverModifyDesertZone | ( | TileIndex | tile, |
void * | |||
) |
Callback to create non-desert around a river tile.
Definition at line 379 of file water_cmd.cpp.
References GetTropicZone(), SetTropicZone(), TROPICZONE_DESERT, and TROPICZONE_NORMAL.
void TileLoop_Water | ( | TileIndex | tile | ) |
Let a water tile floods its diagonal adjoining tiles called from tunnelbridge_cmd, and by TileLoop_Industry() and TileLoop_Track()
tile | the water/shore tile that floods |
Definition at line 1153 of file water_cmd.cpp.
References _flood_from_dirs, AmbientSoundEffect(), DIR_BEGIN, DIR_END, DoDryUp(), DoFloodTile(), FLOOD_ACTIVE, FLOOD_DRYUP, FLOOD_PASSIVE, FOR_EACH_SET_BIT, GetFloodingBehaviour(), GetFoundationSlope(), GetTreeGround(), HasBit(), IsTileType(), IsValidTile(), MP_TREES, MP_WATER, ReverseDir(), SLOPE_HALFTILE_MASK, SLOPE_STEEP, TileOffsByDir(), and TREE_GROUND_SHORE.