LuaVoxelManip: Add option to allocate blank data
[oweals/minetest.git] / src / client.h
index a5fda98d7c37769d9c65614caac218179dab7c3e..9f36a257fe2f73074d68c677cedddc27f30edf01 100644 (file)
@@ -46,6 +46,8 @@ class ClientMediaDownloader;
 struct MapDrawControl;
 class MtEventManager;
 struct PointedThing;
+class Database;
+class Server;
 
 struct QueuedMeshUpdate
 {
@@ -215,6 +217,7 @@ struct ClientEvent
                        v2f *align;
                        v2f *offset;
                        v3f *world_pos;
+                       v2s32 * size;
                } hudadd;
                struct{
                        u32 id;
@@ -226,6 +229,7 @@ struct ClientEvent
                        std::string *sdata;
                        u32 data;
                        v3f *v3fdata;
+                       v2s32 * v2s32data;
                } hudchange;
                struct{
                        video::SColor *bgcolor;
@@ -301,6 +305,7 @@ public:
                        IrrlichtDevice *device,
                        const char *playername,
                        std::string password,
+                       bool is_simple_singleplayer_game,
                        MapDrawControl &control,
                        IWritableTextureSource *tsrc,
                        IWritableShaderSource *shsrc,
@@ -393,6 +398,9 @@ public:
        int getCrackLevel();
        void setCrack(int level, v3s16 pos);
 
+       void setHighlighted(v3s16 pos, bool show_higlighted);
+       v3s16 getHighlighted(){ return m_highlighted_pos; }
+
        u16 getHP();
        u16 getBreath();
 
@@ -409,7 +417,8 @@ public:
        void addUpdateMeshTaskWithEdge(v3s16 blockpos, bool ack_to_server=false, bool urgent=false);
        void addUpdateMeshTaskForNode(v3s16 nodepos, bool ack_to_server=false, bool urgent=false);
        
-       void updateCameraOffset(v3s16 camera_offset){ m_mesh_update_thread.m_camera_offset = camera_offset; }
+       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.
        ClientEvent getClientEvent();
@@ -432,6 +441,8 @@ public:
        void afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font);
 
        float getRTT(void);
+       float getCurRate(void);
+       float getAvgRate(void);
 
        // IGameDef interface
        virtual IItemDefManager* getItemDefManager();
@@ -439,6 +450,7 @@ public:
        virtual ICraftDefManager* getCraftDefManager();
        virtual ITextureSource* getTextureSource();
        virtual IShaderSource* getShaderSource();
+       virtual scene::ISceneManager* getSceneManager();
        virtual u16 allocateUnknownNodeId(const std::string &name);
        virtual ISoundManager* getSoundManager();
        virtual MtEventManager* getEventManager();
@@ -456,6 +468,8 @@ public:
 
        LocalClientState getState() { return m_state; }
 
+       void makeScreenshot(IrrlichtDevice *device);
+
 private:
 
        // Virtual methods from con::PeerHandler
@@ -495,10 +509,12 @@ private:
        float m_inventory_from_server_age;
        std::set<v3s16> m_active_blocks;
        PacketCounter m_packetcounter;
+       bool m_show_highlighted;
        // Block mesh animation parameters
        float m_animation_time;
        int m_crack_level;
        v3s16 m_crack_pos;
+       v3s16 m_highlighted_pos;
        // 0 <= m_daynight_i < DAYNIGHT_CACHE_COUNT
        //s32 m_daynight_i;
        //u32 m_daynight_ratio;
@@ -542,6 +558,13 @@ private:
 
        // own state
        LocalClientState m_state;
+
+       // Used for saving server map to disk client-side
+       Database *localdb;
+       Server *localserver;
+
+       // TODO: Add callback to update this when g_settings changes
+       bool m_cache_smooth_lighting;
 };
 
 #endif // !CLIENT_HEADER