]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/map.h
Merge branch 'master' of https://github.com/minetest/minetest
[dragonfireclient.git] / src / map.h
index 4d9847063066075eb575c8a6c929bfd80b63289c..e0db2e2627a01c4345df8978d90e895a4a43e784 100644 (file)
--- a/src/map.h
+++ b/src/map.h
@@ -123,7 +123,7 @@ class Map /*: public NodeContainer*/
 {
 public:
 
-       Map(std::ostream &dout, IGameDef *gamedef);
+       Map(IGameDef *gamedef);
        virtual ~Map();
        DISABLE_CLASS_COPY(Map);
 
@@ -149,8 +149,6 @@ class Map /*: public NodeContainer*/
        MapSector * getSectorNoGenerateNoLock(v2s16 p2d);
        // Same as the above (there exists no lock anymore)
        MapSector * getSectorNoGenerate(v2s16 p2d);
-       // Gets an existing sector or creates an empty one
-       //MapSector * getSectorCreate(v2s16 p2d);
 
        /*
                This is overloaded by ClientMap and ServerMap to allow
@@ -162,7 +160,9 @@ class Map /*: public NodeContainer*/
        MapBlock * getBlockNoCreate(v3s16 p);
        // Returns NULL if not found
        MapBlock * getBlockNoCreateNoEx(v3s16 p);
-
+       
+       void listAllLoadedBlocks(std::vector<v3s16> &dst);
+       
        /* Server overrides */
        virtual MapBlock * emergeBlock(v3s16 p, bool create_blank=true)
        { return getBlockNoCreateNoEx(p); }
@@ -268,11 +268,6 @@ class Map /*: public NodeContainer*/
        void setNodeTimer(const NodeTimer &t);
        void removeNodeTimer(v3s16 p);
 
-       /*
-               Misc.
-       */
-       std::map<v2s16, MapSector*> *getSectorsPtr(){return &m_sectors;}
-
        /*
                Variables
        */
@@ -283,8 +278,6 @@ class Map /*: public NodeContainer*/
 protected:
        friend class LuaVoxelManip;
 
-       std::ostream &m_dout; // A bit deprecated, could be removed
-
        IGameDef *m_gamedef;
 
        std::set<MapEventReceiver*> m_event_receivers;
@@ -374,15 +367,6 @@ class ServerMap : public Map
        */
        MapBlock *getBlockOrEmerge(v3s16 p3d);
 
-       // Helper for placing objects on ground level
-       s16 findGroundLevel(v2s16 p2d);
-
-       /*
-               Misc. helper functions for fiddling with directory and file
-               names when saving
-       */
-       void createDirs(const std::string &path);
-
        /*
                Database functions
        */
@@ -394,12 +378,11 @@ class ServerMap : public Map
 
        void save(ModifiedState save_level);
        void listAllLoadableBlocks(std::vector<v3s16> &dst);
-       void listAllLoadedBlocks(std::vector<v3s16> &dst);
 
        MapgenParams *getMapgenParams();
 
        bool saveBlock(MapBlock *block);
-       static bool saveBlock(MapBlock *block, MapDatabase *db);
+       static bool saveBlock(MapBlock *block, MapDatabase *db, int compression_level = -1);
        MapBlock* loadBlock(v3s16 p);
        // Database version
        void loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool save_after_load=false);
@@ -414,7 +397,6 @@ class ServerMap : public Map
        bool isSavingEnabled(){ return m_map_saving_enabled; }
 
        u64 getSeed();
-       s16 getWaterLevel();
 
        /*!
         * Fixes lighting in one map block.
@@ -435,13 +417,9 @@ class ServerMap : public Map
        std::string m_savedir;
        bool m_map_saving_enabled;
 
-#if 0
-       // Chunk size in MapSectors
-       // If 0, chunks are disabled.
-       s16 m_chunksize;
-       // Chunks
-       core::map<v2s16, MapChunk*> m_chunks;
-#endif
+       int m_map_compression_level;
+
+       std::set<v3s16> m_chunks_in_progress;
 
        /*
                Metadata is re-written on disk only if this is true.