| 499 | } |
| 500 | |
| 501 | static void UpdateFreeformEdges(int32_t new_value) |
| 502 | { |
| 503 | if (_game_mode == GM_MENU) return; |
| 504 | |
| 505 | if (new_value != 0) { |
| 506 | for (uint x = 0; x < Map::SizeX(); x++) MakeVoid(TileXY(x, 0)); |
| 507 | for (uint y = 0; y < Map::SizeY(); y++) MakeVoid(TileXY(0, y)); |
| 508 | } else { |
| 509 | /* Make tiles at the border water again. */ |
| 510 | for (uint i = 0; i < Map::MaxX(); i++) { |
| 511 | SetTileHeight(TileXY(i, 0), 0); |
| 512 | SetTileType(TileXY(i, 0), MP_WATER); |
| 513 | } |
| 514 | for (uint i = 0; i < Map::MaxY(); i++) { |
| 515 | SetTileHeight(TileXY(0, i), 0); |
| 516 | SetTileType(TileXY(0, i), MP_WATER); |
| 517 | } |
| 518 | } |
| 519 | MarkWholeScreenDirty(); |
| 520 | } |
| 521 | |
| 522 | /** |
| 523 | * Changing the setting "allow multiple NewGRF sets" is not allowed |
nothing calls this directly
no test coverage detected