Cache tunnel info in viewport map mode, to prevent render flicker.

If we see a tunnel during the usual tile scan, keep it in the cache
until it is explicitly evicted by a clear tunnel tile action, or
the cache is cleared at game init/load/shutdown.
Select colours at the drawing rather than the cache-building stage.
Bridges and tunnels are now stored/handled separately.
The process for bridges is mostly unchanged.
This commit is contained in:
Jonathan G Rennison
2015-11-11 19:18:32 +00:00
parent 3788228d8f
commit 919057a5e6
6 changed files with 87 additions and 26 deletions

View File

@@ -94,4 +94,7 @@ Point GetViewportStationMiddle(const ViewPort *vp, const Station *st);
void ShowTooltipForTile(Window *w, const TileIndex tile);
void ViewportMapClearTunnelCache();
void ViewportMapInvalidateTunnelCacheByTile(const TileIndex tile);
#endif /* VIEWPORT_FUNC_H */