Global tile accessors. More...
#include "stdafx.h"
#include "tile_map.h"
Go to the source code of this file.
Functions | |
Slope | GetTileSlope (TileIndex tile, int *h) |
Return the slope of a given tile. | |
bool | IsTileFlat (TileIndex tile, int *h) |
Check if a given tile is flat. | |
int | GetTileZ (TileIndex tile) |
Get bottom height of the tile. | |
int | GetTileMaxZ (TileIndex t) |
Get top height of the tile. |
Global tile accessors.
Definition in file tile_map.cpp.
int GetTileMaxZ | ( | TileIndex | t | ) |
Get top height of the tile.
t | Tile to compute height of |
Definition at line 107 of file tile_map.cpp.
References MapMaxX(), MapMaxY(), TileDiffXY(), TileHeight(), TileX(), and TileY().
Referenced by AutoslopeCheckForEntranceEdge(), BuildTownHouse(), CheckBuildHouseSameZ(), CmdBuildBridge(), CmdBuildObject(), DoClearBridge(), DrawCatenaryRailway(), DrawRoadBits(), DrawTramCatenary(), FindSpring(), FloodVehicleProc(), GetOtherAqueductEnd(), GetTerrainType(), and GetTileMaxPixelZ().
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 IsInnerTile(), MapSize(), min(), SLOPE_N, TileDiffXY(), and TileHeight().
Referenced by BuildTownHouse(), CanBuildHouseHere(), CanPlantTreesOnTile(), CheckBuildableTile(), CheckIfIndustryTilesAreFree(), CmdBuildBridge(), CmdBuildCanal(), CmdBuildDock(), CmdBuildLock(), CmdBuildObject(), CmdBuildRoad(), CmdBuildRoadDepot(), CmdBuildSingleRail(), CmdBuildTrainDepot(), CmdBuildTunnel(), CmdPlantTree(), CmdRemoveSingleRail(), DoFloodTile(), DrawCatenaryRailway(), FloodHalftile(), FlowsDown(), GetBridgeHeight(), GetFloodingBehaviour(), GetFoundationSlope(), GetOtherAqueductEnd(), GetTilePixelSlope(), GetTownRoadGridElement(), StationScopeResolver::GetVariable(), ObjectScopeResolver::GetVariable(), GrowTownWithBridge(), IsRoadAllowedHere(), IsValidTileForWaypoint(), IsWateredTile(), BuildDocksToolbarWindow::OnPlaceObject(), BuildDocksToolbarWindow::OnPlacePresize(), PerformIndustryTileSlopeCheck(), PerformStationTileSlopeCheck(), RemoveRoad(), SearchTileForStatue(), and CYapfCostBase::stSlopeCost().
int GetTileZ | ( | TileIndex | tile | ) |
Get bottom height of the tile.
tile | Tile to compute height of |
Definition at line 90 of file tile_map.cpp.
References MapMaxX(), MapMaxY(), min(), TileDiffXY(), TileHeight(), TileX(), and TileY().
Referenced by AmbientSoundEffectCallback(), CheckNewIndustry_BubbleGen(), CheckNewIndustry_Farm(), CheckNewIndustry_Forest(), GetOtherTunnelEnd(), GetTerrainType(), GetTilePixelZ(), IndustriesScopeResolver::GetVariable(), CanalScopeResolver::GetVariable(), IsTunnelInWayDir(), LandInfoWindow::OnInit(), PlaceTreeAtSameHeight(), PlaceTreesRandomly(), and TileLoopClearAlps().
bool IsTileFlat | ( | TileIndex | tile, | |
int * | h | |||
) |
Check if a given tile is flat.
tile | Tile to check | |
h | If not NULL , pointer to storage of z height (only if tile is flat) |
Definition at line 67 of file tile_map.cpp.
References IsInnerTile(), MapSize(), TileDiffXY(), and TileHeight().
Referenced by AfterLoadGame(), CheckIfIndustryTilesAreFree(), CmdBuildBuoy(), CmdBuildDock(), CmdBuildObject(), CmdBuildShipDepot(), DoBuildLock(), FindFurthestFromWater(), FindSpring(), FlowRiver(), GrowTown(), IsWateredTile(), MakeLake(), SetWaterClassDependingOnSurroundings(), TownCanBePlacedHere(), TryBuildLightHouse(), and TryBuildTransmitter().