diff options
author | dannydark <the_skeleton_of_a_child@yahoo.co.uk> | 2012-12-30 12:22:13 +0000 |
---|---|---|
committer | Ilya Zhuravlev <zhuravlevilya@ya.ru> | 2012-12-30 16:38:53 +0400 |
commit | 5d18dc358b7f890f837e63ba717cfa9f2ac9e0af (patch) | |
tree | 5462e75a02a3fbadf952a67d5ae95f3ffbfb6921 | |
parent | b40e5998664ad6f03a59b70f1ddcdf651f4560ab (diff) | |
download | minetest-5d18dc358b7f890f837e63ba717cfa9f2ac9e0af.tar.gz minetest-5d18dc358b7f890f837e63ba717cfa9f2ac9e0af.tar.bz2 minetest-5d18dc358b7f890f837e63ba717cfa9f2ac9e0af.zip |
Fixed compile issues on windows
With latest upstream L-Systems treegen.
-rw-r--r-- | src/treegen.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/treegen.cpp b/src/treegen.cpp index 3354f97a2..54cee0fef 100644 --- a/src/treegen.cpp +++ b/src/treegen.cpp @@ -17,8 +17,10 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <irr_v3d.h> +#include "irr_v3d.h" #include <stack> +#include "util/numeric.h" +#include "util/mathconstants.h" #include "noise.h" #include "map.h" #include "environment.h" @@ -281,7 +283,7 @@ void make_ltree(ManualMapVoxelManipulator &vmanip, v3s16 p0, INodeDefManager *nd for(x=-size; x<size+1; x++) for(y=-size; y<size+1; y++) for(z=-size; z<size+1; z++) - if (abs(x) == size and abs(y) == size and abs(z) == size) + if (abs(x) == size && abs(y) == size && abs(z) == size) { make_tree_leaves_placement(vmanip,v3f(p0.X+position.X+x+1,p0.Y+position.Y+y,p0.Z+position.Z+z),tree_definition); make_tree_leaves_placement(vmanip,v3f(p0.X+position.X+x-1,p0.Y+position.Y+y,p0.Z+position.Z+z),tree_definition); @@ -343,7 +345,7 @@ void make_ltree(ManualMapVoxelManipulator &vmanip, v3s16 p0, INodeDefManager *nd void make_tree_node_placement(ManualMapVoxelManipulator &vmanip, v3f p0, MapNode node) { - v3s16 p1 = v3s16(round(p0.X),round(p0.Y),round(p0.Z)); + v3s16 p1 = v3s16(myround(p0.X),myround(p0.Y),myround(p0.Z)); if(vmanip.m_area.contains(p1) == false) return; u32 vi = vmanip.m_area.index(p1); @@ -356,7 +358,7 @@ void make_tree_node_placement(ManualMapVoxelManipulator &vmanip, v3f p0, void make_tree_trunk_placement(ManualMapVoxelManipulator &vmanip, v3f p0, TreeDef &tree_definition) { - v3s16 p1 = v3s16(round(p0.X),round(p0.Y),round(p0.Z)); + v3s16 p1 = v3s16(myround(p0.X),myround(p0.Y),myround(p0.Z)); if(vmanip.m_area.contains(p1) == false) return; u32 vi = vmanip.m_area.index(p1); @@ -369,7 +371,7 @@ void make_tree_trunk_placement(ManualMapVoxelManipulator &vmanip, v3f p0, void make_tree_leaves_placement(ManualMapVoxelManipulator &vmanip, v3f p0, TreeDef &tree_definition) { - v3s16 p1 = v3s16(round(p0.X),round(p0.Y),round(p0.Z)); + v3s16 p1 = v3s16(myround(p0.X),myround(p0.Y),myround(p0.Z)); if(vmanip.m_area.contains(p1) == false) return; u32 vi = vmanip.m_area.index(p1); @@ -515,4 +517,4 @@ static void make_jungletree(VoxelManipulator &vmanip, v3s16 p0, } #endif -}; // namespace treegen +}; // namespace treegen
\ No newline at end of file |