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

Function clear

src/OpenLoco/src/Graphics/SoftwareDrawingContext.cpp:50–61  ·  view source on GitHub ↗

0x00447485 edi: rt ebp: fill

Source from the content-addressed store, hash-verified

48 // edi: rt
49 // ebp: fill
50 static void clear(const RenderTarget& rt, uint32_t fill)
51 {
52 int32_t w = rt.width / (1 << rt.zoomLevel);
53 int32_t h = rt.height / (1 << rt.zoomLevel);
54 uint8_t* ptr = rt.bits;
55
56 for (int32_t y = 0; y < h; y++)
57 {
58 std::fill_n(ptr, w, fill);
59 ptr += w + rt.pitch;
60 }
61 }
62
63 static void clearSingle(const RenderTarget& rt, uint8_t paletteId)
64 {

Callers 3

clearSingleFunction · 0.85
clearMethod · 0.85
resizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected