Map writing/reading functions for tiles. More...
#include "slope_type.h"
#include "map_func.h"
#include "core/bitmath_func.hpp"
#include "settings_type.h"
Go to the source code of this file.
Functions | |
static uint | TileHeight (TileIndex tile) |
Returns the height of a tile. | |
static void | SetTileHeight (TileIndex tile, uint height) |
Sets the height of a tile. | |
static uint | TilePixelHeight (TileIndex tile) |
Returns the height of a tile in pixels. | |
static TileType | GetTileType (TileIndex tile) |
Get the tiletype of a given tile. | |
static void | SetTileType (TileIndex tile, TileType type) |
Set the type of a tile. | |
static bool | IsTileType (TileIndex tile, TileType type) |
Checks if a tile is a give tiletype. | |
static bool | IsValidTile (TileIndex tile) |
Checks if a tile is valid. | |
static Owner | GetTileOwner (TileIndex tile) |
Returns the owner of a tile. | |
static void | SetTileOwner (TileIndex tile, Owner owner) |
Sets the owner of a tile. | |
static bool | IsTileOwner (TileIndex tile, Owner owner) |
Checks if a tile belongs to the given owner. | |
static void | SetTropicZone (TileIndex tile, TropicZone type) |
Set the tropic zone. | |
static TropicZone | GetTropicZone (TileIndex tile) |
Get the tropic zone. | |
static byte | GetAnimationFrame (TileIndex t) |
Get the current animation frame. | |
static void | SetAnimationFrame (TileIndex t, byte frame) |
Set a new animation frame. | |
Slope | GetTileSlope (TileIndex tile, int *h=NULL) |
Return the slope of a given tile. | |
int | GetTileZ (TileIndex tile) |
Get bottom height of the tile. | |
int | GetTileMaxZ (TileIndex tile) |
Get top height of the tile. | |
static Slope | GetTilePixelSlope (TileIndex tile, int *h) |
Return the slope of a given tile. | |
static int | GetTilePixelZ (TileIndex tile) |
Get bottom height of the tile. | |
static int | GetTileMaxPixelZ (TileIndex tile) |
Get top height of the tile. | |
static uint | TileHash (uint x, uint y) |
Calculate a hash value from a tile position. | |
static uint | TileHash2Bit (uint x, uint y) |
Get the last two bits of the TileHash from a tile position. |
Map writing/reading functions for tiles.
Definition in file tile_map.h.
static byte GetAnimationFrame | ( | TileIndex | t | ) | [inline, static] |
Get the current animation frame.
t | the tile |
Definition at line 211 of file tile_map.h.
References _me, IsTileType(), TileExtended::m7, MP_HOUSE, MP_INDUSTRY, MP_OBJECT, and MP_STATION.
Referenced by AnimationBase< IndustryAnimationBase, IndustryTileSpec, Industry, int, GetSimpleIndustryCallback >::AnimateTile(), HouseGetVariable(), IncreaseAnimationStage(), IndustryGetVariable(), and ObjectGetVariable().
static int GetTileMaxPixelZ | ( | TileIndex | tile | ) | [inline, static] |
Get top height of the tile.
t | Tile to compute height of |
Definition at line 261 of file tile_map.h.
References GetTileMaxZ(), and TILE_HEIGHT.
Referenced by DrawCatenary(), EnsureNoVehicleOnGround(), and SetSelectionTilesDirty().
int 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(), TileDiffXY(), TileHeight(), TileX(), and TileY().
Referenced by AutoslopeCheckForEntranceEdge(), BuildTownHouse(), CheckBuildHouseSameZ(), CmdBuildBridge(), CmdBuildObject(), DoClearBridge(), DrawCatenaryRailway(), DrawRoadBits(), DrawTramCatenary(), FindSpring(), FloodVehicleProc(), ScriptTile::GetMaxHeight(), GetOtherAqueductEnd(), GetTerrainType(), and GetTileMaxPixelZ().
Returns the owner of a tile.
This function returns the owner of a tile. This cannot used for tiles which type is one of MP_HOUSE, MP_VOID and MP_INDUSTRY as no company owned any of these buildings.
tile | The tile to check |
Definition at line 139 of file tile_map.h.
References _m, GB(), IsTileType(), IsValidTile(), MP_HOUSE, and MP_INDUSTRY.
Referenced by AfterLoadCompanyStats(), AfterLoadGame(), CheckAllowRemoveTunnelBridge(), CheckTileOwnership(), CmdBuildBridge(), CmdBuildObject(), CmdBuildRailWaypoint(), CmdBuildRoad(), CmdBuildSingleRail(), CmdBuildSingleSignal(), CmdConvertRail(), CmdInsertOrder(), CmdRemoveSingleRail(), CmdRemoveSingleSignal(), CmdRenameDepot(), DisasterTick_Big_Ufo(), DisasterTick_Zeppeliner(), DoClearBridge(), DoClearTunnel(), DrawTile_Road(), DrawWaterDepot(), ExploreSegment(), FixOwnerOfRailTrack(), ScriptTile::GetOwner(), GetSmallMapOwnerPixels(), GetTrainForReservation(), IsTileOwner(), IsValidTileForWaypoint(), MakeBuoy(), MakeLock(), MoveBuoysToWaypoints(), MoveWaypointsToBaseStations(), ObjectGetVariable(), DepotWindow::OnClick(), ReallyClearObjectTile(), RemoveBuoy(), RemoveFromRailBaseStation(), RemoveLock(), RemoveRailStation(), RemoveRoad(), ScriptDepotList::ScriptDepotList(), UpdateObjectColours(), and Depot::~Depot().
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 239 of file tile_map.h.
References GetTileSlope(), and TILE_HEIGHT.
Referenced by GetNearbyTileInformation().
static int GetTilePixelZ | ( | TileIndex | tile | ) | [inline, static] |
Get bottom height of the tile.
tile | Tile to compute height of |
Definition at line 251 of file tile_map.h.
References GetTileZ(), and TILE_HEIGHT.
Referenced by DrawCatenaryOnTunnel(), MarkTileDirtyByTile(), and SetSelectionTilesDirty().
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_N, 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(), FindSpring(), FloodHalftile(), FlowRiver(), FlowsDown(), GetBridgeHeight(), ScriptTile::GetCornerHeight(), GetFloodingBehaviour(), GetFoundationSlope(), GetOtherAqueductEnd(), ScriptTunnel::GetOtherTunnelEnd(), ScriptTile::GetSlope(), GetTilePixelSlope(), GetTownRoadGridElement(), GrowTown(), GrowTownWithBridge(), IsRoadAllowedHere(), IsValidTileForWaypoint(), IsWateredTile(), MakeLake(), ObjectGetVariable(), BuildDocksToolbarWindow::OnPlaceObject(), BuildDocksToolbarWindow::OnPlacePresize(), PerformIndustryTileSlopeCheck(), PerformStationTileSlopeCheck(), RemoveRoad(), SearchTileForStatue(), SetWaterClassDependingOnSurroundings(), CYapfCostBase::stSlopeCost(), and TownCanBePlacedHere().
Get the tiletype of a given tile.
tile | The tile to get the TileType |
Definition at line 74 of file tile_map.h.
References _m, GB(), and MapSize().
Referenced by AfterLoadCompanyStats(), AfterLoadGame(), AmbientSoundEffectCallback(), CanEnterTileOwnerCheck(), CanPlantTreesOnTile(), ChangeTileOwner(), CleanUpRoadBits(), ClosestTownFromTile(), CmdBuildBridge(), CmdBuildRoad(), CmdBuildSingleRail(), CmdBuildVehicle(), CmdConvertRail(), CmdDeleteTown(), CmdLandscapeClear(), CmdPlantTree(), CmdRemoveSingleRail(), CmdRenameDepot(), CmdTerraformLand(), DoDryUp(), DoFloodTile(), DrawCatenary(), ExploreSegment(), GenerateRockyArea(), GetAnyRoadBits(), GetFloodingBehaviour(), GetFoundationSlope(), GetGrfSpecFeature(), GetNearbyTileInformation(), GetOrderTypeByTile(), GetRailTrackBitsUniversal(), GetReservedTrackbits(), GetTerrainType(), GetTileRailType(), GetTileTrackStatus(), GrowTownWithExtraHouse(), ScriptTile::IsBuildable(), Depot::IsOfType(), IsTileType(), IsWateredTile(), NeighbourHasReachableRoad(), NPFMarkTile(), CYapfCostRailT< Types >::OneTileCost(), PlantTreesOnTile(), RemoveRoad(), ScriptVehicleList_Depot::ScriptVehicleList_Depot(), SetWaterClassDependingOnSurroundings(), TryReserveRailTrack(), UnreserveRailTrack(), UpdateSignalsInBuffer(), VehicleEnterTile(), Depot::~Depot(), and Town::~Town().
int 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(), TileDiffXY(), TileHeight(), TileX(), and TileY().
Referenced by AmbientSoundEffectCallback(), CheckNewIndustry_BubbleGen(), CheckNewIndustry_Farm(), CheckNewIndustry_Forest(), ScriptTile::GetMinHeight(), GetOtherTunnelEnd(), GetTerrainType(), GetTilePixelZ(), IsTunnelInWayDir(), LandInfoWindow::OnInit(), PlaceTreeAtSameHeight(), PlaceTreesRandomly(), and TileLoopClearAlps().
static TropicZone GetTropicZone | ( | TileIndex | tile | ) | [inline, static] |
Get the tropic zone.
tile | the tile to get the zone of |
Definition at line 199 of file tile_map.h.
References _m, GB(), and MapSize().
Referenced by CheckNewIndustry_Lumbermill(), CheckNewIndustry_Plantation(), CheckNewIndustry_Water(), CmdPlantTree(), TownViewWindow::DrawWidget(), FindSpring(), FlowRiver(), ScriptTown::GetCargoGoal(), TownViewWindow::GetDesiredInfoHeight(), GetRandomTreeType(), GetTerrainType(), MakeLake(), NeighbourIsDesert(), PlaceTreesRandomly(), RiverModifyDesertZone(), and UpdateTownGrowRate().
Checks if a tile belongs to the given owner.
tile | The tile to check | |
owner | The owner to check agains |
Definition at line 175 of file tile_map.h.
References GetTileOwner().
Referenced by AfterLoadGame(), BuildObject(), CanEnterTileOwnerCheck(), ChangeOwnershipOfCompanyItems(), CmdBuildBridge(), CmdBuildCanal(), CmdBuildObject(), CmdBuildVehicle(), CmdDeleteTown(), CmdDepotMassAutoReplace(), DoClearBridge(), DoClearTunnel(), DepotWindow::OnPaint(), RoadFindPathToDest(), and Town::~Town().
Checks if a tile is a give tiletype.
This function checks if a tile got the given tiletype.
tile | The tile to check | |
type | The type to check agains |
Definition at line 111 of file tile_map.h.
References GetTileType().
Referenced by AddClearCounter(), AddClearDensity(), AddNearbyStation(), AddTreeCount(), AddTreeCounter(), AddTreeGrowth(), AdjustTileh(), AfterLoadGame(), AmbientSoundEffectCallback(), Vehicle::BeginLoading(), CanBuildHouseHere(), CanEnterTile(), CanEnterTileOwnerCheck(), ChangeOwnershipOfCompanyItems(), CheckFlatLandRailStation(), CheckFlatLandRoadStop(), CheckIfIndustryTilesAreFree(), CheckNextTrainTile(), CheckSubsidised(), ClearPathReservation(), CmdBuildCanal(), CmdBuildDock(), CmdBuildLongRoad(), CmdBuildObject(), CmdBuildRailWaypoint(), CmdBuildRoad(), CmdBuildRoadStop(), CmdBuildSingleRail(), CmdPlantTree(), CmdRemoveRoadStop(), CmdReverseTrainDirection(), CmdTerraformLand(), CmdTurnRoadVeh(), CMSAMine(), CMSATree(), CMSAWater(), Train::Crash(), DecHouseProcessingTime(), DeleteLastWagon(), DisasterTick_Aircraft(), DoClearTownHouseHelper(), DoFloodTile(), DoTriggerIndustryTile(), DrawCatenaryRailway(), ExtendTrainReservation(), FindFurthestFromWater(), FindIndustryToDeliver(), FindNearestEmptyLand(), FindNearIndustryName(), FindRailStationEnd(), FindStationsAroundTiles(), FindStationsNearby(), FixOldVehicles(), FollowReservation(), FollowTrainReservation(), FreeTrainTrackReservation(), GetAnimationFrame(), GetAxisForNewWaypoint(), GetCleanHouseType(), GetCleanIndustryGfx(), GetClearCounter(), GetClearDensity(), GetClosestWaterDistance(), ScriptIndustry::GetDockLocation(), GetDockOffset(), GetEffectiveWaterClass(), ScriptAirport::GetHangarOfAirport(), ScriptIndustry::GetHeliportLocation(), GetHouseAge(), GetHouseBuildingStage(), GetHouseConstructionTick(), GetHouseProcessingTime(), GetHouseRandomBits(), GetHouseTriggers(), GetIndustryAnimationLoop(), GetIndustryConstructionCounter(), GetIndustryConstructionStage(), GetIndustryGfx(), ScriptIndustry::GetIndustryID(), GetIndustryIDAtOffset(), GetIndustryIndex(), GetIndustryRandomBits(), GetIndustryTriggers(), GetIndustryType(), GetNearbyAirportTileInformation(), GetNearbyIndustryTileInformation(), GetNearbyObjectTileInformation(), GetNearbyTileInformation(), ScriptAirport::GetNumHangars(), GetObjectIDAtOffset(), GetObjectIndex(), GetObjectRandomBits(), GetObjectType(), GetOtherTunnelBridgeEnd(), ScriptTile::GetOwner(), GetRailTileType(), GetRawClearGround(), GetRoadOwner(), GetRoadTileType(), ScriptRail::GetSignalType(), GetStationAround(), GetStationGfx(), ScriptStation::GetStationID(), GetStationIndex(), GetStationTileRandomBits(), GetStationType(), GetTileOwner(), GetTownIndex(), GetTrainForReservation(), GetTreeCount(), GetTreeCounter(), GetTreeDensity(), GetTreeGround(), GetTreeGrowth(), GetTreeType(), GetTunnelBridgeDirection(), GetTunnelBridgeTransportType(), GetWaterTileRandomBits(), GetWaterTileType(), GrowTown(), GrowTownAtRoad(), GrowTownInTile(), HasOnewaySignalBlockingTrackdir(), HasPbsSignalOnTrackdir(), HasStationTileRail(), HasTileWaterClass(), ScriptTile::HasTreeOnTile(), HasTunnelBridgeReservation(), HasTunnelBridgeSnowOrDesert(), HouseGetVariable(), IncHouseConstructionTick(), IncrementHouseAge(), ScriptOrder::InsertOrder(), IsAirportTile(), ScriptAirport::IsAirportTile(), IsBridge(), IsBridgeTile(), IsBuoyTile(), ScriptMarine::IsBuoyTile(), ScriptMarine::IsCanalTile(), IsCoastTile(), ScriptTile::IsCoastTile(), IsCompanyHQ(), ScriptTile::IsDesertTile(), IsDockTile(), ScriptMarine::IsDockTile(), RoadStop::IsDriveThroughRoadStopContinuation(), ScriptTile::IsFarmTile(), IsHangar(), IsHangarTile(), ScriptAirport::IsHangarTile(), IsHouseCompleted(), IsIndustryCompleted(), IsLevelCrossingTile(), ScriptMarine::IsLockTile(), IsNormalRoadTile(), IsOwnedLand(), IsOwnedLandTile(), IsPlainRailTile(), IsPossibleCrossing(), IsRailDepotTile(), IsRailStationTile(), ScriptRail::IsRailTile(), IsRailWaypointTile(), ScriptRoad::IsRoadDepotTile(), IsRoadDepotTile(), IsRoadStop(), IsRoadStopTile(), ScriptRoad::IsRoadTile(), ScriptTile::IsRockTile(), ScriptTile::IsRoughTile(), IsSafeWaitingPosition(), IsShipDepotTile(), ScriptTile::IsSnowTile(), IsSnowTile(), ScriptTile::IsStationTile(), IsStatue(), IsStatueTile(), IsTileForestIndustry(), IsTransmitterTile(), IsTunnel(), IsTunnelTile(), IsValidTile(), IsValidTileForWaypoint(), IsWaitingPositionFree(), ScriptMarine::IsWaterDepotTile(), IsWateredTile(), IsWaterTile(), ScriptTile::IsWaterTile(), Vehicle::LeaveStation(), LoadUnloadVehicle(), MakeHouseTile(), MakeSingleHouseBigger(), MarkTileDirtyIfCanalOrRiver(), MayHaveBridgeAbove(), MoveBuoysToWaypoints(), MoveWaypointsToBaseStations(), ObjectGetVariable(), CYapfCostRailT< Types >::PfCalcCost(), ProcessOrders(), RemoveRoad(), ScriptRoad::RemoveRoadDepot(), ScriptRoad::RemoveRoadStation(), ResetHouseAge(), ResetIndustryConstructionStage(), RoadFindPathToDest(), StationRect::ScanForStationTiles(), ScriptDepotList::ScriptDepotList(), ScriptTileList_IndustryAccepting::ScriptTileList_IndustryAccepting(), ScriptTileList_IndustryProducing::ScriptTileList_IndustryProducing(), ScriptTileList_StationType::ScriptTileList_StationType(), SearchLumberMillTrees(), SearchNearbyHouseClass(), SearchNearbyHouseGRFID(), SearchNearbyHouseID(), SearchTileForStatue(), SetAnimationFrame(), SetClearCounter(), SetClearDensity(), SetClearGroundDensity(), SetDefaultRailGui(), SetHouseCompleted(), SetHouseProcessingTime(), SetHouseRandomBits(), SetHouseTriggers(), SetHouseType(), SetIndustryAnimationLoop(), SetIndustryCompleted(), SetIndustryConstructionCounter(), SetIndustryConstructionStage(), SetIndustryGfx(), SetIndustryRandomBits(), SetIndustryTriggers(), SetRoadTypes(), SetStationGfx(), SetStationTileRandomBits(), SetTileOwner(), SetTownIndex(), SetTreeCounter(), SetTreeGroundDensity(), SetTreeGrowth(), SetTropicZone(), SetTunnelBridgeReservation(), SetTunnelBridgeSnowOrDesert(), Industry::TileBelongsToIndustry(), TileLoop_Water(), TownCanBePlacedHere(), TrainCanLeaveTile(), TrainController(), TriggerWatchedCargoCallbacks(), UpdateHousesAndTowns(), UpdateNearestTownForRoadTiles(), UpdateStatusAfterSwap(), UpdateTownCargos(), and WatchedCargoCallback().
static bool IsValidTile | ( | TileIndex | tile | ) | [inline, static] |
Checks if a tile is valid.
tile | The tile to check |
Definition at line 122 of file tile_map.h.
References IsTileType(), MapSize(), and MP_VOID.
Referenced by ScriptRoad::_BuildRoadInternal(), ScriptRoad::_BuildRoadStationInternal(), ScriptTileList::AddRectangle(), ScriptTileList::AddTile(), ScriptRoad::AreRoadTilesConnected(), ScriptMarine::AreWaterTilesConnected(), ScriptAirport::BuildAirport(), ScriptBridge::BuildBridge(), ScriptMarine::BuildBuoy(), ScriptMarine::BuildCanal(), ScriptCompany::BuildCompanyHQ(), ScriptMarine::BuildDock(), ScriptMarine::BuildLock(), ScriptRail::BuildNewGRFRailStation(), ScriptRail::BuildRail(), ScriptRail::BuildRailDepot(), ScriptRail::BuildRailStation(), ScriptRail::BuildRailTrack(), ScriptRail::BuildRailWaypoint(), ScriptRoad::BuildRoadDepot(), ScriptSign::BuildSign(), ScriptTunnel::BuildTunnel(), ScriptMarine::BuildWaterDepot(), ScriptRoad::CanBuildConnectedRoadPartsHere(), CheckIfIndustryTilesAreFree(), CleanUpRoadBits(), CmdBuildBridge(), CmdBuildRoadStop(), CmdBuildTunnel(), CmdRemoveRoadStop(), ScriptRail::ConvertRailType(), ScriptTile::DemolishTile(), Disaster_CoalMine_Init(), DisasterTick_Big_Ufo(), DisasterTick_Submarine(), DisasterTick_Zeppeliner(), DoCommand(), DoCommandPInternal(), DoTriggerIndustryTile(), DrawTileSelectionRect(), FlowRiver(), ScriptTile::GetCargoAcceptance(), ScriptTile::GetCargoProduction(), ScriptTile::GetClosestTown(), ScriptTile::GetCornerHeight(), ScriptAirport::GetHangarOfAirport(), ScriptIndustry::GetIndustryID(), ScriptTile::GetMaxHeight(), ScriptTile::GetMinHeight(), ScriptAirport::GetNearestTown(), ScriptRoad::GetNeighbourRoadCount(), ScriptAirport::GetNoiseLevelIncrease(), ScriptAirport::GetNumHangars(), GetOrderTypeByTile(), GetOtherAqueductEnd(), ScriptBridge::GetOtherBridgeEnd(), ScriptTunnel::GetOtherTunnelEnd(), ScriptTile::GetOwner(), ScriptTile::GetSlope(), ScriptStation::GetStationID(), GetTileOwner(), ScriptTile::GetTownAuthority(), GrowTownInTile(), GrowTownWithBridge(), ScriptTile::HasTransportType(), ScriptTile::HasTreeOnTile(), ScriptAirport::IsAirportTile(), ScriptBridge::IsBridgeTile(), ScriptTile::IsBuildable(), ScriptMarine::IsBuoyTile(), ScriptMarine::IsCanalTile(), ScriptTile::IsCoastTile(), ScriptTile::IsDesertTile(), ScriptMarine::IsDockTile(), ScriptRoad::IsDriveThroughRoadStationTile(), ScriptTile::IsFarmTile(), ScriptAirport::IsHangarTile(), ScriptRail::IsLevelCrossingTile(), ScriptMarine::IsLockTile(), IsNeighborRoadTile(), ScriptRail::IsRailDepotTile(), ScriptRail::IsRailStationTile(), ScriptRail::IsRailTile(), ScriptRail::IsRailWaypointTile(), ScriptRoad::IsRoadDepotTile(), ScriptRoad::IsRoadStationTile(), ScriptRoad::IsRoadTile(), ScriptTile::IsRockTile(), ScriptTile::IsRoughTile(), ScriptTile::IsSnowTile(), ScriptTile::IsStationTile(), IsTunnelInWayDir(), ScriptTunnel::IsTunnelTile(), ScriptMarine::IsWaterDepotTile(), ScriptTile::IsWaterTile(), MakeLake(), NPFHash(), ObjectGetVariable(), ScriptTile::PlantTree(), ScriptTile::PlantTreeRectangle(), ScriptAirport::RemoveAirport(), ScriptMarine::RemoveBuoy(), ScriptMarine::RemoveCanal(), ScriptMarine::RemoveDock(), ScriptMarine::RemoveLock(), ScriptRail::RemoveRail(), ScriptRail::RemoveRailStationTileRectangle(), ScriptRail::RemoveRailTrack(), ScriptRail::RemoveRailWaypointTileRectangle(), ScriptTileList::RemoveRectangle(), ScriptRoad::RemoveRoad(), ScriptRoad::RemoveRoadDepot(), ScriptRoad::RemoveRoadFull(), ScriptRoad::RemoveRoadStation(), ScriptTileList::RemoveTile(), ScriptMarine::RemoveWaterDepot(), ScriptTileList_IndustryAccepting::ScriptTileList_IndustryAccepting(), ScriptTileList_IndustryProducing::ScriptTileList_IndustryProducing(), and SetTileOwner().
static void SetAnimationFrame | ( | TileIndex | t, | |
byte | frame | |||
) | [inline, static] |
Set a new animation frame.
t | the tile | |
frame | the new frame number |
Definition at line 223 of file tile_map.h.
References _me, IsTileType(), TileExtended::m7, MP_HOUSE, MP_INDUSTRY, MP_OBJECT, and MP_STATION.
Referenced by AfterLoadGame(), AnimationBase< IndustryAnimationBase, IndustryTileSpec, Industry, int, GetSimpleIndustryCallback >::AnimateTile(), AnimationBase< IndustryAnimationBase, IndustryTileSpec, Industry, int, GetSimpleIndustryCallback >::ChangeAnimationFrame(), CmdBuildRailStation(), IncreaseAnimationStage(), and MakeHouseTile().
static void SetTileHeight | ( | TileIndex | tile, | |
uint | height | |||
) | [inline, static] |
Sets the height of a tile.
This function sets the height of the northern corner of a tile.
tile | The tile to change the height | |
height | The new height value of the tile |
Definition at line 47 of file tile_map.h.
References _m, MapSize(), MAX_TILE_HEIGHT, and SB().
Referenced by CmdTerraformLand(), FixSlopes(), FlatEmptyWorld(), GrayscaleToMapHeights(), MakeVoid(), and TgenSetTileHeight().
Sets the owner of a tile.
This function sets the owner status of a tile. Note that you cannot set a owner for tiles of type MP_HOUSE, MP_VOID and MP_INDUSTRY.
tile | The tile to change the owner status. | |
owner | The new owner. |
Definition at line 159 of file tile_map.h.
References _m, IsTileType(), IsValidTile(), MP_HOUSE, MP_INDUSTRY, and SB().
Referenced by AfterLoadGame(), FixOwnerOfRailTrack(), MakeBridgeRamp(), MakeClear(), MakeField(), MakeLockTile(), MakeObject(), MakeRailTunnel(), MakeRoadCrossing(), MakeRoadDepot(), MakeRoadNormal(), MakeRoadTunnel(), MakeShipDepot(), MakeShore(), MakeStation(), MakeTree(), MakeWater(), and RemoveRoad().
Set the type of a tile.
This functions sets the type of a tile. If the type MP_VOID is selected the tile must be at the south-west or south-east edges of the map and vice versa.
tile | The tile to save the new type | |
type | The type to save |
Definition at line 92 of file tile_map.h.
References _m, _settings_game, GameSettings::construction, ConstructionSettings::freeform_edges, MapMaxX(), MapMaxY(), MapSize(), MP_VOID, SB(), TileX(), and TileY().
Referenced by MakeBridgeRamp(), MakeClear(), MakeField(), MakeHouseTile(), MakeIndustry(), MakeLockTile(), MakeObject(), MakeRailTunnel(), MakeRoadCrossing(), MakeRoadDepot(), MakeRoadNormal(), MakeRoadTunnel(), MakeShipDepot(), MakeShore(), MakeStation(), MakeTree(), MakeVoid(), and MakeWater().
static void SetTropicZone | ( | TileIndex | tile, | |
TropicZone | type | |||
) | [inline, static] |
Set the tropic zone.
tile | the tile to set the zone of | |
type | the new type |
Definition at line 186 of file tile_map.h.
References _m, IsTileType(), MapSize(), MP_VOID, SB(), and TROPICZONE_NORMAL.
Referenced by AfterLoadGame(), CmdPlantTree(), GenerateDesertArea(), and RiverModifyDesertZone().
static uint TileHash | ( | uint | x, | |
uint | y | |||
) | [inline, static] |
Calculate a hash value from a tile position.
x | The X coordinate | |
y | The Y coordinate |
Definition at line 274 of file tile_map.h.
Referenced by AfterLoadGame(), Town::InitializeLayout(), River_Hash(), and TileHash2Bit().
static uint TileHash2Bit | ( | uint | x, | |
uint | y | |||
) | [inline, static] |
Get the last two bits of the TileHash from a tile position.
x | The X coordinate | |
y | The Y coordinate |
Definition at line 292 of file tile_map.h.
References GB(), and TileHash().
Referenced by DrawTile_Town(), and HouseGetVariable().
static uint TileHeight | ( | TileIndex | tile | ) | [inline, static] |
Returns the height of a tile.
This function returns the height of the northern corner of a tile. This is saved in the global map-array. It does not take affect by any slope-data of the tile.
tile | The tile to get the height from |
Definition at line 31 of file tile_map.h.
References _m, GB(), and MapSize().
Referenced by AfterLoadGame(), AmbientSoundEffectCallback(), CalcHeightdiff(), CheckIfCanLevelIndustryPlatform(), CheckNewIndustry_OilRig(), CmdBuildCanal(), CmdLevelLand(), CmdTerraformLand(), CommonRaiseLowerBigLand(), TownViewWindow::DrawWidget(), FixSlopes(), FlowRiver(), ScriptTown::GetCargoGoal(), TownViewWindow::GetDesiredInfoHeight(), GetSmallMapContoursPixels(), GetSmallMapIndustriesPixels(), GetSmallMapOwnerPixels(), GetTileMaxZ(), GetTileSlope(), GetTileZ(), HeightmapCallback(), MakeLake(), TerraformGetHeightOfTile(), TilePixelHeight(), and UpdateTownGrowRate().
static uint TilePixelHeight | ( | TileIndex | tile | ) | [inline, static] |
Returns the height of a tile in pixels.
This function returns the height of the northern corner of a tile in pixels.
tile | The tile to get the height |
Definition at line 62 of file tile_map.h.
References TILE_HEIGHT, and TileHeight().
Referenced by MakeWorldScreenshot().