Add fast path to ViewportMapDrawVehicles horizontal hash bit check
This commit is contained in:
@@ -1619,6 +1619,7 @@ void ViewportMapDrawVehicles(DrawPixelInfo *dpi, Viewport *vp)
|
|||||||
|
|
||||||
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
Blitter *blitter = BlitterFactory::GetCurrentBlitter();
|
||||||
for (int y = vhb.yl;; y = (y + (1 << 6)) & (0x3F << 6)) {
|
for (int y = vhb.yl;; y = (y + (1 << 6)) & (0x3F << 6)) {
|
||||||
|
if (vp->map_draw_vehicles_cache.done_hash_bits[y >> 6] != UINT64_MAX) {
|
||||||
for (int x = vhb.xl;; x = (x + 1) & 0x3F) {
|
for (int x = vhb.xl;; x = (x + 1) & 0x3F) {
|
||||||
if (!HasBit(vp->map_draw_vehicles_cache.done_hash_bits[y >> 6], x)) {
|
if (!HasBit(vp->map_draw_vehicles_cache.done_hash_bits[y >> 6], x)) {
|
||||||
SetBit(vp->map_draw_vehicles_cache.done_hash_bits[y >> 6], x);
|
SetBit(vp->map_draw_vehicles_cache.done_hash_bits[y >> 6], x);
|
||||||
@@ -1639,6 +1640,7 @@ void ViewportMapDrawVehicles(DrawPixelInfo *dpi, Viewport *vp)
|
|||||||
|
|
||||||
if (x == vhb.xu) break;
|
if (x == vhb.xu) break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (y == vhb.yu) break;
|
if (y == vhb.yu) break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user