* Checks if a house of size 2x2 can be built at this tile. * @param tile The tile of the house's northernmost tile. * @param z The maximum tile z, so all tiles are the same height. * @param noslope Are foundations disallowed for this house? * @return true iff house can be built here. * @see CheckBuildHouseSameZ() */
| 2629 | * @see CheckBuildHouseSameZ() |
| 2630 | */ |
| 2631 | static bool CheckFree2x2Area(TileIndex tile, int z, bool noslope) |
| 2632 | { |
| 2633 | /* we need to check this tile too because we can be at different tile now */ |
| 2634 | if (!CheckBuildHouseSameZ(tile, z, noslope)) return false; |
| 2635 | |
| 2636 | for (DiagDirection d = DIAGDIR_SE; d < DIAGDIR_END; d++) { |
| 2637 | tile += TileOffsByDiagDir(d); |
| 2638 | if (!CheckBuildHouseSameZ(tile, z, noslope)) return false; |
| 2639 | } |
| 2640 | |
| 2641 | return true; |
| 2642 | } |
| 2643 | |
| 2644 | |
| 2645 | /** |
no test coverage detected