Blitter: Add method to set rectangle colours, skipping D7

This commit is contained in:
Jonathan G Rennison
2024-01-17 02:03:14 +00:00
parent 5c5057e0fc
commit 0e581e0eeb
10 changed files with 85 additions and 4 deletions

View File

@@ -56,6 +56,18 @@ void Blitter_8bppBase::SetRect(void *video, int x, int y, const uint8_t *colours
} while (--lines);
}
void Blitter_8bppBase::SetRectNoD7(void *video, int x, int y, const uint8_t *colours, uint lines, uint width, uint pitch)
{
uint8_t *dst = (uint8_t *)video + x + y * _screen.pitch;
do {
for (size_t i = 0; i < width; i++) {
if (colours[i] != 0xD7) dst[i] = colours[i];
}
dst += _screen.pitch;
colours += pitch;
} while (--lines);
}
void Blitter_8bppBase::DrawRect(void *video, int width, int height, uint8_t colour)
{
do {