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

Function drawViewCornersOnMap

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

0x0046BE34

Source from the content-addressed store, hash-verified

1973
1974 // 0x0046BE34
1975 static void drawViewCornersOnMap(Gfx::DrawingContext& drawingCtx, int16_t left, int16_t top, int16_t leftOffset, int16_t topOffset, int16_t rightOffset, int16_t bottomOffset)
1976 {
1977 left /= 32;
1978 top /= 16;
1979 left += kViewFrameOffsetsByRotation[getCurrentRotation()].x;
1980 top += kViewFrameOffsetsByRotation[getCurrentRotation()].y;
1981 auto right = left;
1982 auto bottom = top;
1983 left += leftOffset;
1984 top += topOffset;
1985 right += rightOffset;
1986 bottom += bottomOffset;
1987
1988 const auto colour = PaletteIndex::black0;
1989
1990 drawRectOnMap(drawingCtx, left, top, right, bottom, colour, Gfx::RectFlags::none);
1991 }
1992
1993 // 0x0046BAD5
1994 static void drawViewportPosition(Gfx::DrawingContext& drawingCtx)

Callers 1

drawViewportPositionFunction · 0.85

Calls 2

getCurrentRotationFunction · 0.85
drawRectOnMapFunction · 0.85

Tested by

no test coverage detected