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

Method drawPreviewImage

src/OpenLoco/src/Objects/BuildingObject.cpp:13–20  ·  view source on GitHub ↗

0x0042DE40

Source from the content-addressed store, hash-verified

11{
12 // 0x0042DE40
13 void BuildingObject::drawPreviewImage(Gfx::DrawingContext& drawingCtx, const int16_t x, const int16_t y) const
14 {
15 auto bit = Numerics::bitScanReverse(colours);
16
17 const auto colour = (bit == -1) ? Colour::black : static_cast<Colour>(bit);
18
19 drawBuilding(drawingCtx, 1, x, y + 40, colour);
20 }
21
22 // 0x0042DB95
23 void BuildingObject::drawBuilding(Gfx::DrawingContext& drawingCtx, uint8_t buildingRotation, int16_t x, int16_t y, Colour colour) const

Callers

nothing calls this directly

Calls 1

bitScanReverseFunction · 0.85

Tested by

no test coverage detected