Functions

tile_map.cpp File Reference

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.

Detailed Description

Global tile accessors.

Definition in file tile_map.cpp.


Function Documentation

int GetTileMaxZ ( TileIndex  t  ) 
Slope GetTileSlope ( TileIndex  tile,
int *  h 
)
int GetTileZ ( TileIndex  tile  ) 
bool IsTileFlat ( TileIndex  tile,
int *  h 
)

Check if a given tile is flat.

Parameters:
tile Tile to check
h If not NULL, pointer to storage of z height (only if tile is flat)
Returns:
Whether the 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().