]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/serialization.h
Passwords - password entry at main menu, stored and checked by server
[dragonfireclient.git] / src / serialization.h
index c15a2a2354eeaf6f134be3a8cbe62b6619e8e6d2..c7cafc5d19306e60a87ed86acb8417a9e420ba9c 100644 (file)
@@ -29,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
        NOTE: The goal is to increment this so that saved maps will be
              loadable by any version. Other compatibility is not
                  maintained.
-       Serialization format versions:
+       Serialization format versions (for raw map data (blocks, nodes, sectors)):
        == Unsupported ==
        0: original networked test with 1-byte nodes
        1: update with 2-byte nodes
@@ -43,18 +43,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
        8: (dev) server-initiated block transfers and all kinds of stuff
        9: (dev) block objects
        10: (dev) water pressure
-       11: (dev) zlib'd blocks
+       11: (dev) zlib'd blocks, block flags
+       12: (dev) UnlimitedHeightmap now uses interpolated areas
+       13: (dev) Mapgen v2
+       14: (dev) NodeMetadata
+       15: (dev) StaticObjects
+       16: (dev) larger maximum size of node metadata, and compression
 */
 // This represents an uninitialized or invalid format
 #define SER_FMT_VER_INVALID 255
 // Highest supported serialization version
-#define SER_FMT_VER_HIGHEST 11
+#define SER_FMT_VER_HIGHEST 16
 // Lowest supported serialization version
-#define SER_FMT_VER_LOWEST 2
+#define SER_FMT_VER_LOWEST 0
 
 #define ser_ver_supported(v) (v >= SER_FMT_VER_LOWEST && v <= SER_FMT_VER_HIGHEST)
 
+void compressZlib(SharedBuffer<u8> data, std::ostream &os);
+void compressZlib(const std::string &data, std::ostream &os);
+void decompressZlib(std::istream &is, std::ostream &os);
+
 void compress(SharedBuffer<u8> data, std::ostream &os, u8 version);
+//void compress(const std::string &data, std::ostream &os, u8 version);
 void decompress(std::istream &is, std::ostream &os, u8 version);
 
 /*class Serializable