diff --git a/src/transparency.h b/src/transparency.h index f6591cb96c..601ca4f780 100644 --- a/src/transparency.h +++ b/src/transparency.h @@ -74,6 +74,9 @@ static inline void ToggleTransparency(TransparencyOption to) extern void UpdateAllVehiclesIsDrawn(); if (to == TO_TUNNELS) UpdateAllVehiclesIsDrawn(); + + extern void MarkAllViewportMapLandscapesDirty(); + if (to == TO_TREES) MarkAllViewportMapLandscapesDirty(); } /** @@ -84,6 +87,9 @@ static inline void ToggleTransparency(TransparencyOption to) static inline void ToggleInvisibility(TransparencyOption to) { ToggleBit(_invisibility_opt, to); + + extern void MarkAllViewportMapLandscapesDirty(); + if (to == TO_TREES) MarkAllViewportMapLandscapesDirty(); } /** @@ -132,6 +138,10 @@ static inline void ResetRestoreAllTransparency() extern void UpdateAllVehiclesIsDrawn(); UpdateAllVehiclesIsDrawn(); } + if (HasBit(old_transparency_opt ^ _transparency_opt, TO_TREES)) { + extern void MarkAllViewportMapLandscapesDirty(); + MarkAllViewportMapLandscapesDirty(); + } MarkWholeScreenDirty(); }