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

Method DrawColourMappingRect

src/blitter/8bpp_base.cpp:17–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include "../safeguards.h"
16
17void Blitter_8bppBase::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
18{
19 const uint8_t *ctab = GetNonSprite(pal, SpriteType::Recolour) + 1;
20
21 do {
22 for (int i = 0; i != width; i++) *((uint8_t *)dst + i) = ctab[((uint8_t *)dst)[i]];
23 dst = (uint8_t *)dst + _screen.pitch;
24 } while (--height);
25}
26
27void *Blitter_8bppBase::MoveTo(void *video, int x, int y)
28{

Callers 2

GfxFillRectFunction · 0.45
GfxFillPolygonFunction · 0.45

Calls 1

GetNonSpriteFunction · 0.85

Tested by

no test coverage detected