From 11afcbff69c95915e5142bc4b55636ff6358ece9 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sun, 25 Nov 2012 21:16:48 -0500 Subject: The new mapgen, noise functions, et al. --- src/voxel.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/voxel.h') diff --git a/src/voxel.h b/src/voxel.h index e7155dfac..c2a5efb4b 100644 --- a/src/voxel.h +++ b/src/voxel.h @@ -72,7 +72,7 @@ public: MaxEdge(p) { } - + /* Modifying methods */ @@ -106,14 +106,14 @@ public: if(p.Y > MaxEdge.Y) MaxEdge.Y = p.Y; if(p.Z > MaxEdge.Z) MaxEdge.Z = p.Z; } - + // Pad with d nodes void pad(v3s16 d) { MinEdge -= d; MaxEdge += d; } - + /*void operator+=(v3s16 off) { MinEdge += off; @@ -202,7 +202,7 @@ public: } assert(contains(a)); - + // Take back area, XY inclusive { v3s16 min(MinEdge.X, MinEdge.Y, a.MaxEdge.Z+1); @@ -258,7 +258,7 @@ public: } } - + /* Translates position from virtual coordinates to array index */ @@ -274,7 +274,7 @@ public: { return index(p.X, p.Y, p.Z); } - + // Translate index in the X coordinate void add_x(const v3s16 &extent, u32 &i, s16 a) { @@ -343,7 +343,7 @@ class VoxelManipulator /*: public NodeContainer*/ public: VoxelManipulator(); virtual ~VoxelManipulator(); - + /* Virtuals from NodeContainer */ @@ -430,7 +430,7 @@ public: void setNode(v3s16 p, const MapNode &n) { emerge(p); - + m_data[m_area.index(p)] = n; m_flags[m_area.index(p)] &= ~VOXELFLAG_INEXISTENT; m_flags[m_area.index(p)] &= ~VOXELFLAG_NOT_LOADED; @@ -457,10 +457,10 @@ public: //dstream<<"operator[] p=("< & from_nodes, core::map & light_sources, INodeDefManager *nodemgr); - + void spreadLight(enum LightBank bank, v3s16 p, INodeDefManager *nodemgr); void spreadLight(enum LightBank bank, core::map & from_nodes, INodeDefManager *nodemgr); - + /* Virtual functions */ - + /* Get the contents of the requested area from somewhere. Shall touch only nodes that have VOXELFLAG_NOT_LOADED @@ -565,7 +565,7 @@ public: MaxEdge is 1 higher than maximum allowed position */ VoxelArea m_area; - + /* NULL if data size is 0 (extent (0,0,0)) Data is stored as [z*h*w + y*h + x] @@ -576,7 +576,7 @@ public: Flags of all nodes */ u8 *m_flags; - + //TODO: Use these or remove them //TODO: Would these make any speed improvement? //bool m_pressure_route_valid; -- cgit v1.2.3