Reduce blitter MoveTo calls when drawing viewport map scrolling box blend

This commit is contained in:
Jonathan G Rennison
2022-05-19 00:07:09 +01:00
parent 16259e9619
commit b464c589af

View File

@@ -3169,10 +3169,14 @@ static void ViewportMapDrawScrollingViewportBox(const Viewport * const vp)
const int y = UnScaleByZoom(t_inter - _vd.dpi.top, vp->zoom); const int y = UnScaleByZoom(t_inter - _vd.dpi.top, vp->zoom);
/* If asked, with 32bpp we can do some blending */ /* If asked, with 32bpp we can do some blending */
if (_settings_client.gui.show_scrolling_viewport_on_map >= 2 && blitter->GetScreenDepth() == 32) if (_settings_client.gui.show_scrolling_viewport_on_map >= 2 && blitter->GetScreenDepth() == 32) {
for (int j = y; j < y + h_inter; j++) for (int j = y; j < y + h_inter; j++) {
for (int i = x; i < x + w_inter; i++) uint32 *buf = (uint32*) blitter->MoveTo(_vd.dpi.dst_ptr, x, j);
PixelBlend((uint32*) blitter->MoveTo(_vd.dpi.dst_ptr, i, j), 0x40FCFCFC); for (int i = 0; i < w_inter; i++) {
PixelBlend(buf + i, 0x40FCFCFC);
}
}
}
/* Draw area contour */ /* Draw area contour */
if (_settings_client.gui.show_scrolling_viewport_on_map != 2) { if (_settings_client.gui.show_scrolling_viewport_on_map != 2) {