MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / lowerWater

Function lowerWater

src/OpenLoco/src/Ui/Windows/TerraForm.cpp:2058–2071  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2056 }
2057
2058 static uint32_t lowerWater(uint8_t flags)
2059 {
2060 if (flags & GameCommands::Flags::apply)
2061 {
2062 Common::sub_4A69DD();
2063 GameCommands::setErrorTitle(StringIds::error_cant_raise_water_here);
2064 }
2065
2066 auto [pointA, pointB] = World::getMapSelectionArea();
2067 GameCommands::LowerWaterArgs args{};
2068 args.pointA = pointA;
2069 args.pointB = pointB;
2070 return GameCommands::doCommand(args, flags);
2071 }
2072
2073 // 0x004BCDBF
2074 static void toolDrag([[maybe_unused]] Window& self, const WidgetIndex_t widgetIndex, [[maybe_unused]] const WidgetId id, const int16_t x, const int16_t y)

Callers 2

onToolUpdateFunction · 0.70
toolDragFunction · 0.70

Calls 4

sub_4A69DDFunction · 0.85
setErrorTitleFunction · 0.85
getMapSelectionAreaFunction · 0.85
doCommandFunction · 0.50

Tested by

no test coverage detected