Cache vehicle positions across draw blocks in viewport map mode

This commit is contained in:
Jonathan G Rennison
2020-03-04 22:57:47 +00:00
parent 7949de2c05
commit a4608f6f72
7 changed files with 80 additions and 24 deletions

View File

@@ -1423,7 +1423,7 @@ void RedrawScreenRect(int left, int top, int right, int bottom)
}
static std::vector<Rect> _dirty_viewport_occlusions;
static const ViewPort *_dirty_viewport;
static ViewPort *_dirty_viewport;
static NWidgetDisplay _dirty_viewport_disp_flags;
static void DrawDirtyViewport(uint occlusion, int left, int top, int right, int bottom)
@@ -1677,6 +1677,9 @@ void DrawDirtyBlocks()
_dirty_blocks.clear();
++_dirty_block_colour;
extern void ClearViewPortCaches();
ClearViewPortCaches();
}
void UnsetDirtyBlocks(int left, int top, int right, int bottom)