Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
5d18dc35
Commit
5d18dc35
authored
12 years ago
by
DannyDark
Committed by
Ilya Zhuravlev
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed compile issues on windows
With latest upstream L-Systems treegen.
parent
b40e5998
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/treegen.cpp
+8
-6
8 additions, 6 deletions
src/treegen.cpp
with
8 additions
and
6 deletions
src/treegen.cpp
+
8
−
6
View file @
5d18dc35
...
...
@@ -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
(
my
round
(
p0
.
X
),
my
round
(
p0
.
Y
),
my
round
(
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
(
my
round
(
p0
.
X
),
my
round
(
p0
.
Y
),
my
round
(
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
(
my
round
(
p0
.
X
),
my
round
(
p0
.
Y
),
my
round
(
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment