MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / DrawRect

Method DrawRect

src/blitter/8bpp_base.cpp:44–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void Blitter_8bppBase::DrawRect(void *video, int width, int height, PixelColour colour)
45{
46 std::byte *p = static_cast<std::byte *>(video);
47 do {
48 std::fill_n(p, width, static_cast<std::byte>(colour.p));
49 p += _screen.pitch;
50 } while (--height);
51}
52
53void Blitter_8bppBase::CopyFromBuffer(void *video, const void *src, int width, int height)
54{

Callers 2

GfxFillRectFunction · 0.45
GfxFillPolygonFunction · 0.45

Calls 1

fill_nFunction · 0.85

Tested by

no test coverage detected