| 1654 | } |
| 1655 | |
| 1656 | void UpdateSelectSize(const HouseSpec *spec) |
| 1657 | { |
| 1658 | if (spec == nullptr) { |
| 1659 | SetTileSelectSize(1, 1); |
| 1660 | ResetObjectToPlace(); |
| 1661 | } else { |
| 1662 | SetObjectToPlaceWnd(SPR_CURSOR_TOWN, PAL_NONE, HT_RECT | HT_DIAGONAL, this); |
| 1663 | if (spec->building_flags.Test(BuildingFlag::Size2x2)) { |
| 1664 | SetTileSelectSize(2, 2); |
| 1665 | } else if (spec->building_flags.Test(BuildingFlag::Size2x1)) { |
| 1666 | SetTileSelectSize(2, 1); |
| 1667 | } else if (spec->building_flags.Test(BuildingFlag::Size1x2)) { |
| 1668 | SetTileSelectSize(1, 2); |
| 1669 | } else if (spec->building_flags.Test(BuildingFlag::Size1x1)) { |
| 1670 | SetTileSelectSize(1, 1); |
| 1671 | } |
| 1672 | } |
| 1673 | } |
| 1674 | |
| 1675 | /** |
| 1676 | * Get a date range string for house availability year. |
nothing calls this directly
no test coverage detected