diff options
Diffstat (limited to 'source/game/StarWorldClient.hpp')
-rw-r--r-- | source/game/StarWorldClient.hpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/game/StarWorldClient.hpp b/source/game/StarWorldClient.hpp index 3fe66eb..6ccd52e 100644 --- a/source/game/StarWorldClient.hpp +++ b/source/game/StarWorldClient.hpp @@ -170,7 +170,7 @@ public: void collectLiquid(List<Vec2I> const& tilePositions, LiquidId liquidId); - void waitForLighting(Image* out = nullptr); + Maybe<Vec2I> waitForLighting(Image* out = nullptr); typedef std::function<bool(PlayerPtr, StringView)> BroadcastCallback; BroadcastCallback& broadcastCallback(); @@ -210,6 +210,7 @@ private: typedef function<ClientTile const& (Vec2I)> ClientTileGetter; void lightingTileGather(); + void lightingCalc(); void lightingMain(); void initWorld(WorldStartPacket const& packet); @@ -272,9 +273,18 @@ private: Mutex m_lightingMutex; ConditionVariable m_lightingCond; + atomic<bool> m_stopLightingThread; + + Mutex m_lightMapPrepMutex; Mutex m_lightMapMutex; + + Image m_pendingLightMap; Image m_lightMap; - atomic<bool> m_stopLightingThread; + List<LightSource> m_pendingLights; + List<std::pair<Vec2F, Vec3B>> m_pendingParticleLights; + RectI m_pendingLightRange; + Vec2I m_lightMinPosition; + List<PreviewTile> m_previewTiles; SkyPtr m_sky; |