From 24c4b7c68d283a4d1de72a3eb68f1268f1fe34e3 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 27 Nov 2010 17:18:34 +0200 Subject: Working version before block send priorization update --- src/map.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index ca3b0086b..482ab2ac7 100644 --- a/src/map.h +++ b/src/map.h @@ -242,21 +242,32 @@ public: virtual void PrintInfo(std::ostream &out); }; -struct MapgenParams +// Master heightmap parameters +struct HMParams { - MapgenParams() + HMParams() { heightmap_blocksize = 64; height_randmax = "constant 70.0"; height_randfactor = "constant 0.6"; height_base = "linear 0 80 0"; - plants_amount = "1.0"; } s16 heightmap_blocksize; std::string height_randmax; std::string height_randfactor; std::string height_base; - std::string plants_amount; +}; + +// Map parameters +struct MapParams +{ + MapParams() + { + plants_amount = 1.0; + //max_objects_in_block = 30; + } + float plants_amount; + //u16 max_objects_in_block; }; class ServerMap : public Map @@ -265,7 +276,7 @@ public: /* savedir: directory to which map data should be saved */ - ServerMap(std::string savedir, MapgenParams params); + ServerMap(std::string savedir, HMParams hmp, MapParams mp); ~ServerMap(); s32 mapType() const @@ -346,6 +357,8 @@ public: private: UnlimitedHeightmap *m_heightmap; + MapParams m_params; + std::string m_savedir; bool m_map_saving_enabled; }; -- cgit v1.2.3