OpenTTD Source
20241120-master-g6d3adc6169
|
Functions related to autoslope. More...
Go to the source code of this file.
Functions | |
bool | AutoslopeCheckForEntranceEdge (TileIndex tile, int z_new, Slope tileh_new, DiagDirection entrance) |
Autoslope check for tiles with an entrance on an edge. More... | |
bool | AutoslopeCheckForAxis (TileIndex tile, int z_new, Slope tileh_new, Axis axis) |
Autoslope check for tiles with something built along an axis. More... | |
bool | AutoslopeEnabled () |
Tests if autoslope is enabled for _current_company. More... | |
Functions related to autoslope.
Definition in file autoslope.h.
Autoslope check for tiles with something built along an axis.
E.g. railway stations and drive through road stops.
The test succeeds if the slope is not steep and at least one corner at either of the entrance edges is on the TileMaxZ() level.
tile | The tile. |
z_new | New TileZ. |
tileh_new | New TileSlope. |
axis | The axis. |
Definition at line 51 of file autoslope.h.
References AutoslopeCheckForEntranceEdge(), AxisToDiagDir(), and ReverseDiagDir().
|
inline |
Autoslope check for tiles with an entrance on an edge.
E.g. depots and bay road-stops.
The test succeeds if the slope is not steep and at least one corner of the entrance edge is on the TileMaxZ() level.
tile | The tile. |
z_new | New TileZ. |
tileh_new | New TileSlope. |
entrance | Entrance edge. |
Definition at line 31 of file autoslope.h.
References CanBuildDepotByTileh(), GetSlopeMaxZ(), GetTileMaxZ(), and SLOPE_FLAT.
Referenced by AutoslopeCheckForAxis().
|
inline |
Tests if autoslope is enabled for _current_company.
Autoslope is disabled for town/industry construction.
Definition at line 65 of file autoslope.h.
References _current_company, _settings_game, ConstructionSettings::autoslope, GameSettings::construction, MAX_COMPANIES, and OWNER_NONE.
Referenced by TestAutoslopeOnRailTile().