X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fmapsector.h;h=2888eb7b2cf711c65b717b9cd0f8cd51cb6fa7f7;hb=a302ae3e08c6ddc171c78e1e2b59cf5148860e90;hp=ad6161bdf88de9dc1be8787eead81cfeaae9ba91;hpb=fc26dcdb19dd4e296d850714019ed7da1de0b021;p=dragonfireclient.git diff --git a/src/mapsector.h b/src/mapsector.h index ad6161bdf..2888eb7b2 100644 --- a/src/mapsector.h +++ b/src/mapsector.h @@ -27,26 +27,17 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "common_irrlicht.h" #include "mapblock.h" -#include "heightmap.h" +//#include "heightmap.h" #include "exceptions.h" /* This is an Y-wise stack of MapBlocks. */ -#define WATER_LEVEL (-5) - -#define SECTOR_OBJECT_TEST 0 -#define SECTOR_OBJECT_TREE_1 1 -#define SECTOR_OBJECT_BUSH_1 2 -#define SECTOR_OBJECT_RAVINE 3 - -#define MAPSECTOR_FIXEDHEIGHTMAPS_MAXCOUNT 4 - #define MAPSECTOR_SERVER 0 #define MAPSECTOR_CLIENT 1 -class MapSector: public NodeContainer, public Heightmappish +class MapSector: public NodeContainer { public: @@ -67,6 +58,7 @@ class MapSector: public NodeContainer, public Heightmappish return m_pos; } + MapBlock * getBlockNoCreateNoEx(s16 y); MapBlock * getBlockNoCreate(s16 y); MapBlock * createBlankBlockNoInsert(s16 y); MapBlock * createBlankBlock(s16 y); @@ -197,6 +189,7 @@ class MapSector: public NodeContainer, public Heightmappish blockref->setNode(relpos, n); } + // DEPRECATED? virtual f32 getGroundHeight(v2s16 p, bool generate=false) { return GROUNDHEIGHT_NOTFOUND_SETVALUE; @@ -244,44 +237,15 @@ class MapSector: public NodeContainer, public Heightmappish class ServerMapSector : public MapSector { public: - ServerMapSector(NodeContainer *parent, v2s16 pos, u16 hm_split); + ServerMapSector(NodeContainer *parent, v2s16 pos); ~ServerMapSector(); u32 getId() const { return MAPSECTOR_SERVER; } - - void setHeightmap(v2s16 hm_p, FixedHeightmap *hm); - FixedHeightmap * getHeightmap(v2s16 hm_p); - - void printHeightmaps() - { - for(s16 y=0; yprint(); - } - } - void setObjects(core::map *objects) - { - m_objects = objects; - differs_from_disk = true; - } - - core::map * getObjects() - { - differs_from_disk = true; - return m_objects; - } - + // DEPRECATED? f32 getGroundHeight(v2s16 p, bool generate=false); void setGroundHeight(v2s16 p, f32 y, bool generate=false); @@ -295,22 +259,13 @@ class ServerMapSector : public MapSector std::istream &is, NodeContainer *parent, v2s16 p2d, - Heightmap *master_hm, core::map & sectors ); private: - // Heightmap(s) for the sector - FixedHeightmap *m_heightmaps[MAPSECTOR_FIXEDHEIGHTMAPS_MAXCOUNT]; - // Sector is split in m_hm_split^2 heightmaps. - // Value of 0 means there is no heightmap. - u16 m_hm_split; - // These are removed when they are drawn to blocks. - // - Each is drawn when generating blocks; When the last one of - // the needed blocks is being generated. - core::map *m_objects; }; +#ifndef SERVER class ClientMapSector : public MapSector { public: @@ -324,15 +279,16 @@ class ClientMapSector : public MapSector void deSerialize(std::istream &is); - s16 getCorner(u16 i) + /*s16 getCorner(u16 i) { return m_corners[i]; - } + }*/ private: // The ground height of the corners is stored in here - s16 m_corners[4]; + //s16 m_corners[4]; }; +#endif #endif