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

Function drawVehicleOnMap

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

0x0046BF0F based on

Source from the content-addressed store, hash-verified

1741
1742 // 0x0046BF0F based on
1743 static void drawVehicleOnMap(Gfx::DrawingContext& drawingCtx, Vehicles::VehicleBase* vehicle, uint8_t colour)
1744 {
1745 if (vehicle->position.x == Location::null)
1746 {
1747 return;
1748 }
1749
1750 auto trainPos = locationToMapWindowPos(vehicle->position);
1751
1752 drawingCtx.fillRect(trainPos.x, trainPos.y, trainPos.x, trainPos.y, colour, Gfx::RectFlags::none);
1753 }
1754
1755 // 0x0046C294
1756 static std::pair<Point, Point> drawRouteLine(Gfx::DrawingContext& drawingCtx, Point startPos, Point endPos, Pos2 stationPos, uint8_t colour)

Callers 1

drawVehiclesOnMapFunction · 0.85

Calls 2

locationToMapWindowPosFunction · 0.85
fillRectMethod · 0.45

Tested by

no test coverage detected