* Draw/colour the blocks that have been redrawn. */
| 1754 | * Draw/colour the blocks that have been redrawn. |
| 1755 | */ |
| 1756 | static void ViewportDrawDirtyBlocks() |
| 1757 | { |
| 1758 | Blitter *blitter = BlitterFactory::GetCurrentBlitter(); |
| 1759 | const DrawPixelInfo *dpi = _cur_dpi; |
| 1760 | void *dst; |
| 1761 | int right = UnScaleByZoom(dpi->width, dpi->zoom); |
| 1762 | int bottom = UnScaleByZoom(dpi->height, dpi->zoom); |
| 1763 | |
| 1764 | PixelColour colour = _string_colourmap[_dirty_block_colour & 0xF]; |
| 1765 | |
| 1766 | dst = dpi->dst_ptr; |
| 1767 | |
| 1768 | uint8_t bo = UnScaleByZoom(dpi->left + dpi->top, dpi->zoom) & 1; |
| 1769 | do { |
| 1770 | for (int i = (bo ^= 1); i < right; i += 2) blitter->SetPixel(dst, i, 0, colour); |
| 1771 | dst = blitter->MoveTo(dst, 0, 1); |
| 1772 | } while (--bottom > 0); |
| 1773 | } |
| 1774 | |
| 1775 | static void ViewportDrawStrings(ZoomLevel zoom, const StringSpriteToDrawVector *sstdv) |
| 1776 | { |
no test coverage detected