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

Function drawRectOnMap

src/OpenLoco/src/Ui/Windows/MapWindow.cpp:1942–1955  ·  view source on GitHub ↗

0x0046BE51, 0x0046BE34

Source from the content-addressed store, hash-verified

1940
1941 // 0x0046BE51, 0x0046BE34
1942 static void drawRectOnMap(Gfx::DrawingContext& drawingCtx, int16_t left, int16_t top, int16_t right, int16_t bottom, uint8_t colour, Gfx::RectFlags flags)
1943 {
1944 if (left > right)
1945 {
1946 std::swap(left, right);
1947 }
1948
1949 if (top > bottom)
1950 {
1951 std::swap(top, bottom);
1952 }
1953
1954 drawingCtx.fillRect(left, top, right, bottom, colour, flags);
1955 }
1956
1957 // 0x0046BE51
1958 static void drawViewOnMap(Gfx::DrawingContext& drawingCtx, int16_t left, int16_t top, int16_t right, int16_t bottom)

Callers 2

drawViewOnMapFunction · 0.85
drawViewCornersOnMapFunction · 0.85

Calls 1

fillRectMethod · 0.45

Tested by

no test coverage detected