Update to v4 of house placing patch.

This commit is contained in:
patch-import
2016-04-08 19:42:10 +01:00
committed by Jonathan G Rennison
220 changed files with 11448 additions and 3426 deletions

View File

@@ -170,7 +170,19 @@ enum TownFlags {
CommandCost CheckforTownRating(DoCommandFlag flags, Town *t, TownRatingCheckType type);
TileIndexDiff GetHouseNorthPart(HouseID &house);
TileIndexDiffC GetHouseNorthPartDiffC(HouseID &house);
/**
* Determines if a given HouseID is part of a multitile house.
* The given ID is set to the ID of the north tile and the TileDiff to the north tile is returned.
*
* @param house Is changed to the HouseID of the north tile of the same house
* @return TileDiff from the tile of the given HouseID to the north tile
*/
static inline TileIndexDiff GetHouseNorthPart(HouseID &house)
{
return ToTileIndexDiff(GetHouseNorthPartDiffC(house));
}
Town *CalcClosestTownFromTile(TileIndex tile, uint threshold = UINT_MAX);
@@ -188,7 +200,7 @@ void UpdateTownCargoBitmap();
CommandCost CheckIfAuthorityAllowsNewStation(TileIndex tile, DoCommandFlag flags);
Town *ClosestTownFromTile(TileIndex tile, uint threshold);
void ChangeTownRating(Town *t, int add, int max, DoCommandFlag flags);
HouseZonesBits TryGetTownRadiusGroup(const Town *t, TileIndex tile);
HouseZonesBits TryGetTownRadiusGroup(const Town *t, TileIndex tile, uint *distance = NULL, uint *zone_inner = NULL, uint *zone_outer = NULL);
HouseZonesBits GetTownRadiusGroup(const Town *t, TileIndex tile);
void SetTownRatingTestMode(bool mode);
uint GetMaskOfTownActions(int *nump, CompanyID cid, const Town *t);