diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-05-21 01:11:58 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-05-21 01:11:58 +0300 |
commit | 76e241392d2ad232b751c74df7cba9e5acfa7855 (patch) | |
tree | e58f72b379c1a4e1b86a4e85c6c0007109635b32 /src/map.h | |
parent | 73a18b9271bebddfe6716529bb13cad30869bc16 (diff) | |
parent | 52d857cf1527948e1db5eead457e51b6741de8a2 (diff) | |
download | minetest-76e241392d2ad232b751c74df7cba9e5acfa7855.tar.gz minetest-76e241392d2ad232b751c74df7cba9e5acfa7855.tar.bz2 minetest-76e241392d2ad232b751c74df7cba9e5acfa7855.zip |
Merge: New map directory structure and player passwords
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -545,13 +545,9 @@ public: Misc. helper functions for fiddling with directory and file names when saving */ - void createDir(std::string path); - void createSaveDir(); - // returns something like "xxxxxxxx" - std::string getSectorSubDir(v2s16 pos); + void createDirs(std::string path); // returns something like "map/sectors/xxxxxxxx" - std::string getSectorDir(v2s16 pos); - std::string createSectorDir(v2s16 pos); + std::string getSectorDir(v2s16 pos, int layout = 2); // dirname: final directory name v2s16 getSectorPos(std::string dirname); v3s16 getBlockPos(std::string sectordir, std::string blockfile); @@ -572,7 +568,7 @@ public: // (no MapBlocks) // DEPRECATED? Sectors have no metadata anymore. void saveSectorMeta(ServerMapSector *sector); - MapSector* loadSectorMeta(std::string dirname); + MapSector* loadSectorMeta(std::string dirname, bool save_after_load); // Full load of a sector including all blocks. // returns true on success, false on failure. @@ -583,7 +579,7 @@ public: void saveBlock(MapBlock *block); // This will generate a sector with getSector if not found. - void loadBlock(std::string sectordir, std::string blockfile, MapSector *sector); + void loadBlock(std::string sectordir, std::string blockfile, MapSector *sector, bool save_after_load=false); // For debug printing virtual void PrintInfo(std::ostream &out); |