]> git.lizzy.rs Git - minetest.git/blobdiff - src/client.h
Sound API: Add fading sounds
[minetest.git] / src / client.h
index 68953d40216fe3e2150bc44d28cab4f4944f50d9..e8db7de44e73ce963bcc0bd72ef5d735f1735e35 100644 (file)
@@ -77,6 +77,7 @@ enum ClientEventType
        CE_HUDCHANGE,
        CE_SET_SKY,
        CE_OVERRIDE_DAY_NIGHT_RATIO,
+       CE_CLOUD_PARAMS,
 };
 
 struct ClientEvent
@@ -178,6 +179,15 @@ struct ClientEvent
                        bool do_override;
                        float ratio_f;
                } override_day_night_ratio;
+               struct {
+                       f32 density;
+                       u32 color_bright;
+                       u32 color_ambient;
+                       f32 height;
+                       f32 thickness;
+                       f32 speed_x;
+                       f32 speed_y;
+               } cloud_params;
        };
 };
 
@@ -318,6 +328,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        void handleCommand_ItemDef(NetworkPacket* pkt);
        void handleCommand_PlaySound(NetworkPacket* pkt);
        void handleCommand_StopSound(NetworkPacket* pkt);
+       void handleCommand_FadeSound(NetworkPacket *pkt);
        void handleCommand_Privileges(NetworkPacket* pkt);
        void handleCommand_InventoryFormSpec(NetworkPacket* pkt);
        void handleCommand_DetachedInventory(NetworkPacket* pkt);
@@ -331,6 +342,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        void handleCommand_HudSetFlags(NetworkPacket* pkt);
        void handleCommand_HudSetParam(NetworkPacket* pkt);
        void handleCommand_HudSetSky(NetworkPacket* pkt);
+       void handleCommand_CloudParams(NetworkPacket* pkt);
        void handleCommand_OverrideDayNightRatio(NetworkPacket* pkt);
        void handleCommand_LocalPlayerAnimations(NetworkPacket* pkt);
        void handleCommand_EyeOffset(NetworkPacket* pkt);
@@ -414,7 +426,8 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        void updateCameraOffset(v3s16 camera_offset)
        { m_mesh_update_thread.m_camera_offset = camera_offset; }
 
-       // Get event from queue. CE_NONE is returned if queue is empty.
+       bool hasClientEvents() const { return !m_client_event_queue.empty(); }
+       // Get event from queue. If queue is empty, it triggers an assertion failure.
        ClientEvent getClientEvent();
 
        bool accessDenied() const { return m_access_denied; }
@@ -509,6 +522,8 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        void showGameFog(const bool show = true);
        void showGameDebug(const bool show = true);
 
+       IrrlichtDevice *getDevice() const { return m_device; }
+
 private:
 
        // Virtual methods from con::PeerHandler