* Check if a tile is within the map (not a border) * * @param tile The tile to check * @return Whether the tile is in the interior of the map * @pre tile < Map::Size() */
| 107 | * @pre tile < Map::Size() |
| 108 | */ |
| 109 | inline bool IsInnerTile(Tile tile) |
| 110 | { |
| 111 | assert(tile < Map::Size()); |
| 112 | |
| 113 | uint x = TileX(tile); |
| 114 | uint y = TileY(tile); |
| 115 | |
| 116 | return x < Map::MaxX() && y < Map::MaxY() && ((x > 0 && y > 0) || !_settings_game.construction.freeform_edges); |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Set the type of a tile |
no test coverage detected