| 1608 | } |
| 1609 | |
| 1610 | static void paintLand() |
| 1611 | { |
| 1612 | // CHANGE: Allows the player to change land type outside of the scenario editor. |
| 1613 | if (_adjustToolSize != 0) |
| 1614 | { |
| 1615 | if (_lastSelectedLand != 0xFF) |
| 1616 | { |
| 1617 | GameCommands::setErrorTitle(StringIds::error_cant_change_land_type); |
| 1618 | auto [pointA, pointB] = World::getMapSelectionArea(); |
| 1619 | |
| 1620 | ChangeLandMaterialArgs args{}; |
| 1621 | args.pointA = pointA; |
| 1622 | args.pointB = pointB; |
| 1623 | args.landType = _lastSelectedLand; |
| 1624 | GameCommands::doCommand(args, Flags::apply); |
| 1625 | } |
| 1626 | } |
| 1627 | } |
| 1628 | |
| 1629 | // 0x004BC9ED |
| 1630 | static void onToolDown([[maybe_unused]] Window& self, const WidgetIndex_t widgetIndex, [[maybe_unused]] const WidgetId id, [[maybe_unused]] const int16_t x, [[maybe_unused]] const int16_t y) |
no test coverage detected