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:
@@ -28,6 +28,7 @@
|
||||
#include "core/pool_type.hpp"
|
||||
#include "game/game.hpp"
|
||||
#include "linkgraph/linkgraphschedule.h"
|
||||
#include "viewport_func.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -59,6 +60,8 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin
|
||||
|
||||
AllocateMap(size_x, size_y);
|
||||
|
||||
ViewportMapClearTunnelCache();
|
||||
|
||||
_pause_mode = PM_UNPAUSED;
|
||||
_fast_forward = 0;
|
||||
_tick_counter = 0;
|
||||
|
Reference in New Issue
Block a user