106 uint x =
TileX(tile);
107 uint y =
TileY(tile);
131 SB(
_m[tile].type, 4, 4, type);
197 SB(
_m[tile].m1, 0, 5, owner);
222 SB(
_m[tile].type, 0, 2, type);
static TileType GetTileType(TileIndex tile)
Get the tiletype of a given tile.
GameSettings _settings_game
Game settings of a running game or the scenario editor.
static TropicZone GetTropicZone(TileIndex tile)
Get the tropic zone.
static void SetAnimationFrame(TileIndex t, byte frame)
Set a new animation frame.
static void SetTileOwner(TileIndex tile, Owner owner)
Sets the owner of a tile.
static const uint MAX_TILE_HEIGHT
Maximum allowed tile height.
TropicZone
Additional infos of a tile on a tropic game.
static int GetTilePixelZ(TileIndex tile)
Get bottom height of the tile.
TileType
The different types of tiles.
byte m7
Primarily used for newgrf support.
static byte GetAnimationFrame(TileIndex t)
Get the current animation frame.
int GetTileMaxZ(TileIndex tile)
Get top height of the tile inside the map.
Tile * _m
Tiles of the map.
static uint TileX(TileIndex tile)
Get the X component of a tile.
Functions related to bit mathematics.
Contains objects such as transmitters and owned land.
Functions related to maps.
static T SB(T &x, const uint8 s, const uint8 n, const U d)
Set n bits in x starting at bit s to d.
static void SetTileHeight(TileIndex tile, uint height)
Sets the height of a tile.
bool freeform_edges
allow terraforming the tiles at the map edges
static bool IsValidTile(TileIndex tile)
Checks if a tile is valid.
static bool IsTileOwner(TileIndex tile, Owner owner)
Checks if a tile belongs to the given owner.
static uint TileHash2Bit(uint x, uint y)
Get the last two bits of the TileHash from a tile position.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a give tiletype.
int GetTileMaxPixelZOutsideMap(int x, int y)
Get top height of the tile outside the map.
static Owner GetTileOwner(TileIndex tile)
Returns the owner of a tile.
Types related to global configuration settings.
TileExtended * _me
Extended Tiles of the map.
int GetTilePixelZOutsideMap(int x, int y)
Get bottom height of the tile outside map.
static Slope GetTilePixelSlope(TileIndex tile, int *h)
Return the slope of a given tile.
static const uint TILE_HEIGHT
Height of a height level in world coordinate AND in pixels in #ZOOM_LVL_BASE.
bool IsTileFlat(TileIndex tile, int *h=NULL)
Check if a given tile is flat.
static uint TileHash(uint x, uint y)
Calculate a hash value from a tile position.
static uint MapSize()
Get the size of the map.
static uint TilePixelHeightOutsideMap(int x, int y)
Returns the tile height for a coordinate outside map.
Invisible tiles at the SW and SE border.
uint32 TileIndex
The index/ID of a Tile.
static uint TileY(TileIndex tile)
Get the Y component of a tile.
byte height
The height of the northern corner.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
Slope
Enumeration for the slope-type.
static void SetTileType(TileIndex tile, TileType type)
Set the type of a tile.
uint TileHeightOutsideMap(int x, int y)
Returns the tile height for a coordinate outside map.
static uint TileHeight(TileIndex tile)
Returns the height of a tile.
Slope GetTilePixelSlopeOutsideMap(int x, int y, int *h)
Return the slope of a given tile outside the map.
ConstructionSettings construction
construction of things in-game
static bool IsInnerTile(TileIndex tile)
Check if a tile is within the map (not a border)
Owner
Enum for all companies/owners.
static uint TilePixelHeight(TileIndex tile)
Returns the height of a tile in pixels.
int GetTileZ(TileIndex tile)
Get bottom height of the tile.
static void SetTropicZone(TileIndex tile, TropicZone type)
Set the tropic zone.
static int GetTileMaxPixelZ(TileIndex tile)
Get top height of the tile.
Slope GetTileSlope(TileIndex tile, int *h=NULL)
Return the slope of a given tile inside the map.