Global tile accessors. More...
#include "stdafx.h"
#include "tile_map.h"
Go to the source code of this file.
Functions | |
Slope | GetTileSlope (TileIndex tile, uint *h) |
Return the slope of a given tile. | |
uint | GetTileZ (TileIndex tile) |
Get bottom height of the tile. | |
uint | GetTileMaxZ (TileIndex t) |
Get top height of the tile. |
Global tile accessors.
Definition in file tile_map.cpp.
uint GetTileMaxZ | ( | TileIndex | t | ) |
Get top height of the tile.
t | Tile to compute height of |
Definition at line 84 of file tile_map.cpp.
References MapMaxX(), MapMaxY(), max(), TILE_HEIGHT, TileDiffXY(), TileHeight(), TileX(), and TileY().
Referenced by AutoslopeCheckForEntranceEdge(), BuildTownHouse(), CheckBuildHouseSameZ(), CmdBuildBridge(), CmdBuildObject(), DoClearBridge(), DrawCatenary(), DrawCatenaryRailway(), DrawRoadBits(), DrawTramCatenary(), EnsureNoVehicleOnGround(), FloodVehicleProc(), AITile::GetMaxHeight(), GetOtherAqueductEnd(), and GetTerrainType().
Return the slope of a given tile.
tile | Tile to compute slope of | |
h | If not NULL , pointer to storage of z height |
Definition at line 21 of file tile_map.cpp.
References _settings_game, GameSettings::construction, ConstructionSettings::freeform_edges, MapMaxX(), MapMaxY(), MapSize(), min(), SLOPE_E, SLOPE_FLAT, SLOPE_N, SLOPE_S, SLOPE_W, TILE_HEIGHT, TileDiffXY(), TileHeight(), TileX(), and TileY().
Referenced by AfterLoadGame(), BuildTownHouse(), CanBuildHouseHere(), CanPlantTreesOnTile(), CheckBuildableTile(), CheckIfIndustryTilesAreFree(), CmdBuildBridge(), CmdBuildBuoy(), CmdBuildCanal(), CmdBuildDock(), CmdBuildLock(), CmdBuildObject(), CmdBuildRoad(), CmdBuildRoadDepot(), CmdBuildShipDepot(), CmdBuildSingleRail(), CmdBuildTrainDepot(), CmdBuildTunnel(), CmdPlantTree(), CmdRemoveSingleRail(), DoBuildLock(), DoFloodTile(), DrawCatenaryRailway(), FindFurthestFromWater(), FloodHalftile(), GetBridgeHeight(), AITile::GetCornerHeight(), GetFloodingBehaviour(), GetFoundationSlope(), GetNearbyTileInformation(), GetOtherAqueductEnd(), AITunnel::GetOtherTunnelEnd(), AITile::GetSlope(), GetTownRoadGridElement(), GrowTown(), GrowTownWithBridge(), IsRoadAllowedHere(), IsValidTileForWaypoint(), IsWateredTile(), ObjectGetVariable(), BuildDocksToolbarWindow::OnPlaceObject(), BuildDocksToolbarWindow::OnPlacePresize(), PerformIndustryTileSlopeCheck(), RemoveRoad(), SearchTileForStatue(), SetWaterClassDependingOnSurroundings(), and TownCanBePlacedHere().
uint GetTileZ | ( | TileIndex | tile | ) |
Get bottom height of the tile.
tile | Tile to compute height of |
Definition at line 67 of file tile_map.cpp.
References MapMaxX(), MapMaxY(), min(), TILE_HEIGHT, TileDiffXY(), TileHeight(), TileX(), and TileY().
Referenced by CheckNewIndustry_BubbleGen(), CheckNewIndustry_Farm(), CheckNewIndustry_Forest(), DrawCatenaryOnTunnel(), AITile::GetMinHeight(), GetOtherTunnelEnd(), GetTerrainType(), IsTunnelInWayDir(), MarkTileDirtyByTile(), LandInfoWindow::OnInit(), PlaceTreeAtSameHeight(), PlaceTreesRandomly(), and TileLoopClearAlps().