Blitter: Change DrawLine to be templated

This commit is contained in:
Jonathan G Rennison
2018-01-16 23:23:52 +00:00
parent cd68e9fac7
commit 0c2f49c08d
9 changed files with 163 additions and 140 deletions

View File

@@ -35,6 +35,13 @@ void Blitter_8bppBase::SetPixel(void *video, int x, int y, uint8 colour)
*((uint8 *)video + x + y * _screen.pitch) = colour;
}
void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash)
{
this->DrawLineGeneric(x, y, x2, y2, screen_width, screen_height, width, dash, [=](int x, int y) {
*((uint8 *)video + x + y * _screen.pitch) = colour;
});
}
void Blitter_8bppBase::SetLine(void *video, int x, int y, uint8 *colours, uint width)
{
memcpy((uint8 *)video + x + y * _screen.pitch, colours, width * sizeof(uint8));